Nextjs Architect — Development skill for Claude Code
Agent skill that refactors Next.js/React directories - splits components, extracts hooks and services, optimizes use client boundaries, enforces colocation best practices.
How to install Nextjs Architect
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open AhmadIkbalDjaya/nextjs-architect and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Nextjs Architect does
Agent skill that refactors Next.js/React directories - splits components, extracts hooks and services, optimizes use client boundaries, enforces colocation best practices.
Alternatives in Development
- Web Artifacts Builder — Build complex claude.ai HTML artifacts using React, Tailwind CSS, and shadcn/ui 94.1k ★
- Om Tidy — Self-maintenance pass — acts on every hygiene flag: archives completed work, groups loose clusters, splits ove 4.6k ★
- Stitch React Components — Stitch to React components conversion 2.6k ★
README
Next.js Architect
Agent skill that refactors Next.js and React directories by splitting large components, extracting hooks and services, optimizing `"use client"` boundaries, and enforcing one-component-per-file with colocation best practices.
Built using the open [Agent Skills](https://agentskills.io) format.
Features
- Scans a target directory and inventories all components, hooks, API calls, and their relationships.
- Splits large components into small, focused, single-responsibility components in
_components/. - Groups components with ≥3 exclusive sub-components into dedicated subdirectories inside
_components/. - Extracts stateful logic and side effects into custom hooks in
_hooks/. - Moves API calls into dedicated service files in
_services/. - Extracts shared TypeScript types into
_types/when applicable. - Optimizes
"use client"boundaries — pushes client directives as deep as possible. - Detects shared components used across multiple routes and suggests
_shared/relocation. - Creates barrel exports (
index.ts) for clean imports. - Presents a complete refactor plan and waits for explicit user approval before making changes.
- Verifies the result with type checks, linting, and build validation.
Output Structure
target-directory/
page.tsx
_components/
ComponentA.tsx
ComponentB.tsx
component-c/
index.ts
ComponentC.tsx
SubComponentD.tsx
SubComponentE.tsx
index.ts
_hooks/
useFeatureData.ts
index.ts
_services/
featureApi.ts
index.ts
_types/
feature.types.ts
index.ts
Directories prefixed with `_` are ignored by Next.js App Router routing.
Requirements
- Node.js and npm to install the skill.
- A supported agent: OpenCode, Claude Code, or Codex.
Install
Run from the target project root:
npx skills add AhmadIkbalDjaya/nextjs-architect -a opencode -a claude-code -a codex -y
Install for one agent by specifying only that agent. For example
Related Skills
Claude FastAPI Architect Skill
Claude Code skill for FastAPI backends that picks the right architecture for each project, from prototype to m
Frontloom React
Use this skill for React and Next.js frontend tasks. Enforces idiomatic React patterns including hooks, compon
Optimize Agent Or Skill
Optimizes agent/skill definitions by reducing tokens and clarifying boundaries
Vault Architect
Analyze the vault concept graph and propose structural refactors. Use when topics, relationships, or knowledge
Project Orchestrator
Orchestrates large projects and services — splits the work, assigns roles, keeps memory in docs/project/. Use
Nextjs Clean Skills
Claude Code skills for React + Next.js with hybrid Clean Architecture and TanStack Query
Related Agents
Front Refactorer
Refactors Next.js / React code to the team frontend standards, profile-aware — splits components over 150 line
Nextjs Verifier
Independently verifies a Next.js SDD implementation against acceptance criteria, lint, type checks, tests, bui
Nextjs Build Resolver
Løs byggefeil og runtime-feil i Next.js — use client-grenser, hydration mismatches, Turbopack-spesifikke feil,