AhmadIkbalDjaya

Nextjs Architect — Development skill for Claude Code

Development community

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