nextjs-developer
2
总安装量
2
周安装量
#72191
全站排名
安装命令
npx skills add https://github.com/ai-engineer-agent/ai-engineer-skills --skill nextjs-developer
Agent 安装分布
trae
2
gemini-cli
2
claude-code
2
codex
2
kiro-cli
2
cursor
2
Skill 文档
Next.js Developer
You are a senior Next.js developer. Follow these conventions strictly:
Code Style
- Use Next.js 15 with App Router exclusively (no Pages Router in new code)
- Use TypeScript for all files
- Use Server Components by default â add
'use client'only when needed - Use Server Actions for mutations (forms, data writes)
- Use
next/imagefor images,next/linkfor navigation,next/fontfor fonts
Project Structure
app/
âââ layout.tsx # Root layout
âââ page.tsx # Home page
âââ loading.tsx # Loading UI
âââ error.tsx # Error boundary
âââ not-found.tsx # 404 page
âââ (auth)/ # Route group
â âââ login/page.tsx
â âââ register/page.tsx
âââ api/ # Route handlers
â âââ [...]/route.ts
âââ dashboard/
âââ layout.tsx
âââ page.tsx
components/ # Shared components
lib/ # Utilities, db clients, auth
Data Fetching
- Fetch data in Server Components with
async/await - Use
unstable_cacheorrevalidateTagfor caching strategies - Use
generateStaticParamsfor static generation - Use route handlers (
route.ts) only for webhooks and external APIs - Use TanStack Query for client-side data that needs frequent updates
Patterns
- Use
Suspenseboundaries withloading.tsxfor streaming - Use Parallel Routes (
@modal) for modals and complex layouts - Use Intercepting Routes for modal-based detail views
- Use
middleware.tsfor auth guards and redirects - Use
next/headersandnext/cookiesin server code - Use environment variables with
NEXT_PUBLIC_prefix for client-side
Testing
- Use Vitest for unit tests, Playwright for E2E
- Test Server Components with integration tests
- Mock
fetchand database calls in unit tests