# feature-sliced-design

This skill helps organize frontend code with Feature-Sliced Design and check import boundaries. Use it when creating or migrating a project.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 23600 installs · ★ 112
- Author: feature-sliced
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/feature-sliced/skills/tree/HEAD/feature-sliced-design/SKILL.md
- Updated: 2026-10-11
- HTML: https://affpapa.org/en/nevibecode/skills/feature-sliced-design

## What it does

The skill applies Feature-Sliced Design v2.1 to frontend projects. It helps decide where code, static assets, and logic belong, when to extract `features` or `entities`, and when to keep code in `pages`. It also covers public APIs, import boundaries, cross-imports, and the `@x` pattern.

Its guidance includes a decision tree, a placement table, and structure checks. The covered integrations include `Next.js App Router`, `Next.js Pages Router`, `React Router`, `Nuxt`, `Vite`, and `Astro`; it also discusses authentication, APIs, `Redux`, and `TanStack Query`. The `widgets` layer is allowed but discouraged. That is a reason to check whether a composition belongs in `pages`, `features`, `shared`, or `app`.

The skill is available for `Claude Code`, `Codex`, `Cursor`, `GitHub Copilot`, `Gemini CLI`, and `OpenCode`. Installing it in `Claude Code` requires `npx`.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add feature-sliced/skills --skill feature-sliced-design -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/feature-sliced-design/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/feature-sliced-design/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add feature-sliced/skills --skill feature-sliced-design -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/feature-sliced-design/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add feature-sliced/skills --skill feature-sliced-design -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/feature-sliced-design/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install feature-sliced/skills feature-sliced-design
```

2. **Manually: put the files in place**
- File: `.github/skills/feature-sliced-design/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add feature-sliced/skills --skill feature-sliced-design -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/feature-sliced/skills --path feature-sliced-design
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/feature-sliced-design/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add feature-sliced/skills --skill feature-sliced-design -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/feature-sliced/skills/tree/HEAD/feature-sliced-design/SKILL.md

## When to use it
- map code to FSD layers
- choose a location for a component or API request
- check import boundaries between layers
- migrate a project from FSD v2.0 or another structure

## Example prompts
- Apply Feature-Sliced Design v2.1 and decide where the new profile component belongs.
- Check this project for FSD import violations and suggest focused fixes.
- Migrate this project to FSD and explain what should stay in `pages` and what should move to `features` or `entities`.

## Similar
- [feature-arch](https://affpapa.org/en/nevibecode/skills/feature-arch.md) — skill · 473 installs
- [adding-feature-flags](https://affpapa.org/en/nevibecode/skills/adding-feature-flags.md) — skill · 361 installs
- [react-patterns](https://affpapa.org/en/nevibecode/skills/affaan-m-react-patterns.md) — skill · 4900 installs
- [react-nextjs-patterns](https://affpapa.org/en/nevibecode/skills/react-nextjs-patterns.md) — skill · 1100 installs
- [ai-ui-patterns](https://affpapa.org/en/nevibecode/skills/ai-ui-patterns.md) — skill · 2000 installs
- [react-2026](https://affpapa.org/en/nevibecode/skills/react-2026.md) — skill · 1900 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
