nextjs-app-router
Skill2 starsChanged 4 months agoMITView on GitHub
Build Next.js App Router apps with correct server/client component boundaries, routing, layouts, and file conventions. Use when working on Next.js App Router projects, app/ directories, RSC, layouts, route handlers, or when the user mentions Next.js routing or server components.
9 other projects use a version of this.
Adopted by
Most recently taken up by
- SkillMedev/full-stack-web-devtheir own version, first seen Oct 5, 2026
- sabahattink/antigravity-fullstack-hqtheir own version, first seen Sep 20, 2026
- jawwad-ali/claude-code-skillstheir own version, first seen Sep 5, 2026
- dennisrongo/claude-skillstheir own version, first seen Aug 16, 2026
- FilippoDeSilva/skillstheir own version, first seen Jun 26, 2026
- ThuPhuong1010/claude-factorytheir own version, first seen Mar 29, 2026
Other versions9 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 9
- sabahattink/antigravity-fullstack-hq★ 30same name
- jawwad-ali/claude-code-skills★ 4same name
- VersoXBT/claude-initial-setup★ 4same name
- LeahyCC/claude-skills★ 3same name
- desilokesh1/antigravity-fullstack-hq★ 2same name
- FilippoDeSilva/skills★ 2same name
- dennisrongo/claude-skills★ 1same name
- SkillMedev/full-stack-web-dev★ 1same name
- ThuPhuong1010/claude-factory★ 0same name
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 repository24 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- code-reviewSkill
- debuggingSkill
- javascript-best-practicesSkill
- nextjs-data-fetchingSkill
- python-best-practicesSkill
- python-testingSkill
- react-best-practicesSkill
- tagged-code-commentsSkill
- typescript-best-practicesSkill
- create-skillSkill
- revise-skillSkill
- academic-paperSkill
- latex-scientific-writingSkill
- paper-abstractSkill
- paper-conclusionSkill
- paper-discussionSkill
- paper-introductionSkill
- paper-literature-reviewSkill
- paper-methodsSkill
- paper-peer-reviewSkill
- paper-related-workSkill
- paper-resultsSkill
The file
We split this skill into the rules it gives an agent
7 rules. 0 are common, 1 is distinctive, and 6 are very specific to this project.
0
Common
Most of the 6 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 19
Use the App Router (app/) unless the repo is Pages Router
- Very specific: line 20
Default to Server Components.
- Very specific: line 43
Routing: Prefer file-system routes.
- Very specific: line 46
Match the Next version: Prefer patterns from the installed Next.js major.
- Very specific: line 47
Tag unfinished or risky work: Use the global tagged-code-comments convention (🔴 FIXME(P0):, 🟠 TODO(P1):, …).
- Very specific: line 51
Add "use client" when the module needs:
- Distinctive: line 57
Keep data fetching and static structure on the server when possible.
“Common” is measured: kept by at least 6 in 10 of the 6 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 App Router
Defaults
- Use the App Router (
app/) unless the repo is Pages Router - Default to Server Components; add
"use client"only when needed - Colocate route UI under
app/with Next file conventions - For data fetching details, also apply
nextjs-data-fetching
File conventions (common)
app/
layout.tsx # Root layout (required)
page.tsx # Route UI
loading.tsx # Instant loading UI
error.tsx # Error boundary
not-found.tsx
api/…/route.ts # Route handlers
(marketing)/… # Route groups (no URL segment)
blog/[slug]/page.tsxInstructions
- Server Components by default. Fetch data and render on the server when possible. Push
"use client"to leaves that need state, effects, or browser APIs. - Do not pass non-serializable props from server to client components (functions, class instances). Pass data; define handlers on the client side.
- Layouts nest. Shared chrome belongs in
layout.tsx. Keep layouts thin; avoid putting all page logic in the root layout. - Routing. Prefer file-system routes. Use route groups
(name)for organization without URL impact. Use dynamic segments[param]/[[...optional]]as needed. - Metadata. Export
metadataorgenerateMetadatafrom server components/pages for titles and SEO. - Errors & loading. Provide
error.tsxandloading.tsxfor routes with meaningful async work. - Match the Next version. Prefer patterns from the installed Next.js major; do not mix Pages Router APIs into App Router files.
- Tag unfinished or risky work. Use the global
tagged-code-commentsconvention (🔴 FIXME(P0):,🟠 TODO(P1):, …). Never leave silent stubs. End with an Open follow-ups table so the developer must check P0/P1 before ship.
Client boundary rule of thumb
Add "use client" when the module needs:
useState/useReducer/useEffect- Browser-only APIs
- Event handlers on interactive widgets that cannot be isolated lower
Keep data fetching and static structure on the server when possible.
Anti-patterns
- Marking entire trees
"use client"unnecessarily - Importing server-only modules into client components
- Using
getServerSideProps/getStaticPropsin App Router - Huge root layouts with page-specific logic
Additional resources
- references/checklist.md
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.

