feat(curation): auto-curation after crawl + quality messaging

Automate curation:
- Add runPostCrawlCuration() to DB queries — runs after every
  full and incremental crawl (classify, dedup, category counts)
- No more need for manual curate.mjs runs after each crawl

Quality messaging:
- Homepage stats label: "Skills" → "Curated Skills" (en/fa)
- Add curation note: "deduplicated and quality-filtered from X+ repos"
- Update fallback counts from 172K to 16K across all touchpoints
  (BetaBanner, getting-started prompts, email templates)
- getting-started skill count query now uses browse-ready filter

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
airano
2026-02-19 15:06:18 +03:30
parent caca09fbe7
commit c8216dfcd2
8 changed files with 123 additions and 11 deletions

View File

@@ -14,10 +14,11 @@ async function getSkillCount(): Promise<string> {
const db = createDb();
const result = await db
.select({ count: sql<number>`count(*)::int` })
.from(skills);
return formatPromptSkillCount(result[0]?.count ?? 170000);
.from(skills)
.where(sql`${skills.isDuplicate} = false AND (${skills.skillType} IS NULL OR ${skills.skillType} != 'aggregator')`);
return formatPromptSkillCount(result[0]?.count ?? 16000);
} catch {
return '170,000+';
return '16,000+';
}
}

View File

@@ -44,11 +44,19 @@ async function getStats() {
.where(browseReady);
const totalContributors = contributorsResult[0]?.count ?? 0;
// Get total indexed skills (all, before curation) for curation note
const totalIndexedResult = await db
.select({ count: sql<number>`count(*)::int` })
.from(skills)
.where(sql`${skills.isBlocked} = false`);
const totalIndexed = totalIndexedResult[0]?.count ?? 0;
return {
totalSkills,
totalDownloads,
totalCategories,
totalContributors,
totalIndexed,
platforms: 5,
};
} catch (error) {
@@ -186,6 +194,9 @@ export default async function HomePage({
</div>
))}
</div>
<p className="text-center text-text-muted text-sm mt-6">
{t('stats.curationNote', { totalIndexed: formatCompactNumber(statsData?.totalIndexed ?? 0, locale) })}
</p>
</div>
</section>