Help us improve
Share bugs, ideas, or general feedback.
Coordinates a team of AI agents (Architecture, Implementation, etc.) to plan, build, test, and ship production-ready Next.js applications end-to-end.
npx claudepluginhub frankxai/claude-skills-library --plugin claude-skills-libraryHow this skill is triggered — by the user, by Claude, or both
Slash command
/claude-skills-library:nextjs-agent-teamThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
**Version:** 1.0
Provides Next.js 16 expertise covering App Router, server/client components, data caching, and production gotchas like async params and route collisions.
Builds Next.js 14+ App Router applications with server components, actions, data fetching, streaming SSR, SEO metadata, loading/error boundaries, and Vercel deployment.
Senior Next.js 14+ specialist for App Router, server components, server actions, data fetching, SEO with generateMetadata, streaming SSR, loading/error boundaries, and Vercel deployment.
Share bugs, ideas, or general feedback.
Version: 1.0 Author: FrankX AI Systems Last Updated: 2025-10-24
A specialized team of AI agents for comprehensive Next.js development. Each agent has specific expertise and works together to deliver production-ready Next.js applications.
Role: System design and structure Expertise:
Activation Triggers:
Workflow:
Example Output:
Project Architecture Plan
========================
1. Route Structure:
app/
├── (marketing)/
│ ├── page.tsx (landing)
│ └── about/page.tsx
├── (dashboard)/
│ ├── layout.tsx (auth wrapper)
│ ├── page.tsx (dashboard home)
│ └── settings/page.tsx
└── api/
└── posts/route.ts
2. Component Boundaries:
- Server: Data fetching, layouts, static content
- Client: Forms, interactive widgets, real-time updates
3. Data Strategy:
- ISR with 1hr revalidation for blog posts
- Dynamic rendering for user dashboard
- Cached static content for marketing pages
Role: Code generation and feature development Expertise:
Activation Triggers:
Workflow:
Example Output:
// Server Component with data fetching
async function PostList() {
const posts = await fetch('https://api.example.com/posts', {
next: { revalidate: 3600 }
}).then(r => r.json())
return (
<div>
{posts.map(post => (
<PostCard key={post.id} post={post} />
))}
</div>
)
}
// Server Action for mutations
'use server'
async function createPost(data: FormData) {
const title = data.get('title')
// Implementation...
revalidatePath('/posts')
}
Role: Styling and user experience Expertise:
Activation Triggers:
Workflow:
Example Output:
// Accessible, styled component with dark mode
export function Card({ title, children }: CardProps) {
return (
<div className="
bg-white dark:bg-gray-800
rounded-lg shadow-md
p-6 md:p-8
transition-colors duration-200
hover:shadow-lg
focus-within:ring-2 focus-within:ring-blue-500
">
<h2 className="
text-2xl font-bold
text-gray-900 dark:text-white
mb-4
">
{title}
</h2>
<div className="text-gray-700 dark:text-gray-300">
{children}
</div>
</div>
)
}
Role: Optimization and speed Expertise:
Activation Triggers:
Workflow:
Example Analysis:
Performance Audit
=================
Current Issues:
❌ LCP: 3.2s (Target: <2.5s)
❌ Unoptimized images (400KB+)
❌ Blocking fonts
✅ FID: 45ms (Good)
Optimizations:
1. Convert images to WebP with next/image
2. Add priority to hero image
3. Use next/font for font optimization
4. Lazy load below-fold components
5. Enable Partial Prerendering
Expected Impact:
✅ LCP: ~1.8s (-44%)
✅ Bundle size: -200KB
✅ First paint: -600ms
Role: Security and data protection Expertise:
Activation Triggers:
Workflow:
Example Implementation:
// Secure Server Action with validation
'use server'
import { z } from 'zod'
import { auth } from '@/lib/auth'
import { revalidatePath } from 'next/cache'
const postSchema = z.object({
title: z.string().min(1).max(200),
content: z.string().min(10),
})
export async function createPost(formData: FormData) {
// 1. Authenticate
const session = await auth()
if (!session) {
throw new Error('Unauthorized')
}
// 2. Validate input
const data = postSchema.parse({
title: formData.get('title'),
content: formData.get('content'),
})
// 3. Authorize
if (!session.user.canCreatePost) {
throw new Error('Forbidden')
}
// 4. Execute
const post = await db.post.create({
data: {
...data,
authorId: session.user.id,
},
})
// 5. Revalidate
revalidatePath('/posts')
return { success: true, post }
}
Role: Quality assurance and testing Expertise:
Activation Triggers:
Workflow:
Example Tests:
// Testing Server Component
import { render, screen } from '@testing-library/react'
import PostList from './PostList'
jest.mock('./actions', () => ({
getPosts: jest.fn().mockResolvedValue([
{ id: 1, title: 'Test Post' }
])
}))
describe('PostList', () => {
it('renders posts', async () => {
render(await PostList())
expect(screen.getByText('Test Post')).toBeInTheDocument()
})
})
// Testing Server Action
import { createPost } from './actions'
describe('createPost', () => {
it('creates post with valid data', async () => {
const formData = new FormData()
formData.append('title', 'New Post')
formData.append('content', 'Test content')
const result = await createPost(formData)
expect(result.success).toBe(true)
})
it('throws on invalid data', async () => {
const formData = new FormData()
formData.append('title', '')
await expect(createPost(formData)).rejects.toThrow()
})
})
Role: Documentation and knowledge sharing Expertise:
Activation Triggers:
Workflow:
Example Documentation:
# Post Management System
## Architecture
This system uses Next.js 16 Server Components and Server Actions for
optimal performance.
## Components
### PostList
Server Component that fetches and displays posts.
**Props:** None
**Data Source:** `/api/posts`
**Caching:** ISR with 1 hour revalidation
### PostForm
Client Component for creating new posts.
**Props:**
- `onSuccess?: () => void` - Callback after successful submission
**Server Action:** `createPost`
## API Routes
### GET /api/posts
Retrieves all published posts.
**Response:**
```json
{
"posts": [
{ "id": 1, "title": "...", "content": "..." }
]
}
npm install.envnpm run db:migratenpm run dev
---
## Team Collaboration Patterns
### Pattern 1: New Feature Development
User Request → Architecture Agent (design) → Implementation Agent (code) → UI/UX Agent (style) → Security Agent (secure) → Testing Agent (verify) → Documentation Agent (document)
### Pattern 2: Performance Optimization
User Request → Performance Agent (audit) → Architecture Agent (redesign if needed) → Implementation Agent (refactor) → Testing Agent (verify improvements)
### Pattern 3: Bug Fix
Bug Report → Built-in MCP (inspect runtime) → Implementation Agent (fix) → Testing Agent (prevent regression)
### Pattern 4: Security Audit
Audit Request → Security Agent (scan) → Implementation Agent (fix issues) → Testing Agent (verify) → Documentation Agent (update security docs)
## Activation Protocol
When this skill is activated, identify which agent(s) are needed based on user request:
1. **Single Agent Tasks:**
- Directly activate the appropriate agent
- Agent follows its workflow
- Reports back to user
2. **Multi-Agent Tasks:**
- Activate agents in sequence
- Each agent builds on previous work
- Final synthesis and delivery
3. **Complex Projects:**
- Architecture Agent creates plan
- Other agents implement in parallel where possible
- Integration and testing at end
## Agent Communication
Agents share context through:
- Architecture decisions
- Code implementations
- Test results
- Documentation updates
Each agent can:
- Query next-devtools-mcp for guidance
- Inspect via built-in MCP (if dev server running)
- Build upon previous agent work
- Flag issues for other agents
## Usage Examples
**Example 1: Build a blog**
User: "Build a blog with authentication"
Agents Activated:
**Example 2: Optimize existing site**
User: "My site is slow, optimize it"
Agents Activated:
**Example 3: Secure API**
User: "Secure my API endpoints"
Agents Activated:
## Best Practices
1. **Always Start with Architecture**
- Prevents rework
- Ensures scalability
- Aligns team on approach
2. **Security by Default**
- Security Agent reviews all Server Actions
- Validation on all inputs
- Auth checks on protected routes
3. **Performance First**
- Performance Agent monitors metrics
- Server Components by default
- Optimize as you build
4. **Test Everything**
- Testing Agent runs continuously
- High coverage for critical paths
- E2E tests for user flows
5. **Document as You Go**
- Documentation Agent works alongside development
- Keep docs in sync with code
- Self-documenting code with TypeScript
## Integration with MCP Servers
All agents leverage:
- **next-devtools-mcp:** For documentation and best practices
- **Built-in Next.js MCP:** For runtime insights (when dev server running)
Agents automatically:
- Query MCPs for guidance
- Monitor application state
- Verify implementations match best practices
- Debug with real-time insights
---
This agent team system provides comprehensive Next.js development capabilities, from initial architecture through deployment and maintenance.