feature-slicing

Apply Feature-Sliced Design (FSD) architecture to frontend projects. Use when creating new frontend features, components, pages, or restructuring existing code. Triggers on tasks involving React/Next.js/Vue project organization, layer architecture, feature isolation, module boundaries, or when user mentions FSD, feature slicing, or scalable frontend structure.

16 stars

Best use case

feature-slicing is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Apply Feature-Sliced Design (FSD) architecture to frontend projects. Use when creating new frontend features, components, pages, or restructuring existing code. Triggers on tasks involving React/Next.js/Vue project organization, layer architecture, feature isolation, module boundaries, or when user mentions FSD, feature slicing, or scalable frontend structure.

Teams using feature-slicing should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/feature-slicing/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/development/feature-slicing/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/feature-slicing/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How feature-slicing Compares

Feature / Agentfeature-slicingStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Apply Feature-Sliced Design (FSD) architecture to frontend projects. Use when creating new frontend features, components, pages, or restructuring existing code. Triggers on tasks involving React/Next.js/Vue project organization, layer architecture, feature isolation, module boundaries, or when user mentions FSD, feature slicing, or scalable frontend structure.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# Feature-Sliced Design Architecture

## Overview

Feature-Sliced Design (FSD) is an architectural methodology for scaffolding frontend applications with rules and conventions for organizing code to remain understandable and stable amid changing business requirements.

**Official Documentation:** https://feature-sliced.design/llms.txt

## Core Principles

1. **Layers** - 7 standardized horizontal levels (top to bottom):
   - `app/` → routing, entrypoints, global styles, providers
   - `processes/` → (deprecated) complex cross-page scenarios
   - `pages/` → full pages or nested routing sections
   - `widgets/` → self-contained UI blocks delivering complete use cases
   - `features/` → reused product functionality with business value
   - `entities/` → business domain objects (user, product, order)
   - `shared/` → reusable, project-detached functionality

2. **Import Rule** - Modules can only import from layers strictly below them. Never import sideways or upward.

3. **Slices** - Business-domain partitions within layers (e.g., `user`, `product`, `cart`). Cannot reference other slices at the same layer.

4. **Segments** - Purpose-based groupings within slices:
   - `ui/` → components, formatters, styles
   - `api/` → backend interactions, data types
   - `model/` → schemas, stores, business logic
   - `lib/` → slice-specific utilities
   - `config/` → feature flags, configuration

5. **Public API** - Each slice exposes functionality via `index.ts` barrel file.

## Quick Reference Structure

```
src/
├── app/              # Layer: Application initialization
│   ├── providers/    # Context providers, store setup
│   ├── routes/       # Router configuration
│   └── styles/       # Global styles
├── pages/            # Layer: Route-based screens
│   └── {page-name}/
│       ├── ui/
│       ├── api/
│       └── index.ts  # Public API
├── widgets/          # Layer: Complex reusable blocks
│   └── {widget-name}/
│       ├── ui/
│       └── index.ts
├── features/         # Layer: User interactions
│   └── {feature-name}/
│       ├── ui/
│       ├── api/
│       ├── model/
│       └── index.ts
├── entities/         # Layer: Business entities
│   └── {entity-name}/
│       ├── ui/
│       ├── api/
│       ├── model/
│       └── index.ts
└── shared/           # Layer: Shared infrastructure
    ├── ui/           # UI kit, design system
    ├── api/          # API client, request functions
    ├── lib/          # Utilities (dates, validation)
    ├── config/       # Environment, constants
    └── i18n/         # Internationalization
```

## When Implementing FSD

1. **Creating a new feature**: Place in `features/` if reused across pages, otherwise keep in `pages/`
2. **Creating a new entity**: Place in `entities/` with `ui/`, `api/`, `model/` segments
3. **Creating shared utilities**: Place in `shared/lib/` or `shared/ui/`
4. **Integrating with Next.js**: Place App Router in `src/app/` (no root `app/`), which serves as both routing and FSD app layer

## Reference Documentation

For detailed implementation guidance, consult these reference files:

