init

A project setup command for Feature-Sliced Design (FSD), a way to organize frontend code into layers and smaller slices. It examines the source folders and creates an FSD configuration file.

In plain words
What is it for?
Use it to detect source and FSD layer folders, identify naming and import patterns, and create `.fsd-architect.json` with a summary of the findings.
Why use it?
It removes the need to map the project structure and conventions by hand before using FSD checks. It also checks whether analysis cache files are excluded from version control.

Command

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 commands/jhlee0409/claude-plugins/init
Clone the repo
git clone --depth 1 https://github.com/jhlee0409/claude-plugins
Per session 7 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 7,146 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 $0.00007 $0.07146
Opus 5 $0.00003 $0.03573
Sonnet 5 $0.00001 $0.01429
Haiku 4.5 $0.00001 $0.00715

Measured 2d ago against content hash 14be16b1fe22, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

init 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 2d ago.

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.

plugins/fsd-architect/commands/init.md · 978 lines

How it starts

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

/fsdarch:init

프로젝트의 FSD 구조를 분석하고 설정 파일을 생성합니다.

Prerequisites

  • 프로젝트 루트 디렉토리에서 실행
  • src/ 또는 유사한 소스 디렉토리 존재

EXECUTION INSTRUCTIONS

When /fsdarch:init is invoked, Claude MUST perform these steps in order:

  1. Check existing config - Verify .fsd-architect.json doesn't exist (unless --force)
  2. Detect source directory - Find src/, app/, lib/, or ask user
  3. Use skill: layer-detector - Scan for FSD layer directories
  4. Analyze patterns - Detect naming, segments, import aliases
  5. Generate config - Write .fsd-architect.json
  6. Security check - Verify .gitignore includes cache files
  7. Report summary - Show detected structure and next steps

Flow Overview

┌───────────────────────────────────────────────────────────────┐
│                       /fsdarch:init                           │
├───────────────────────────────────────────────────────────────┤
│  Step 0. Check if .fsd-architect.json exists                  │
│     ├─ Exists + no --force → Error E103                       │
│     └─ Not exists OR --force → Continue                       │
│                                                               │
│  Step 1. Detect source directory                              │
│     ├─ Check src/, app/, lib/ in order                        │
│     ├─ If found → Use it                                      │
│     └─ If not found → Ask user (AskUserQuestion)              │
│                                                               │
│  Step 1.5. Detect framework (Next.js, etc.)                   │
│     ├─ Check package.json for "next"                          │
│     ├─ If Next.js → Detect router mode (Step 1.6)             │
│     └─ If not → Use standard names (app, pages)               │
│                                                               │
│  Step 1.6. Detect Next.js router mode (if Next.js)            │
│     ├─ Check for App Router: app/layout.tsx, app/page.tsx     │
│     ├─ Check for Pages Router: pages/_app.tsx, pages/index    │
│     ├─ If BOTH exist → HYBRID MODE                            │
│     │    └─ Both app/ and pages/ reserved for routing         │
│     ├─ If only App Router → Single mode (app reserved)        │
│     ├─ If only Pages Router → Single mode (pages reserved)    │
│     └─ Ask user for FSD layer aliases                         │
│                                                               │
│  Step 2. Invoke skill: layer-detector                         │
│     ├─ Scan for FSD layers in srcDir (with aliases)           │
│     ├─ If layers found → Continue to Step 3                   │
│     └─ If no layers → Ask "Create new FSD structure?"         │
│                                                               │
│  Step 3. Analyze existing patterns (if code exists)           │
│     ├─ Naming convention (kebab-case/camelCase/PascalCase)    │
│     ├─ Segment usage (ui/, model/, api/, lib/)                │
│     ├─ Index file patterns                                    │
│     └─ Import aliases from tsconfig.json                      │
│                                                               │
│  Step 4. Generate .fsd-architect.json                         │
│                                                               │
│  Step 4.5. Configure tsconfig.json paths (Optional)           │
│     ├─ Ask user if they want path aliases                     │
│     ├─ If YES → Generate/merge paths in tsconfig.json         │
│     └─ Apply layerAliases to path generation                  │
│                                                               │
│  Step 4.6. Suggest bundler config (Vite only)                 │
│     └─ Display vite.config.ts alias suggestions               │
│                                                               │
│  Step 5. Check .gitignore for cache files                     │
│                                                               │
│  Step 6. Display summary and next steps                       │
└───────────────────────────────────────────────────────────────┘

Read the full file on GitHub · 978 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. 2d ago First seen · 978 lines · 7 tokens per session scan A 14be16b1fe22

Subscribe to this mod's changes

init is a command published in the GitHub repository jhlee0409/claude-plugins (4 stars, last pushed 7mo ago), licensed MIT. It adds 7 tokens to every session and 7,146 once invoked, about $0.0000 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-08-31.