plugins/nextjs-expert/skills/solid-nextjs/SKILL.md
This skill should be used when the user asks about "SOLID principles", "Next.js architecture", "modular structure", "code organization", "file size limits", "interface separation", or "JSDoc documentation". Enforces files < 100 lines with mandatory JSDoc and separated interfaces.
npx skillsauth add fusengine/agents solid-nextjsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Today: January 2026 - ALWAYS use the current year for your searches. Search with "2025" or "2026", NEVER with past years.
CRITICAL: Check today's date first, then search documentation and web BEFORE writing any code.
Search queries (replace YYYY with current year):
Next.js [feature] YYYY best practicesReact 19 [component] YYYYTypeScript [pattern] YYYYPrisma 7 [feature] YYYYBefore ANY implementation:
Before writing ANY new code:
modules/cores/lib/, modules/cores/components/, modules/cores/hooks/modules/cores/ directlynpx jscpd ./src --threshold 3 after creating new filesBefore ANY implementation, use TeamCreate to spawn 3 agents:
After implementation, run fuse-ai-pilot:sniper for validation.
See references/architecture-patterns.md for complete structure with feature modules and cores directory.
/**
* Fetch user by ID from database.
*
* @param id - User unique identifier
* @returns User object or null if not found
* @throws DatabaseError on connection failure
*/
export async function getUserById(id: string): Promise<User | null>
modules/auth/src/
├── interfaces/ # Types ONLY
│ ├── user.interface.ts
│ └── session.interface.ts
├── services/ # NO types here
└── components/ # NO types here
Each SOLID principle has a dedicated reference guide:
references/single-responsibility.md - One class/function = one reason to change
references/open-closed.md - Extend via composition, not modification
references/liskov-substitution.md - Contract compliance & behavioral subtyping
references/interface-segregation.md - Many focused interfaces beat one fat interface
references/dependency-inversion.md - Depend on abstractions, not implementations
See references/solid-principles.md for overview and quick reference.
Ready-to-copy code in references/templates/:
| Template | Usage |
|----------|-------|
| server-component.md | Server Component with data fetching |
| client-component.md | Client Component with hooks |
| service.md | Service with dependency injection |
| hook.md | React hook with state |
| interface.md | TypeScript interfaces |
| store.md | Zustand store with persistence |
| action.md | Server Action with validation |
| api-route.md | API Route Handler |
| validator.md | Zod validation schemas |
| factory.md | Factory pattern |
| adapter.md | Adapter pattern |
| error.md | Custom error classes |
| test.md | Test templates |
| middleware.md | Auth middleware |
| prisma.md | Prisma singleton |
| i18n.md | Feature/global translations |
| query.md | Database queries (Prisma 7) |
anyapp/ pages'use client' by defaultuseEffect for data fetchingany typedevelopment
Use when optimizing entity-based / semantic SEO 2026. Covers entity maps, Google Knowledge Graph resolution, salience scoring, passage-level ranking, about/sameAs/knowsAbout schema, Cloud Natural Language API validation.
development
Use when running SEO, GEO, schema, Core Web Vitals, sitemap, hreflang, E-E-A-T, AI Overviews, technical SEO, or structured data tasks. Covers full-site audits, single-page analysis, schema markup, content quality, AI search optimization, local SEO, sitemap/robots, internal linking, semantic clustering, and search experience.
development
Use when optimizing search experience (SXO). Covers intent matching, user personas, user stories, page-type analysis, dwell time, scroll depth, pogo-sticking prevention.
development
Use when optimizing local SEO. Covers Google Business Profile, NAP consistency, citations, reviews acquisition, Local Pack ranking, location pages, LocalBusiness schema.