/app-dev:audit [--focus routing|components|performance|all]from app-dev
Audit a Next.js project for common issues, anti-patterns, and misconfigurations
Ships in app-dev. Installing the plugin adds it to Claude Code.
Scan a Next.js project for common issues, anti-patterns, and misconfigurations.
Load the nextjs-expert skill for App Router patterns and security best practices.
/audit [--focus routing|components|performance|all]
Parse $ARGUMENTS to extract:
all)
routing — Route structure, missing error/loading boundaries, middleware issuescomponents — Client/server component misuse, missing use client, prop drillingperformance — Bundle size, unoptimized images, unnecessary client-side JSall — Run everythingcat package.json | grep -E '"next"'
ls app/ 2>/dev/null && echo "App Router"
ls pages/ 2>/dev/null && echo "Pages Router"
ls next.config.* 2>/dev/null
App Router:
error.tsx boundaries in route segmentsloading.tsx where data fetching occursnot-found.tsx at the rootlayout.tsx exists at the root(group) organizationgenerateStaticParams is used for dynamic routes that could be staticPages Router:
_app.tsx, _document.tsx, _error.tsxgetStaticProps vs getServerSideProps usage (prefer static when possible)getStaticPaths on dynamic routesSearch for:
'use client' — Components using hooks (useState, useEffect, useRef) without the directive'use client' — Components marked client that don't need to be (no hooks, no browser APIs)fetch() calls in server components without proper caching directives'use client' that import heavy libraries (could split)document. or window. without proper guardsCheck for:
<img> tags instead of next/image<link> instead of next/fontnext/dynamicgenerateMetadata or metadata exportoutput: 'standalone' for Docker, missing image domainsNEXT_PUBLIC_ vars leaking to client)## Next.js Audit Report
### Project
| Field | Value |
|-------|-------|
| Next.js Version | X.X.X |
| Router | App Router / Pages Router |
| TypeScript | Yes/No |
### Summary
| Category | Issues | Critical | Warning | Info |
|----------|--------|----------|---------|------|
| Routing | X | X | X | X |
| Components | X | X | X | X |
| Performance | X | X | X | X |
| Security | X | X | X | X |
### Critical Issues
[List with file paths and specific fixes]
### Warnings
[List with recommendations]
### Quick Wins
[Easy fixes that improve quality immediately]
What the command file sets; muted values are Claude Code's defaults
7-day visitors to each command page
11 commands in this plugin
/auth-auditAuth AuditAudit authentication and authorization implementation for security issues/db-auditDatabase AuditAudit database schema and queries for performance and design issues/docsAPI DocsGenerate or update OpenAPI spec from existing API routes/knipKnip — Dead Code CleanupFind and clean up unused files, dependencies, exports, and types with knip/migrateDatabase MigrateGenerate database migration files for schema changes/perfNext.js PerformanceAnalyze Next.js bundle size and performance bottlenecksapp-dev@iwritec0de-plugins is listed by iwritec0de/claude-plugin-marketplace — review the source before installing
npx claudepluginhub iwritec0de/claude-plugin-marketplace --plugin app-devOther plugins' commands for the same job