Next.js App Router development patterns covering server/client components, data fetching, and routing.
Works with
Server Components are the default; use Client Components only for interactivity (useState, event handlers, forms)
Data fetching belongs in Server Components with three caching strategies: static (build-time), ISR (time-based revalidation), and dynamic (no-store)
File conventions organize routes: page.tsx for UI, layout.tsx for shared structure, loading.tsx and error.tsx for states,
AI-first code editor with Composer
Before installing skills in Cursor, ensure your development environment meets these requirements:
node --versionnextjs-best-practicesExecute the skills CLI command in your project's root directory to begin installation:
Fetches nextjs-best-practices from sickn33/antigravity-awesome-skills and configures it for Cursor.
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Confirm successful installation by checking the skill directory location:
Restart Cursor to activate nextjs-best-practices. Access via /nextjs-best-practices in your agent's command palette.
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
Submit your Claude Code skill and start earning
Automate repetitive workflows and reduce manual effort
Example
Generate reports, summarize documents, draft communications
Save 3-5 hours per week on routine tasks
Learn new skills, understand complex topics, get expert guidance
Example
Explain concepts, provide examples, suggest learning resources
Accelerate learning and skill development by 2x
Enhance output quality through reviews, suggestions, and refinements
Example
Review drafts, suggest improvements, catch errors
Improve work quality by 30-40% with less effort
0
total installs
0
this week
31.1K
GitHub stars
0
upvotes
Run in your terminal
0
installs
0
this week
31.1K
stars
Principles for Next.js App Router development.
Does it need...?
│
├── useState, useEffect, event handlers
│ └── Client Component ('use client')
│
├── Direct data fetching, no interactivity
│ └── Server Component (default)
│
└── Both?
└── Split: Server parent + Client child
| Type | Use |
|---|---|
| Server | Data fetching, layout, static content |
| Client | Forms, buttons, interactive UI |
| Pattern | Use |
|---|---|
| Default | Static (cached at build) |
| Revalidate | ISR (time-based refresh) |
| No-store | Dynamic (every request) |
| Source | Pattern |
|---|---|
| Database | Server Component fetch |
| API | fetch with caching |
| User input | Client state + server action |
| File | Purpose |
|---|---|
page.tsx |
Route UI |
layout.tsx |
Shared layout |
loading.tsx |
Loading state |
error.tsx |
Error boundary |
not-found.tsx |
404 page |
| Pattern | Use |
|---|---|
Route groups (name) |
Organize without URL |
Parallel routes @slot |
Multiple same-level pages |
Intercepting (.) |
Modal overlays |
| Method | Use |
|---|---|
| GET | Read data |
| POST | Create data |
| PUT/PATCH | Update data |
| DELETE | Remove data |
| Type | Use |
|---|---|
| Static export | Fixed metadata |
| generateMetadata | Dynamic per-route |
| Layer | Control |
|---|---|
| Request | fetch options |
| Data | revalidate/tags |
| Full route | route config |
| Method | Use |
|---|---|
| Time-based | revalidate: 60 |
| On-demand | revalidatePath/Tag |
| No cache | no-store |
| ❌ Don't | ✅ Do |
|---|---|
| 'use client' everywhere | Server by default |
| Fetch in client components | Fetch in server |
| Skip loading states | Use loading.tsx |
| Ignore error boundaries | Use error.tsx |
| Large client bundles | Dynamic imports |
app/
├── (marketing)/ # Route group
│ └── page.tsx
├── (dashboard)/
│ ├── layout.tsx # Dashboard layout
│ └── page.tsx
├── api/
│ └── [resource]/
│ └── route.ts
└── components/
└── ui/
Remember: Server Components are the default for a reason. Start there, add client only when needed.
This skill is applicable to execute the workflow or actions described in the overview.
Prerequisites
Time Estimate
15-45 minutes depending on use case complexity
Steps
Common Pitfalls
✓ Do
✗ Don't
💡 Pro Tips
✓ Use when
Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.
✗ Avoid when
Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.
sickn33/antigravity-awesome-skills
asyrafhussin/agent-skills
jwynia/agent-skills
kadajett/agent-nestjs-skills
anthropics/claude-code
mblode/agent-skills
Useful defaults in nextjs-best-practices — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
Registry listing for nextjs-best-practices matched our evaluation — installs cleanly and behaves as described in the markdown.
nextjs-best-practices is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
Solid pick for teams standardizing on skills: nextjs-best-practices is focused, and the summary matches what you get after install.
We added nextjs-best-practices from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
nextjs-best-practices has been reliable in day-to-day use. Documentation quality is above average for community skills.
Useful defaults in nextjs-best-practices — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
nextjs-best-practices is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
We added nextjs-best-practices from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
Registry listing for nextjs-best-practices matched our evaluation — installs cleanly and behaves as described in the markdown.
showing 1-10 of 72