Use this skill when:
Works with
AI-first code editor with Composer
Before installing skills in Cursor, ensure your development environment meets these requirements:
node --versionnextjs-dynamic-routes-paramsExecute the skills CLI command in your project's root directory to begin installation:
Fetches nextjs-dynamic-routes-params from wsimmonds/claude-nextjs-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-dynamic-routes-params. Access via /nextjs-dynamic-routes-params 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
82
GitHub stars
0
upvotes
Run in your terminal
0
installs
0
this week
82
stars
Use this skill when:
params prop in page.tsx, layout.tsx, or route.tsLook for requirements that tie data to the URL path.
Create a dynamic segment ([param]) whenever the UI depends on part of the pathname. Typical signals include:
/products/{id}, /blog/{slug})/something/{identifier}✅ Dynamic route response
Requirement: display product information based on whichever ID appears in the URL
Implementation: app/[id]/page.tsx
Access parameter with: const { id } = await params;
❌ Static-page response
Implementation: app/page.tsx ← cannot access per-path identifiers
Example requirements that lead to dynamic routes
app/[id]/page.tsx or app/products/[id]/page.tsxapp/blog/[slug]/page.tsx or app/[slug]/page.tsxapp/docs/[...slug]/page.tsxCore rule: If data varies with a URL segment, the folder name needs matching brackets.
MOST COMMON MISTAKE: Adding unnecessary nesting to routes.
Default Rule: When creating a dynamic route, use app/[id]/page.tsx or app/[slug]/page.tsx unless:
Do NOT infer nesting from resource names:
app/[id]/page.tsx ✅ (not app/products/[id])app/[userId]/page.tsx ✅ (not app/users/[userId])app/[slug]/page.tsx ✅ (not app/blog/[slug])Only nest when explicitly told:
app/blog/[slug]/page.tsx ✅app/products/[id]/page.tsx ✅Next.js uses folder names with square brackets to create dynamic route segments:
app/
├── [id]/page.tsx # Matches /123, /abc, etc.
├── blog/[slug]/page.tsx # Matches /blog/hello-world
├── shop/[category]/[id]/page.tsx # Matches /shop/electronics/123
└── docs/[...slug]/page.tsx # Matches /docs/a, /docs/a/b, /docs/a/b/c
Key Principle: The folder structure IS the route structure.
CRITICAL RULE: Do NOT infer route structure from resource type names!
Just because you're fetching a "product" or "user" doesn't mean you need /products/[id] or /users/[id]. Unless explicitly told otherwise, prefer the simplest structure.
When deciding on route structure:
Top-level dynamic route (app/[id]/page.tsx)
/123 for any resource, /abc-def for slugsNested dynamic route (app/category/[id]/page.tsx)
/products/123, /blog/my-post (when specified)Multi-segment dynamic (app/[cat]/[id]/page.tsx)
/shop/electronics/123⚠️ COMMON MISTAKE: Creating app/products/[id]/page.tsx when you should create app/[id]/page.tsx
❌ WRONG: "Fetch a product by ID" → app/products/[id]/page.tsx
✅ CORRECT: "Fetch a product by ID" → app/[id]/page.tsx
❌ WRONG: "Create a dynamic route for users" → app/users/[userId]/page.tsx
✅ CORRECT: "Create a dynamic route for users" → app/[userId]/page.tsx
Only add the category prefix when:
CRITICAL: In Next.js 15+, params is a Promise and must be awaited!
// ✅ CORRECT - Next.js 15+
export default async function ProductPage({
params,
}: {
params: Promise<{ id: string }>;
}) {
const { id } = await params;
const product = await fetch(`https://api.example.com/products/${id}`)
.then(res => res.json());
return <div>{product.name}</div>;
}
// ❌ WRONG - Treating params as synchronous object (Next.js 15+)
export default async function ProductPage({
params,
}: {
params: { id: string }; // Missing Promise wrapper
}) {
const product = await fetch(`https://api.example.com/products/${params.id}`);
// This will fail because params is a Promise!
}
For Next.js 14 and earlier:
// Next.js 14 - params is synchronous
export default async function ProductPage({
params,
}: {
params: { id: string };
}) {
const product = await fetch(`https://api.example.com/products/${params.id}`)
.then(res => res.json());
return <div>{product.name}</div>;
}
// app/api/products/[id]/route.ts
export async function GET(
request: Request,
{ params }: { params: Promise<{ id: string }> }
) {
const { id } = await params;
const product = await db.products.findById(id);
return Response.json(product);
}
You CANNOT access params directly in Client Components. Instead:
useParams() hook:'use client';
import { useParams } from 'next/navigation';
export function ProductClient() {
const params = useParams<{ id: string }>();
const id = params.id;
// Use the id...
}
// app/products/[id]/page.tsx (Server Component)
export default async function ProductPage({
params,
}: {
params: Promise<{ id: string }>;
}) {
const { id } = await params;
return <ProductClient productId={id} />;
}
// components/ProductClient.tsx
'use client';
export function ProductClient({ productId }: { productId: string }) {
// Use productId...
}
// app/[id]/page.tsx - Top-level dynamic route
interface PageProps {
params: Promise<{ id: string }>;
}
export Implementation Guide
Prerequisites
- ›Claude Desktop or compatible AI client with skill support
- ›Clear understanding of task or problem to solve
- ›Willingness to iterate and refine outputs
Time Estimate
15-45 minutes depending on use case complexity
Steps
- 1Install skill using provided installation command
- 2Test with simple use case relevant to your work
- 3Evaluate output quality and relevance
- 4Iterate on prompts to improve results
- 5Integrate into regular workflow if valuable
Common Pitfalls
- ⚠Expecting perfect results without iteration
- ⚠Not providing enough context in prompts
- ⚠Using skill for tasks outside its intended scope
- ⚠Accepting outputs without review and validation
Best Practices
✓ Do
- +Start with clear, specific prompts
- +Provide relevant context and constraints
- +Review and refine all outputs before using
- +Iterate to improve output quality
- +Document successful prompt patterns
✗ Don't
- −Don't use without understanding skill limitations
- −Don't skip validation of outputs
- −Don't share sensitive information in prompts
- −Don't expect skill to replace human judgment
💡 Pro Tips
- ★Be specific about desired format and style
- ★Ask for multiple options to choose from
- ★Request explanations to understand reasoning
- ★Combine AI efficiency with human expertise
When to Use This
✓ 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.
Learning Path
- 1Familiarize yourself with skill capabilities and limitations
- 2Start with low-risk, non-critical tasks
- 3Progress to more complex and valuable use cases
- 4Build expertise through regular use and experimentation
Related Skills
frontend-design
662anthropics/claude-code
Frontendsame categoryui-animation
242mblode/agent-skills
Frontendsame categorypremium-frontend-ui
236github/awesome-copilot
Frontendsame categoryantigravity-design-expert
209sickn33/antigravity-awesome-skills
Frontendsame categoryhigh-end-visual-design
193leonxlnx/taste-skill
Frontendsame categoryinterior-design-expert
145erichowens/some_claude_skills
Frontendsame categoryReviews
4.5★★★★★49 reviews- KKaira Lopez★★★★★Dec 28, 2024
Useful defaults in nextjs-dynamic-routes-params — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- LLayla Ghosh★★★★★Dec 24, 2024
I recommend nextjs-dynamic-routes-params for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
- RRen Jackson★★★★★Dec 12, 2024
nextjs-dynamic-routes-params fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
- SShikha Mishra★★★★★Dec 8, 2024
nextjs-dynamic-routes-params fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
- YYusuf Chawla★★★★★Dec 8, 2024
Registry listing for nextjs-dynamic-routes-params matched our evaluation — installs cleanly and behaves as described in the markdown.
- LLayla Bansal★★★★★Nov 27, 2024
Useful defaults in nextjs-dynamic-routes-params — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- HHiroshi Kapoor★★★★★Nov 19, 2024
Registry listing for nextjs-dynamic-routes-params matched our evaluation — installs cleanly and behaves as described in the markdown.
- KKofi Sethi★★★★★Nov 15, 2024
nextjs-dynamic-routes-params reduced setup friction for our internal harness; good balance of opinion and flexibility.
- LLayla Gill★★★★★Oct 18, 2024
I recommend nextjs-dynamic-routes-params for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
- IIshan Abbas★★★★★Oct 10, 2024
nextjs-dynamic-routes-params reduced setup friction for our internal harness; good balance of opinion and flexibility.
showing 1-10 of 49
1 / 5Discussion
Comments — not star reviews- No comments yet — start the thread.