app-router
Skill by davepoon
Guides Next.js App Router file conventions and routing patterns for an AI assistant. It covers creating routes, layouts, loading states, error boundaries and dynamic routes.
Install app-router
Built from the published package, never by AI.
git clone --depth 1 https://github.com/davepoon/buildwithclaude /tmp/buildwithclaude && mkdir -p ~/.claude/skills && cp -r /tmp/buildwithclaude/plugins/nextjs-expert/skills/app-router ~/.claude/skills/app-routerRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/davepoon/buildwithclaude /tmp/buildwithclaude && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/buildwithclaude/plugins/nextjs-expert/skills/app-router ~/.gemini/antigravity-cli/skills/app-routerAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
app-router is an agent skill that gives guidance on Next.js App Router file conventions and routing patterns. It covers special files such as page.tsx, layout.tsx, loading.tsx, error.tsx, not-found.tsx, template.tsx and default.tsx, along with folder patterns for dynamic, catch-all, optional catch-all, route group, named slot and private folders.
The skill includes examples for creating pages, dynamic routes, nested and root layouts, loading and error UI, route groups, and static and dynamic metadata. It is meant for use when a user asks to create a Next.js route, add a page, set up layouts, or organize routes. The source notes that the App Router is built on React Server Components.
Written from the project's SKILL.md and checked against it.
What it can do
- Route filesExplains page, layout, loading, error, not-found, template and default files.
- Folder conventionsCovers dynamic, catch-all, optional catch-all, route group, named slot and private folders.
- Dynamic routesShows how to read route parameters through the params prop in a page.
- LayoutsShows a root layout with html and body and nested layouts that keep state.
- Loading and error statesShows loading UI with Suspense and an error boundary with a reset button.
- Route groupsShows how to group routes with layouts without changing the URL structure.
- MetadataShows static metadata and generateMetadata for dynamic pages.
- Key patternsLists colocation, private folders, route groups, parallel routes and intercepting routes.
What you need
- A Next.js project using the App Router
Try asking
- Create a Next.js route for /blog/[slug] with a page that reads the slug
- Set up a nested dashboard layout in my Next.js app with a sidebar
- Add a loading state and an error boundary to my dashboard route
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: plugins/nextjs-expert/skills/app-router/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md5 KB -
examples/dynamic-routes.md7 KB -
examples/parallel-routes.md7 KB -
references/layouts-templates.md6 KB -
references/loading-error-states.md6 KB
Show all 6 files
-
references/routing-conventions.md5 KB
Alternatives to app-router
All alternatives →Creates importable JSON templates for the Obsidian Web Clipper. It is for users who want to clip a site, understand the available variables, or format clipped content.
Harness Creator builds, audits, and improves the instruction and state files that help AI coding agents stay reliable across sessions. It is for developers whose agents forget context, drift out of scope, or claim work is done too early.
Guides an assistant through extracting text from scanned PDFs, photographed pages, and images with OCR. Covers backends, language packs, force-OCR, and performance tuning.
Edits a named local file in place to remove AI-writing patterns, using minimal targeted changes and post-edit verification. Built for users who explicitly ask to clean, rewrite, or humanize that specific file.
Polishes, translates, or tightens existing academic manuscript prose while preserving facts, terminology, and evidence boundaries. Made for researchers revising drafts, including Chinese-to-English translation and LaTeX layout fixes.
Adds PDF form analysis and filling, table extraction, OCR, validation and batch processing to an AI assistant. Aimed at developers who run complex or high-volume PDF workflows.
Compare with obsidian-clipper-template-creator, harness-creator or xberg-extracting-with-ocr
app-router: common questions
What does the app-router skill cover?
It covers file conventions and routing patterns for the Next.js App Router, including special files and folder patterns.
Does it explain layouts and loading states?
Yes. It shows root and nested layouts, loading UI with Suspense, and an error boundary that includes a reset button.
Does it cover dynamic routes and metadata?
Yes. It shows reading route params in a page and using generateMetadata for dynamic pages.
How do I install app-router?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is app-router free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is app-router safe to use?
It scores 88 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to app-router?
Similar skills: obsidian-clipper-template-creator, harness-creator, xberg-extracting-with-ocr, file-edit-in-place.
