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
In this repository58 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .agents/skills/vercel-composition-patterns/AGENTS.mdAGENTS.md
- .agents/skills/vercel-react-best-practices/AGENTS.mdAGENTS.md
- .claude/skills/vercel-composition-patterns/AGENTS.mdAGENTS.md
- .claude/skills/vercel-react-best-practices/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- ai-in-the-productSkill
- backend-apiSkill
- database-quickSkill
- data-ml-quickstartSkill
- debug-fastSkill
- demo-and-pitchSkill
- deploy-fastSkill
- deploy-to-vercelSkill
- docker-build-strategiesSkill
- docker-compose-patternsSkill
- docker-destructive-guardrailsSkill
- docker-project-foundationsSkill
- find-skillsSkill
- git-githubSkill
- kickoffSkill
- pitch-deckSkill
- rapid-prototypeSkill
- repo-polishSkill
- security-basicsSkill
- smoke-testingSkill
- team-syncSkill
- ui-polishSkill
- vercel-composition-patternsSkill
- vercel-react-best-practicesSkill
- verification-before-doneSkill
- ai-in-the-productSkill
- backend-apiSkill
- database-quickSkill
- data-ml-quickstartSkill
- debug-fastSkill
- demo-and-pitchSkill
- deploy-fastSkill
- deploy-to-vercelSkill
- docker-build-strategiesSkill
- docker-compose-patternsSkill
- docker-destructive-guardrailsSkill
- docker-project-foundationsSkill
- find-skillsSkill
- frontend-nextjs-vercelSkill
- git-githubSkill
- kickoffSkill
- pitch-deckSkill
- rapid-prototypeSkill
- repo-polishSkill
- security-basicsSkill
- smoke-testingSkill
- team-syncSkill
- ui-polishSkill
- vercel-composition-patternsSkill
- vercel-react-best-practicesSkill
- verification-before-doneSkill
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
- Very specific: line 13
Add UI kit only if needed: npx shadcn@latest init then npx shadcn@latest add button card input (copy-in components, no lock-in).
- Very specific: line 17
Server Components by default: Add "use client" only for state, effects, or event handlers.
- Very specific: line 22
Avoid request waterfalls: start independent fetches together with Promise.all.
- Distinctive: line 25
Don't import big libraries into client components.
≈ “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.
Files
Frontend: Next.js + Vercel
Setup (5 min)
npx create-next-app@latest web --ts --tailwind --app --eslint --use-npm --yes
cd web && npm run devAdd 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.tsxlanding/demo screen;app/api/<name>/route.tsfor 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 (
asyncpage) and pass props; use Route Handlers or Server Actions for mutations. - Secrets only via
process.env.Xin server code. OnlyNEXT_PUBLIC_*reaches the browser — never put a key there.
Performance basics (cheap wins)
- Avoid request waterfalls: start independent fetches together with
Promise.all. next/imagefor images,next/fontfor fonts; lazy-load heavy components withnext/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 URLOr 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).
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
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.

