nextjs
Skill16 starsChanged 4 months agoMITView on GitHub
Apply these opinionated Next.js conventions whenever writing or reviewing App Router code (14+): Server Components by default, where the 'use client' boundary belongs, the caching defaults that changed in Next 15, tag-based revalidation, treating Server Actions as public endpoints, the Metadata API, and next/image and next/font.
19 other projects use a version of this.
Adopted by
Most recently taken up by
- davidvornholt/mailboxtheir own version, first seen Oct 4, 2026
- fjerbi/claude-code-arsenaltheir own version, first seen Sep 28, 2026
- AvilaCarlosDev/openclaw-skillstheir own version, first seen Sep 19, 2026
- SnowBeatRain/skillstheir own version, first seen Sep 15, 2026
- conjure-3301/skillstheir own version, first seen Aug 17, 2026
- Rikinshah787/agent-skills-production-skillstheir own version, first seen Aug 10, 2026
Used with
Projects with it also use terraform, tailwind and 2 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
ihiteshguptaSkillterraform
Expert in Infrastructure as Code with Terraform. Use for creating, managing, and versioning infrastructure across cloud providers.
Also in 3 projects that use this
nth5693Skilltailwind
Also in 3 projects that use this
akornmeierSkillshadcn-ui
Use when building React UIs with component libraries, implementing forms, dialogs, navigation, or data display. Use when user mentions shadcn, Radix UI, Base UI, or asks about accessible React components. Proactively suggest when building UI that would benefit from pre-built accessible components with Tailwind CSS styling.
Also in 3 projects that use this
akornmeierSkilldocker
Guide for using Docker - a containerization platform for building, running, and deploying applications in isolated containers. Use when containerizing applications, creating Dockerfiles, working with Docker Compose, managing images/containers, configuring networking and storage, optimizing builds, deploying to production, or implementing CI/CD pipelines with Docker.
Also in 3 projects that use this
Other versions19 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 19
- openai/plugins★ 7.3ksame name
- nth5693/gemini-kit★ 373same name
- faqndo97/ai-skills★ 33same name
- nimadorostkar/Claude-Skills-collection★ 28same name
- wpank/ai★ 11same name
- YepAPI/skills★ 8same name
- DongDuong2001/pudo-code-system★ 5same name
- leonvanzyl/claude-code-pro-workflow-demo★ 4same name
- Aver005/agent-skills★ 2same name
- davidvornholt/mailbox★ 2same name
9 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository15 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- csharpSkill
- documentationSkill
- dotnet-coreSkill
- humanize-textSkill
- javascriptSkill
- jira-report-commentSkill
- legacy-modernizationSkill
- nestjsSkill
- pythonSkill
- reactSkill
- simple-englishSkill
- spec-miningSkill
- testingSkill
- typescriptSkill
The file
We split this skill into the rules it gives an agent
1 rule. 0 are common, 0 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 17 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
App Router only: Never add to pages/. If a project still has one, new work goes in app/ and the two coexist until someone schedules the …
“Common” is measured: kept by at least 6 in 10 of the 17 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Next.js
House conventions for Next.js App Router (14+). Apply them to code you are writing or changing — don't migrate untouched routes unless asked.
Conventions
- App Router only. Never add to
pages/. If a project still has one, new work goes inapp/and the two coexist until someone schedules the migration. - Server Components by default.
'use client'marks a leaf that needs interactivity, not a page. Everything above that marker ships to the browser too, so the boundary belongs as deep in the tree as it will go. - Verify caching behaviour against the installed version — it changed. Through Next 14,
fetchwas cached by default and you opted out; from Next 15,fetch, Route Handlers, and client navigation are uncached by default and you opt in. Assuming the wrong default gives you either stale pages or an origin taking every request. Checkpackage.json, then set the intent explicitly (cache,next.revalidate, or route segment config) rather than relying on whatever the default happens to be. paramsandsearchParamsare Promises from Next 15 on —const { slug } = await params. Code written against 14 destructures them synchronously and breaks on upgrade, so check the installed major before copying either form.- A
layout.tsxauth check is not a security boundary. Layouts don't re-render on every navigation between their child routes, so the check can be skipped on client-side transitions. Enforce access in middleware and again where the data is read; the layout check is UX, not enforcement. - Tag what you fetch, revalidate by tag.
next: { tags: ['user'] }plusrevalidateTag('user')after a mutation invalidates exactly the affected data. Time-based revalidation is a guess about staleness; tags are a fact about it. - Server Actions are public endpoints. They are reachable by anyone who can find the action ID, so every one re-checks auth and re-validates its input server-side. The form it was rendered behind proves nothing about the caller.
- Fetch in the component that renders the data. React dedupes identical requests within a render pass, so prop-drilling data down to avoid a "duplicate" fetch buys nothing and couples the tree.
- Metadata through the Metadata API —
export const metadataorgenerateMetadata. Hand-written<head>tags in a component don't merge across nested layouts and silently lose out to the framework's. next/imageandnext/fontalways. They exist for the two largest Core Web Vitals costs: unsized images causing layout shift, and font loading blocking first paint. A raw<img>gives up both.loading.tsxanderror.tsxper meaningful route segment. The route boundary is where a failure should be contained; withouterror.tsx, one segment's error takes down the layout around it.
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.