- **[Layer Details](references/LAYERS.md)** - Complete layer specifications and guidelines
- **[Public API Patterns](references/PUBLIC-API.md)** - Export patterns, barrel files, cross-imports
- **[Implementation Patterns](references/IMPLEMENTATION.md)** - Code examples, entity/feature patterns
- **[Next.js Integration](references/NEXTJS.md)** - App Router and Pages Router setup
- **[Migration Guide](references/MIGRATION.md)** - Migrating existing projects to FSD
- **[Cheatsheet](references/CHEATSHEET.md)** - Quick decision guide and common patterns

## Key Anti-Patterns to Avoid

- Importing from higher layers (breaks unidirectional flow)
- Cross-slice imports at the same layer (use lower layers instead)
- Generic segment names like `components/`, `hooks/`, `types/`
- Wildcard exports (`export * from`) in public APIs
- Storing business logic in `shared/` layer

Related Skills

feature-sliced-design

16
from diegosouzapw/awesome-omni-skill

Apply Feature-Sliced Design (FSD) v2.1 architectural methodology to frontend projects. Use when organizing code structure, decomposing features, creating new components or features, refactoring existing codebases, or when users mention "FSD", "Feature-Sliced", layers, slices, or frontend architecture patterns.

feature-dev

16
from diegosouzapw/awesome-omni-skill

Develop new features from requirements, specifications, or user stories following the full DevinClaw SDLC pipeline. Use this skill when implementing new microservices, API endpoints, UI components, or application features for the enterprise modernized applications, when building from an OpenAPI spec or Figma design, or when executing a complete SDD-to-delivery workflow for any new functionality.

add-feature

16
from diegosouzapw/awesome-omni-skill

Scaffold a new frontend feature module with page, components, API service, and hooks

Clarify Epic/Feature/UserStory/Task ticketing guidance in SKILL

16
from diegosouzapw/awesome-omni-skill

No description provided.

feature

16
from diegosouzapw/awesome-omni-skill

Creates a new feature module with minimal viable structure. Use when bootstrapping a new feature from scratch, scaffolding the Tuist module, Container, Feature entry point, DeepLinkHandler, and initial screen with placeholder Text view. Includes all unit tests, mocks, stubs, and app integration. For adding domain/data layers afterward, use /datasource, /repository, /usecase. For enhancing views, use /view, /viewmodel, /navigator.

Data Engineering Data Driven Feature

16
from diegosouzapw/awesome-omni-skill

World-class data science skill for statistical modeling, experimentation, causal inference, and advanced analytics. Expertise in Python (NumPy, Pandas, Scikit-learn), R, SQL, statistical methods, A/B testing, time series, and business intelligence. Includes experiment design, feature engineering, model evaluation, and stakeholder communication.

implement-feature

16
from diegosouzapw/awesome-omni-skill

Implementa feature nel sistema di fatturazione italiana validando contro normativa fiscale. Usa per aggiungere calcoli IVA, ritenuta d'acconto, split payment, imposta di bollo, gestione fatture PA, regime forfettario, numerazione progressiva, note di credito, o qualsiasi logica che deve rispettare DPR 633/72, DPR 600/73, DPR 642/72. NON usare per bug fix tecnici, refactoring, o modifiche UI senza impatto fiscale.

fullstack-feature

16
from diegosouzapw/awesome-omni-skill

Load PROACTIVELY when task involves building a complete feature across multiple layers. Use when user says "build a feature", "add user profiles", "create a dashboard", or any request spanning database, API, UI, and tests. Orchestrates multi-agent work sequentially: schema and migrations, API endpoints, UI components, tests, and review. The runtime engine handles WRFC chains automatically via <gv> directives. Handles dependency ordering and cross-layer type sharing.

commit-feature

16
from diegosouzapw/awesome-omni-skill

Stage changes, create conventional commit (no co-author), push to origin, and add detailed PR comment with session context

api_feature

16
from diegosouzapw/awesome-omni-skill

Imported skill api_feature from openai

add-feature-hook

16
from diegosouzapw/awesome-omni-skill

Creates TanStack Query hooks for API features with authentication. Use when connecting frontend to backend endpoints, creating data fetching hooks.

Agentic Feature Design

16
from diegosouzapw/awesome-omni-skill

Designing features for the "Action Era" that are AI-accessible by default