Agent skill

Nextjs Architecture

by HoangNguyen0403 in HoangNguyen0403/agent-skills-standard

Structure Next.js projects with Feature-Sliced Design layers, domain-grouped slices, and strict import hierarchy.

MITAuto-check passedFrontend & Design

Install Nextjs Architecture

skills CLI
$ npx skills add HoangNguyen0403/agent-skills-standard --skill nextjs-architecture -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install HoangNguyen0403/agent-skills-standard nextjs-architecture --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/HoangNguyen0403/agent-skills-standard.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/nextjs/nextjs-architecture .claude/skills/nextjs-architecture && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
nextjs-architecture
GitHub stars
572
Token cost
~1k tokens
SKILL.md length
413 words
Files
8 (incl. references)
Skills in repo
211
Repo updated
First seen
Licence
MIT

At a glance

Structure Next.js projects with Feature-Sliced Design layers, domain-grouped slices, and strict import hierarchy.

  • Works in 4 steps: Create feature folder —… → Add public API — Export via… → Wire into page — Import feature widget… → …
  • Organizing features into FSD layers
  • SKILL.md covers Priority: P2 (MEDIUM), Workflow: Create New Feature…, Layer Hierarchy and Strategy, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Nextjs Architecture is an agent skill from HoangNguyen0403/agent-skills-standard. Structure Next.js projects with Feature-Sliced Design layers, domain-grouped slices, and strict import hierarchy. Use when organizing features into FSD layers, enforcing slice boundaries, or keeping page.tsx thin.

Its SKILL.md is about 1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 9 other files, including reference files (for example `evals/evals.json`, `references/BUNDLING.md` and `references/DEBUG_TRICKS.md`).

It sits in Frontend & Design, covering React components. It works with Next.js. The repository describes itself as: A collection of Agent Skills Standard and Best Practice for Programming Languages, Frameworks that help our AI Agent follow best practies on frameworks and programming laguages. The licence is MIT.

When your agent uses it

  • Organizing features into FSD layers
  • Enforcing slice boundaries
  • Keeping page.tsx thin

Example prompts

  • “/nextjs-architecture”

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Create feature folder — src/features/auth/login/ with ui/, model/, api/ segments.
  2. Add public API — Export via src/features/auth/login/index.ts.
  3. Wire into page — Import feature widget in app/login/page.tsx (thin page).
  4. Verify imports — Ensure no upward or cross-slice imports violate layer hierarchy.

What it can do on your machine

Read from SKILL.md and the folder at commit b529c2d. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Nextjs Architecture loads about 1k tokens when it runs, and up to ~3.3k if it reads all its reference files. Until then it costs about 58 tokens; SKILL.md has 413 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~58
When it runs · the whole SKILL.md, loaded when a task matches
~1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from HoangNguyen0403/agent-skills-standard at commit b529c2d, republished under its MIT licence (© HoangNguyen0403). 413 words, ~1,040 tokens.

