Agent skill
solid-nextjs
SOLID principles for Next.js 16 with modular architecture. Files < 150 lines, interfaces separated, JSDoc mandatory.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/solid-nextjs-fusengine-agents
SKILL.md
SOLID Next.js - Modular Architecture
Current Date (CRITICAL)
Today: January 2026 - ALWAYS use the current year for your searches. Search with "2025" or "2026", NEVER with past years.
MANDATORY: Research Before Coding
CRITICAL: Check today's date first, then search documentation and web BEFORE writing any code.
- Use Context7 to query Next.js/React official documentation
- Use Exa web search with current year for latest trends
- Check Vercel Blog of current year for new features
- Verify package versions for Next.js 16 compatibility
Search queries (replace YYYY with current year):
Next.js [feature] YYYY best practicesReact 19 [component] YYYYTypeScript [pattern] YYYYPrisma 7 [feature] YYYY
Codebase Analysis (MANDATORY)
Before ANY implementation:
- Explore project structure to understand architecture
- Read existing related files to follow established patterns
- Identify naming conventions, coding style, and patterns used
- Understand data flow and dependencies
DRY - Reuse Before Creating (MANDATORY)
Before writing ANY new code:
- Search existing codebase for similar functionality
- Check shared locations:
modules/cores/lib/,modules/cores/components/ - If similar code exists → extend/reuse instead of duplicate
Absolute Rules (MANDATORY)
1. Files < 150 lines
- Split at 90 lines - Never exceed 150
- Page components < 50 lines (use composition)
- Server Components < 80 lines
- Client Components < 60 lines
- Server Actions < 30 lines each
2. Modular Architecture
See references/architecture-patterns.md for complete structure with feature modules and cores directory.
3. JSDoc Mandatory
/**
* 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>
4. Interfaces Separated
modules/auth/src/
├── interfaces/ # Types ONLY
│ ├── user.interface.ts
│ └── session.interface.ts
├── services/ # NO types here
└── components/ # NO types here
SOLID Principles
See references/solid-principles.md for detailed S-O-L-I-D principles with examples.
Code Templates
See references/code-templates.md for Server Components, Client Components, Services, Hooks, and Interfaces.
Response Guidelines
- Research first - MANDATORY: Search Context7 + Exa before ANY code
- Show complete code - Working examples, not snippets
- Explain decisions - Why this pattern over alternatives
- Include tests - Always suggest test cases
- Handle errors - Never ignore, use error boundaries
- Type everything - Full TypeScript, no
any - Document code - JSDoc for complex functions
Forbidden
- ❌ Coding without researching docs first (ALWAYS research)
- ❌ Using outdated APIs without checking current year docs
- ❌ Files > 150 lines
- ❌ Interfaces in component files
- ❌ Business logic in
app/pages - ❌ Direct DB calls in components
- ❌ Module importing another module (except cores)
- ❌
'use client'by default - ❌
useEffectfor data fetching - ❌ Missing JSDoc on exports
- ❌
anytype - ❌ Barrel exports
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?