agentleFS
lukashouthoofdlukashouthoofd/cenekathon/.claude/skills/frontend-nextjs-vercel/SKILL.md

frontend-nextjs-vercel

Skill1 starsChanged 14 days agoMITView on GitHub

Use when building a web UI with React/Next.js and deploying it on Vercel — project setup, App Router patterns, performance basics, env vars, preview and production deploys.

  • Reads credentials
  • Installs packages

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Add UI kit only if needed: npx shadcn@latest init then npx shadcn@latest add button card input (copy-in components, no lock-in).

    line 13
  2. Very specific:

    Server Components by default: Add "use client" only for state, effects, or event handlers.

    line 17
  3. Very specific:

    Avoid request waterfalls: start independent fetches together with Promise.all.

    line 22
  4. Distinctive:

    Don't import big libraries into client components.

    line 25

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Frontend: Next.js + Vercel

Setup (5 min)

npx create-next-app@latest web --ts --tailwind --app --eslint --use-npm --yes
cd web && npm run dev

Add UI kit only if needed: npx shadcn@latest init then npx shadcn@latest add button card input (copy-in components, no lock-in).

Structure

  • app/page.tsx landing/demo screen; app/api/<name>/route.ts for server endpoints (keeps API keys server-side); components/; lib/ (llm client, helpers).
  • Server Components by default. Add "use client" only for state, effects, or event handlers. Keep client components small and leaf-level.
  • Fetch data on the server (async page) and pass props; use Route Handlers or Server Actions for mutations.
  • Secrets only via process.env.X in server code. Only NEXT_PUBLIC_* reaches the browser — never put a key there.

Performance basics (cheap wins)

  • Avoid request waterfalls: start independent fetches together with Promise.all.
  • next/image for images, next/font for fonts; lazy-load heavy components with next/dynamic.
  • Stream slow AI/data parts with <Suspense fallback={…}> so the page shows instantly.
  • Don't import big libraries into client components; no barrel-file mega imports.
  • Deeper guidance: vercel-react-best-practices, vercel-composition-patterns; deploying: deploy-to-vercel.

UX that demos well

Loading, empty and error states for every async view; disable buttons while pending; show results progressively. See ui-polish.

Deploy

npm i -g vercel          # once
vercel login             # humans only — never script credentials
vercel link              # from the web/ folder; set Root Directory if in a monorepo
vercel env add AI_API_KEY production   # (and preview); mirror .env.example
vercel                   # preview URL
vercel --prod            # production URL

Or connect the GitHub repo in the Vercel dashboard so every merge to main deploys and every PR gets a preview URL. Remember function timeouts on the free tier: keep AI routes streaming or under ~10–60 s.

Done when: npm run build passes locally, the Vercel URL works in an incognito window, and no secret is in the client bundle (git grep NEXT_PUBLIC).

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.