Download SKILL.mdSave it as .claude/skills/nextjs-architecture/SKILL.md (or your agent's skills folder). This skill also uses 7 other files; get the full folder from GitHub.
name
nextjs-architecture
description
Structure Next.js projects with Feature-Sliced Design layers, domain-grouped slices, and strict import hierarchy. Use when organizing features into FSD layers, enforcing slice boundaries, or keeping page.tsx thin.

Architecture (Feature-Sliced Design)

Priority: P2 (MEDIUM)

Warning: FSD introduces boilerplate. Use it only if project expected to grow significantly (e.g., 20+ features). For smaller projects, simple module-based structure preferred.

Workflow: Create New Feature Slice

  1. Create feature folder — src/features/auth/login/ with ui/, model/, api/ segments.
  2. Add public API — Export via src/features/auth/login/index.ts.
  3. Wire into page — Import feature widget in app/login/page.tsx (thin page).
  4. Verify imports — Ensure no upward or cross-slice imports violate layer hierarchy.

Layer Hierarchy

App (app/) -> Widgets -> Features -> Entities -> Shared

See implementation examples for thin page example.

Strategy

  1. RSC Boundaries: Enforce strict serialization rules for props passed from Server to Client. See RSC Boundaries & Serialization.
  2. App Layer Thin: app/ directory (App Router) only for Routing.
  • Rule: page.tsx should only import Widgets/Features. No business logic (useEffect, fetch) directly in pages.
  1. Slices over Types: Group code by Business Domain (User, Product, Cart), not by File Type (Components, Hooks, Utils).
  • Bad: src/components/LoginForm.tsx, src/hooks/useLogin.ts
  • Good: src/features/auth/login/ containing both.
  1. Layer Hierarchy: Code can only import from layers below it.
  • App -> Widgets -> Features -> Entities -> Shared.
  1. Avoid Excessive Entities: not preemptively create Entities.
  • Rule: Start logic in Features or Pages. Move to Entities only when data/logic strictly reused across multiple differing features.
  • Rule: Simple CRUD belongs in shared/api, not entities.
  1. Standard Segments: Use standard segment names within slices.
  • ui (Components), model (State/actions), api (Data fetching), lib (Helpers), config (Constants).
  • Avoid: components, hooks, services as segment names.
Show full SKILL.md (176 more words)Show less

Structure Reference

For specific directory layout and layer definitions, see reference documentation.

Architecture Checklist (Mandatory)

  • Layer Imports: any layer import from layer ABOVE it? (App > Widgets > Features > Entities > Shared)

  • Page Logic: page.tsx thin, containing only Widgets/Features and zero useEffect/fetch?

  • RSC Boundaries: Server Components isolated from Client Components with proper 'use client' boundaries?

  • Public API: all access to slice performed via top-level index.ts (public API)?

  • Cross-Slice: slices within same layer (e.g., two features) import from each other directly? (Prohibited)

  • Server Actions: Place them in model/ folder of Feature (e.g., features/auth/model/actions.ts).

  • Data Access (DAL): Place logic in model/ folder of Entity (e.g., entities/user/model/dal.ts).

  • UI Components: Base UI (shadcn) belongs in shared/ui. Feature-specific UI belongs in features/*/ui.

Anti-Patterns

  • No cross-slice imports: Slices in same layer must not import from each other directly.
  • No business logic in page.tsx: Pages import Widgets/Features only; zero useEffect/fetch.
  • No file-type folders: Group by domain (features/auth/), not type (components/, hooks/).
  • No premature Entity creation: Start in Features; move to Entities only on strict reuse.

© HoangNguyen0403, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 7 other files (references) in skills/nextjs/nextjs-architecture of HoangNguyen0403/agent-skills-standard.

  • SKILL.md
  • evals/evals.json
  • references/BUNDLING.md
  • references/DEBUG_TRICKS.md
  • references/RSC_BOUNDARIES.md
  • references/RUNTIME_SELECTION.md
  • references/fsd-structure.md
  • references/implementation.md

Open the folder on GitHubat commit b529c2d

Compare with similar skills

Nextjs Architecture next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Nextjs Architecture compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Nextjs Architecture this skillHoangNguyen0403/agent-skills-standard572—~1kAutomated safety check: PassMIT
React View Transitions Guidevercel-labs/next-beats16811 repos~3.1kAutomated safety check: PassMIT
Chakra UI v3 Builderchakra-ui/chakra-ui41k—~3.1kAutomated safety check: PassMIT
Vercel React Best Practicessanity-io/sanity6.4k129 repos~1.6kAutomated safety check: PassMIT
Chakra UI v2 to v3 Migrationchakra-ui/chakra-ui41k—~3.4kAutomated safety check: PassMIT
Creative Tim UI Blockscreativetimofficial/ui12k—~2.1kAutomated safety check: NotesMIT

Similar skills

  • React View Transitions Guide

    vercel-labs/next-beats

    Official

    Guides implementing animated page and state transitions in React with the native View Transition API, covering shared elements, list reorders and directional navigation.

    168 GitHub starsUsed in 11 repos~3.1k tokens
    Frontend & DesignAuto-check passed
  • Chakra UI v3 Builder

    chakra-ui/chakra-ui

    Builds responsive, accessible Chakra UI v3 components and layouts, sets up Chakra in new or existing projects, and designs themes with tokens, semantic tokens and recipes.

    41k GitHub stars~3.1k tokensUpdated 4 days ago
    Frontend & DesignAuto-check passed
  • Official

    React and Next.js performance optimization guidelines from Vercel Engineering.

    6.4k GitHub starsUsed in 129 repos~1.6k tokens
    Frontend & DesignAuto-check passed
  • Chakra UI v2 to v3 Migration

    chakra-ui/chakra-ui

    Guides an upgrade from Chakra UI v2 to v3: inspect the project, swap packages, run the official codemod, then fix provider, color mode, props, theming and Next.js code.

    41k GitHub stars~3.4k tokensUpdated 4 days ago
    Frontend & DesignAuto-check passed
  • Creative Tim UI Blocks

    creativetimofficial/ui

    Helps install, generate and review Creative Tim UI blocks: shadcn/ui-based React and Tailwind sections that follow a restrained, production-minded design philosophy.

    12k GitHub stars~2.1k tokensUpdated 7 mo ago
    Frontend & DesignAuto-check: notes
  • GSAP for React

    greensock/gsap-skills

    Shows how to run GSAP animations in React and Next.js with the useGSAP hook, refs, scoped selectors and automatic cleanup on unmount.

    16k GitHub starsUsed in 3 repos~1.6k tokens
    Frontend & DesignAuto-check passed

More from HoangNguyen0403/agent-skills-standard

All 211 skills in this repo
  • Subagent-Driven Development

    HoangNguyen0403/agent-skills-standard

    Runs a multi-task implementation plan by sending each task to a fresh implementer subagent, reviewing it independently, then reviewing the whole branch.

    572 GitHub stars~1.3k tokensUpdated yesterday
    Auto-check passed
  • draw.io Architecture Diagramming

    HoangNguyen0403/agent-skills-standard

    Draws architecture diagrams as editable draw.io files from a JSON spec, with a fixed house style, one C4 level per diagram and evidence-tagged shapes.

    572 GitHub stars~1.3k tokensUpdated yesterday
    Auto-check passed
  • Android Navigation 3 Guide

    HoangNguyen0403/agent-skills-standard

    Implements and migrates to Jetpack Navigation 3 in Compose: NavDisplay, typed route objects, a state-list back stack, deep links, multiple back stacks and dialog scenes.

    572 GitHub stars~687 tokensUpdated yesterday
    Auto-check passed
  • Angular HttpClient Standards

    HoangNguyen0403/agent-skills-standard

    Sets rules for Angular HTTP code: functional interceptors, typed requests, services that own every call, and httpResource for reactive data loading in Angular 17+.

    572 GitHub stars~652 tokensUpdated yesterday
    Auto-check passed
  • Angular Tooling

    HoangNguyen0403/agent-skills-standard

    Angular CLI usage, code generation, build configuration, and bundle optimization.

    572 GitHub stars~743 tokensUpdated yesterday
    Auto-check passed
  • Common Code Review

    HoangNguyen0403/agent-skills-standard

    Conduct high-quality, persona-driven code reviews. An agent skill from HoangNguyen0403/agent-skills-standard.

    572 GitHub stars~772 tokensUpdated yesterday
    Auto-check passed

Works with

Questions about Nextjs Architecture

What does Nextjs Architecture do?

Structure Next.js projects with Feature-Sliced Design layers, domain-grouped slices, and strict import hierarchy. Nextjs Architecture is an agent skill from HoangNguyen0403/agent-skills-standard.js projects with Feature-Sliced Design layers, domain-grouped slices, and strict import hierarchy.

When should I use Nextjs Architecture?

Nextjs Architecture fits situations like: organizing features into FSD layers; enforcing slice boundaries; keeping page.tsx thin.

How do I install Nextjs Architecture in Claude Code?

Run `npx skills add HoangNguyen0403/agent-skills-standard --skill nextjs-architecture -a claude-code`. Or copy the skill folder (skills/nextjs/nextjs-architecture in HoangNguyen0403/agent-skills-standard) into .claude/skills/nextjs-architecture in your project. Claude Code loads it when a task matches its description.

How do I install Nextjs Architecture in Codex?

Run `npx skills add HoangNguyen0403/agent-skills-standard --skill nextjs-architecture -a codex`. Or copy the skill folder (skills/nextjs/nextjs-architecture in HoangNguyen0403/agent-skills-standard) into .agents/skills/nextjs-architecture in your project. Codex loads it when a task matches its description.

Can I use Nextjs Architecture in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add HoangNguyen0403/agent-skills-standard --skill nextjs-architecture -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/nextjs-architecture, .gemini/skills/nextjs-architecture, .github/skills/nextjs-architecture and .opencode/skills/nextjs-architecture in your project.

What does Nextjs Architecture need to run?

SKILL.md names no scripts, command-line tools or credentials: Nextjs Architecture is instructions for the agent only.

Does Nextjs Architecture access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Nextjs Architecture safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Nextjs Architecture use?

Nextjs Architecture is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Nextjs Architecture use?

About 1k tokens (SKILL.md is roughly 4.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.2k tokens, read only when the agent opens those files.

What are the alternatives to Nextjs Architecture?

Skills that share tags, products or a category with Nextjs Architecture: React View Transitions Guide (vercel-labs/next-beats, 168 stars), Chakra UI v3 Builder (chakra-ui/chakra-ui, 41k stars), Vercel React Best Practices (sanity-io/sanity, 6.4k stars) and Chakra UI v2 to v3 Migration (chakra-ui/chakra-ui, 41k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Nextjs Architecture?

HoangNguyen0403 (a GitHub user) maintains it in HoangNguyen0403/agent-skills-standard, which has 572 GitHub stars. The repository holds 211 skills in this directory. The repository was last updated on October 9, 2026.

Source: HoangNguyen0403/agent-skills-standard on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.