Skip to content
Back to search

skills

AI agent skills for applying Feature-Sliced Design (FSD) v2.1 in frontend projects.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/feature-sliced--skills/badge.svg)](/listings/feature-sliced--skills)

HTML

<a href="/listings/feature-sliced--skills"><img src="/api/listings/feature-sliced--skills/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

npx skills add feature-sliced/skills

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 121 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. # Feature-Sliced Design: Agent Skills
  2. Agent skills that teach AI coding agents how to apply the [Feature-Sliced Design (FSD)](https://fsd.how) v2.1 methodology.
  3. ## Installation
  4. ```bash
  5. npx skills add feature-sliced/skills
  6. ```
  7. ## Available skills
  8. ### feature-sliced-design
  9. Apply FSD v2.1 principles when structuring frontend projects. The agent learns layer hierarchy, import rules, the decision framework for code placement, and common patterns.
  10. Its bias is pages-first: start with `app/`, `pages/`, and `shared/`, and open a features or entities boundary only when a stable shared responsibility has earned one. Code used in two places does not, by itself, earn a layer.
  11. It follows the official FSD v2.1 documentation but is not a verbatim copy. Where two official guides answer the same question differently, it picks one and says which. Where an integration guide has fallen behind a framework's own docs, it follows the framework. It also folds in recent maintainer guidance so an agent decides consistently across tasks. Passages that depart from a guide say so inline.
  12. **Use when:**
  13. - Setting up or reorganizing a frontend project structure
  14. - Deciding where code belongs across app, pages, features, entities, and shared
  15. - Placing static assets (images, icons, fonts, PDFs) in the right slice or layer
  16. - Grouping closely related slices into slice groups as the project grows
  17. - Deciding where page layouts belong, or whether to use the widgets layer (discouraged)
  18. - Resolving cross-import issues or evaluating the @x pattern
  19. - Deciding whether to create or remove an entity, or whether to skip the entities layer entirely
  20. - Migrating from FSD v2.0 or a non-FSD codebase
  21. - Integrating FSD with Next.js (App Router or Pages Router), React Router, Nuxt, Vite, or Astro
  22. - Implementing auth, API request handling, or state management (Redux, TanStack Query) within FSD
  23. **Examples:**
  24. ```text
  25. Set up FSD project structure with Next.js App Router
  26. ```
  27. ```text
  28. This rule is used on two pages now. Should it become an entity?
  29. ```
  30. ```text
  31. Where should I put auth tokens and session state?
  32. ```
  33. ```text
  34. These two entities need to import from each other. How do I fix this?
  35. ```
  36. ```text
  37. Where should I put hero images for my landing page?
  38. ```
  39. ## Skill structure
  40. ```text
  41. feature-sliced-design/
  42. SKILL.md Core rules and decision framework
  43. references/
  44. layer-structure.md Detailed folder structures per layer (incl. slice groups)
  45. growth-walkthrough.md One shop through four snapshots: which moments earn a layer
  46. asset-handling.md Where to place images, icons, fonts, and other static assets
  47. cross-import-patterns.md Cross-import resolution: 4 strategies for features/widgets, @x for entities
  48. excessive-entities.md Keeping the entities layer clean: when to skip, what to extract
  49. migration-guide.md v2.0→v2.1 and non-FSD migration
  50. framework-integration.md Next.js, React Router, Nuxt, Vite, Astro setup
  51. auth-and-api.md Auth, type definitions, API request handling
  52. state-management.md Redux, TanStack Query (React Query)
  53. evals/
  54. README.md How to grade and maintain the cases
  55. evals.json Placement regression cases
  56. ```
  57. `SKILL.md` is the entry point. It tells the agent to read a reference file only when the task calls for it, so the initial context stays small.
  58. ## Contributing
  59. Run the validator before opening a pull request:
  60. ```bash
  61. node .github/scripts/validate-skills.mjs
  62. ```
  63. It enforces this repository's skill-package rules, which are based in part on the guidance in [vercel-labs/agent-skills](https://github.com/vercel-labs/agent-skills) `AGENTS.md`:
  64. - The `SKILL.md` body stays under 500 lines to keep the initial skill context lightweight. Frontmatter is excluded from the count.
  65. - The frontmatter `name` matches the skill's directory name and is at most 64 characters.
  66. - The frontmatter contains a `description` of at most 1024 characters, the limits from the Agent Skills specification.
  67. - Every `references/<file>.md` path, whether written in `SKILL.md` or in another reference, resolves to an existing file.
  68. - Every file under `references/` is routed from the `Conditional references` section of `SKILL.md`, so a reference that section forgets fails the build instead of shipping unreachable. Naming it elsewhere in the body, or inside a fenced example, does not count. A skill with no such section falls back to requiring a mention anywhere in `SKILL.md`.
  69. - Every numbered cross-reference resolves. `Section N`, `Section N-M`, and `Rule N-M` always mean a numbered heading in `SKILL.md`, whichever file mentions them; `Step N`, `Strategy X`, `Snapshot N`, `Part N`, and `Question N` mean a heading or bold label somewhere in the package.
  70. - A named rule such as "the request placement rule" that is cited from more than one file is a heading or bold label somewhere in the package, so renaming the anchor fails the build instead of stranding its readers.
  71. - Each skill's `evals/evals.json` is valid JSON whose `skill_name` matches the skill directory and whose `evals` array is non-empty; every case has `id`, `prompt`, `expected_output`, a non-empty `assertions` array, `why`, `source`, and `rule`, ids are unique, every `source` path exists, and every `rule` fragment resolves to a passage of the skill (see `feature-sliced-design/evals/README.md`).
  72. The validator has its own tests, which break one thing at a time in a copy of the repository and assert that it is reported:
  73. ```bash
  74. node --test .github/scripts/validate-skills.test.mjs
  75. ```
  76. ### Running the eval cases
  77. Placement cases are defined in `feature-sliced-design/evals/evals.json`. CI validates their format, not answer quality. To grade answers with a judge model, set an OpenAI-compatible API key and run from the repository root:
  78. ```bash
  79. npx agent-skills-eval . --target <model> --judge <model> --baseline
  80. ```
  81. See `feature-sliced-design/evals/README.md` for manual grading and adding cases.
  82. ## References
  83. - [fsd.how](https://fsd.how): FSD official documentation
  84. - [Steiger](https://github.com/feature-sliced/steiger): Official FSD linter
  85. - [skills.sh](https://skills.sh): Agent skills directory
  86. ## License
  87. MIT

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.