fsd

fsd is a cursor rule for Cursor from shapediver/AppBuilderSdk. It costs 41 tokens per session (1,659 once invoked), scanned A, original, MIT.

A migration agent for Feature-Sliced Design, a way to organise frontend code by shared code, data entities, features, widgets, and pages. It moves files such as components, hooks, types, and utilities into the appropriate layer.

In plain words
What is it for?
It is for reorganising React frontend files under the specified layers and updating them to use the project's configured alias.
Why use it?
It helps replace a mixed or older folder structure with clearer boundaries and consistent import paths.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/shapediver/appbuildersdk/fsd
Clone the repo
git clone --depth 1 https://github.com/shapediver/AppBuilderSdk

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for fsd

README.md
[![agentmods](https://agentmods.dev/badge/rules/shapediver/appbuildersdk/fsd.svg)](https://agentmods.dev/rules/shapediver/appbuildersdk/fsd)
Your own site
<a href="https://agentmods.dev/rules/shapediver/appbuildersdk/fsd"><img src="https://agentmods.dev/badge/rules/shapediver/appbuildersdk/fsd.svg" alt="Measured on agentmods" height="20"></a>
Per session 41 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,659 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00041 $0.01659
Opus 5 $0.00020 $0.00830
Sonnet 5 $0.00008 $0.00332
Haiku 4.5 $0.00004 $0.00166

Measured yesterday against content hash d9168eee104f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

fsd scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/fsd.mdc · 141 lines

How it starts

The opening of the file, as written. The whole thing — 141 lines — stays where its author put it; the contents beside it link to each section on GitHub.

FSD Migration Command

You are an FSD migration agent. When invoked, migrate the specified file(s) from the old project structure into the Feature Sliced Design architecture.

Project Context

  • All FSD layers live under src/shared/ (shared, entities, features, widgets, pages)
  • Use @AppBuilderLib/ alias for imports to avoid conflicts with the nested shared/ folder
  • The alias @AppBuilderLib resolves to src/shared/ (configured in vite.config.ts)
  • Old code lives in: components/, hooks/, store/, types/, utils/, modules/, pages/
  • FSD layers already in use: shared/, entities/, features/, widgets/

FSD Layers

Layer Purpose
shared/ Reusable code with no business logic (ui, lib, config)
entities/ Business entities (data models, their UI representations)
features/ User-facing features with business logic
widgets/ Composite UI blocks combining multiple features/entities
pages/ Full page compositions

FSD Segments (inside each slice)

Segment Contents
ui/ React components (.tsx with JSX)
model/ Stores (zustand), hooks with business logic
api/ API calls, SDK wrappers
lib/ Pure utility functions
config/ TypeScript types, constants, configuration

Workflow

Step 1: Analyze the target file

Read the file the user wants to migrate. Understand its role (UI component, hook, store, types, utility).

Step 2: Scan for related files

Before proposing the migration, search for closely related files that should move together:

  1. Type files: Check if the component's types/interfaces are defined in a separate file (e.g., in types/ folder). Search by component name and type names used in the file.
  2. Co-located files: Check the same directory for files that share the same base name or domain (e.g., ComponentName.tsx + ComponentName.types.ts + useComponentName.ts).
  3. Dedicated hooks: If the component uses a hook defined nearby, include it.
  4. Barrel exports: Check if the file is re-exported from an index.ts — that index may need updating.

Read the full file on GitHub · 141 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 141 lines · 41 tokens per session scan A d9168eee104f

Subscribe to this mod's changes

fsd is a cursor rule published in the GitHub repository shapediver/AppBuilderSdk (14 stars, last pushed yesterday), licensed MIT. It adds 41 tokens to every session and 1,659 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-04.