{
  "markdown": "# Feature-Sliced Design: Agent Skills\n\nAgent skills that teach AI coding agents how to apply the [Feature-Sliced Design (FSD)](https://fsd.how) v2.1 methodology.\n\n## Installation\n\n```bash\nnpx skills add feature-sliced/skills\n```\n\n## Available skills\n\n### feature-sliced-design\n\nApply FSD v2.1 principles when structuring frontend projects. The agent learns layer hierarchy, import rules, the decision framework for code placement, and common patterns.\n\nIts 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.\n\nIt 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.\n\n**Use when:**\n\n- Setting up or reorganizing a frontend project structure\n- Deciding where code belongs across app, pages, features, entities, and shared\n- Placing static assets (images, icons, fonts, PDFs) in the right slice or layer\n- Grouping closely related slices into slice groups as the project grows\n- Deciding where page layouts belong, or whether to use the widgets layer (discouraged)\n- Resolving cross-import issues or evaluating the @x pattern\n- Deciding whether to create or remove an entity, or whether to skip the entities layer entirely\n- Migrating from FSD v2.0 or a non-FSD codebase\n- Integrating FSD with Next.js (App Router or Pages Router), React Router, Nuxt, Vite, or Astro\n- Implementing auth, API request handling, or state management (Redux, TanStack Query) within FSD\n\n**Examples:**\n\n```text\nSet up FSD project structure with Next.js App Router\n```\n\n```text\nThis rule is used on two pages now. Should it become an entity?\n```\n\n```text\nWhere should I put auth tokens and session state?\n```\n\n```text\nThese two entities need to import from each other. How do I fix this?\n```\n\n```text\nWhere should I put hero images for my landing page?\n```\n\n## Skill structure\n\n```text\nfeature-sliced-design/\n  SKILL.md                         Core rules and decision framework\n  references/\n    layer-structure.md             Detailed folder structures per layer (incl. slice groups)\n    growth-walkthrough.md          One shop through four snapshots: which moments earn a layer\n    asset-handling.md              Where to place images, icons, fonts, and other static assets\n    cross-import-patterns.md       Cross-import resolution: 4 strategies for features/widgets, @x for entities\n    excessive-entities.md          Keeping the entities layer clean: when to skip, what to extract\n    migration-guide.md             v2.0→v2.1 and non-FSD migration\n    framework-integration.md       Next.js, React Router, Nuxt, Vite, Astro setup\n    auth-and-api.md                Auth, type definitions, API request handling\n    state-management.md            Redux, TanStack Query (React Query)\n\nevals/\n  README.md                        How to run and maintain the cases\n  cases.json                       Placement regression cases\n```\n\n`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.\n\n## Contributing\n\nRun the validator before opening a pull request:\n\n```bash\nnode .github/scripts/validate-skills.mjs\n```\n\nIt 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`:\n\n- The `SKILL.md` body stays under 500 lines to keep the initial skill context lightweight. Frontmatter is excluded from the count.\n- The frontmatter `name` matches the skill's directory name and is at most 64 characters.\n- The frontmatter contains a `description` of at most 1024 characters, the limits from the Agent Skills specification.\n- Every `references/<file>.md` path, whether written in `SKILL.md` or in another reference, resolves to an existing file.\n- 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`.\n- 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.\n- 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.\n- `evals/cases.json` is valid JSON with at least one case; every case has `id`, `prompt`, `expect`, `why`, `source`, and `rule`, ids are unique, every `source` path exists, and every `rule` fragment resolves to a passage of the skill (see `evals/README.md`).\n\nThe validator has its own tests, which break one thing at a time in a copy of the repository and assert that it is reported:\n\n```bash\nnode --test .github/scripts/validate-skills.test.mjs\n```\n\n## References\n\n- [fsd.how](https://fsd.how): FSD official documentation\n- [Steiger](https://github.com/feature-sliced/steiger): Official FSD linter\n- [skills.sh](https://skills.sh): Agent skills directory\n\n## License\n\nMIT\n",
  "bytes": 5750,
  "sha": "e2a85463fea2c5eea3e68adc045833eaed3b60e155c02f8d75ec8d1e898a2aae",
  "repo_slug": "feature-sliced/skills",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/skl_feature_sliced_skills_feature_sliced_des_5e8c48b9/readme"
}