# Skillfarm Website: https://skillfarm.ai The site at [skillfarm.ai](https://skillfarm.ai): a free, curated list of agent skills (SKILL.md bundles), grown by its community. Every shared skill is reviewed by a person before it goes live. Members earn Seeds, a status score, for sharing skills that others install, like, review and replant. One Cloudflare Worker serves everything: the pages (server-rendered with Hono JSX), the sign-in flows, the admin review queue, and an MCP server. ## How it fits together | Piece | Where | |---|---| | Pages and forms | `src/routes/*.tsx`, `src/views/` | | Data rules (Seeds, likes, reviews, submissions) | `src/lib/skills.ts`, `src/lib/points.ts`, `src/lib/tiers.ts` | | Sign-in with GitHub and Google | `src/routes/auth.tsx`, `src/lib/session.ts` | | Review of submissions | `src/lib/scan.ts` (pattern scan), `src/lib/ai.ts` (Claude review), `src/routes/admin.tsx` | | Email through Resend | `src/lib/email.ts` | | MCP server | `src/routes/mcp.ts` at `/mcp` and `/mcp/account` | | OAuth server for MCP clients | `src/routes/oauth.tsx`, `src/lib/tokens.ts` | | Schema | `migrations/` (D1) | | Styles, scripts, fonts, artwork | `public/`, `src/views/art.ts` | Storage: D1 database `skillfarm`, R2 buckets `skillfarm-skills` (skill files) and `skillfarm-avatars`. Every submission, from the site or over MCP, lands in the review queue. `decideVersion` in `src/lib/skills.ts` is the only code path that makes a skill public, and only an admin can call it. ### Sprout's picks Sprout (`@sprout`, `users.is_agent = 1`) is the site's own agent. It cannot sign in, earns no Seeds and is on no board. Its picks are skills made by other people: rows in `skills` with `kind = 'link'` that credit a maker and link to the maker's repo. Skillfarm stores no files for a pick, so there is nothing to download, review or replant. An admin adds, edits and removes picks in `/admin` under "Sprout's picks" (`savePick` in `src/lib/skills.ts`, admin only). The first picks are in `migrations/0003_seed_sprout_picks.sql`. ## Run it locally ```bash npm install printf 'SESSION_SECRET=%s\nDEV_LOGIN=1\nSITE_URL=http://localhost:8787\nGITHUB_API_BASE=http://127.0.0.1:8789\nGITHUB_RAW_BASE=http://127.0.0.1:8789/raw\n' "$(openssl rand -base64 32)" > .dev.vars npm run db:migrate:local npm run dev # http://127.0.0.1:8787 npm test # end-to-end checks against the dev server ``` `DEV_LOGIN=1` adds test sign-in links on `/signin`. They only work on localhost. The two `GITHUB_` lines point repo reading at the stand-in for GitHub that `npm test` starts, so the tests never call GitHub. They are ignored unless `DEV_LOGIN` is set. Remove them to read real repos while you develop. ## Deploy ```bash npm run db:migrate # applies migrations to the production D1 database npm run deploy ``` Secrets, set with `npx wrangler secret put NAME`: | Secret | Used for | |---|---| | `SESSION_SECRET` | Signing cookies. Any random string of 32 or more characters. | | `GITHUB_CLIENT_ID`, `GITHUB_CLIENT_SECRET` | GitHub sign-in and star counts. Callback: `https://skillfarm.ai/auth/github/callback` | | `GOOGLE_CLIENT_ID`, `GOOGLE_CLIENT_SECRET` | Google sign-in. Callback: `https://skillfarm.ai/auth/google/callback` | | `ANTHROPIC_API_KEY` | The AI review of each submission | | `RESEND_API_KEY` | Email notices. The `EMAIL_FROM` domain must be verified in Resend. | The site runs with any of these missing: the matching feature shows as "being set up" and `/admin` → System lists what is configured. Admins are the GitHub account ids in `ADMIN_GITHUB_IDS` (`wrangler.jsonc`). The flag is applied when that account signs in with GitHub.