validate

An architecture checker for Feature-Sliced Design (FSD), a frontend structure based on layers, slices, and smaller segments. It checks imports, folders, naming, public entry files, and project-specific rules.

In plain words
What is it for?
Use it to inspect layer hierarchy, cross-slice imports, public API usage, folder structure, naming consistency, and required project rules, then get repair guidance.
Why use it?
It finds code that crosses FSD boundaries incorrectly and explains why each issue matters. When Steiger is installed, it adds that tool's deeper validation results.

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/validate
Clone the repo
git clone --depth 1 https://github.com/jhlee0409/claude-plugins
Per session 8 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,860 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.00008 $0.01860
Opus 5 $0.00004 $0.00930
Sonnet 5 $0.00002 $0.00372
Haiku 4.5 $0.00001 $0.00186

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

Security

Grade A, and why

validate 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/validate.md · 273 lines

How it starts

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

/fsdarch:validate

FSD 아키텍처 규칙 위반을 검사하고 수정 가이드를 제공합니다. Steiger와 통합하여 심층 분석을 수행합니다.

Prerequisites

  • .fsd-architect.json 설정 파일 존재
  • (권장) @feature-sliced/steiger 설치

Execution Flow

Step 1: Check Steiger Installation

  1. npx steiger --version 실행하여 설치 확인
  2. 미설치 시 안내:
    Steiger not found. Install for comprehensive validation:
    npm install -D @feature-sliced/steiger
    
    Continuing with basic validation...
    

Step 2: Run Steiger (if available)

npx steiger src/ --reporter json
  1. JSON 출력 파싱
  2. 위반 사항 목록 수집

Step 3: Run Custom Validations

Use skill: boundary-checker

  1. Import Boundary Check

    • 레이어 계층 규칙 검증
    • Cross-slice import 검증
    • Public API 우회 검증
  2. Structure Validation

    • 세그먼트 구조 일관성
    • Index file 존재 여부
    • 네이밍 컨벤션 일관성
  3. Pattern Compliance

    • 프로젝트 설정과 일치 여부
    • 커스텀 규칙 검증

Step 4: Enhance with Context

각 위반 사항에 대해:

  1. 왜 문제인지 설명
  2. 어떻게 수정해야 하는지 가이드
  3. 관련 FSD 문서 링크

Step 5: Display Results

═══════════════════════════════════════════════════════════════
                    FSD VALIDATION REPORT
═══════════════════════════════════════════════════════════════

🔍 Scanned: 397 files in 6 layers

❌ Violations Found: 3

───────────────────────────────────────────────────────────────
[E201] Forbidden Cross-Slice Import
───────────────────────────────────────────────────────────────

📍 Location: src/features/auth/model/session.ts:15

   14 │ import { getUserById } from '@entities/user';
 → 15 │ import { validateCart } from '@features/cart/model';
   16 │ import { SESSION_TIMEOUT } from './constants';

❓ Why is this a problem?
   Features are isolated user scenarios. The 'auth' feature imports
   from 'cart' feature, creating a hidden dependency. If 'cart' is
   removed or changed, 'auth' will break unexpectedly.

✅ How to fix:

   Option 1: Move to Entities
   If 'validateCart' is business logic, move it to entities:

   // src/entities/cart/lib/validation.ts
   export function validateCart(cart: Cart): boolean { ... }

   // src/features/auth/model/session.ts
   import { validateCart } from '@entities/cart';

   Option 2: Use Composition in Widgets/Pages
   If these features need to work together, compose them at a higher layer:

   // src/widgets/auth-cart/model/useAuthWithCart.ts
   import { useAuth } from '@features/auth';
   import { useCart } from '@features/cart';

📚 Learn more: https://feature-sliced.design/docs/reference/isolation

───────────────────────────────────────────────────────────────
[E202] Public API Sidestep
───────────────────────────────────────────────────────────────

📍 Location: src/features/cart/api/addToCart.ts:8

   7 │ import { Product } from '@entities/product';
 → 8 │ import { formatPrice } from '@entities/product/lib/formatters';
   9 │

❓ Why is this a problem?
   You're importing from an internal module of 'product' entity instead
   of its public API. This breaks encapsulation - if the internal
   structure changes, your code will break.

✅ How to fix:

   Step 1: Export through public API
   // src/entities/product/index.ts
   export { formatPrice } from './lib/formatters';

   Step 2: Import from public API
   // src/features/cart/api/addToCart.ts
   import { Product, formatPrice } from '@entities/product';

📚 Learn more: https://feature-sliced.design/docs/reference/public-api

───────────────────────────────────────────────────────────────
[W101] Inconsistent Naming
───────────────────────────────────────────────────────────────

📍 Location: src/features/

   Most slices use kebab-case:
   ✓ auth/
   ✓ user-profile/
   ✓ shopping-cart/

   But found:
   ✗ ProductReviews/  (PascalCase)

⚠️ Why this matters:
   Inconsistent naming makes the codebase harder to navigate and
   can cause issues on case-sensitive file systems.

✅ How to fix:

   Rename the directory:
   mv src/features/ProductReviews src/features/product-reviews

   Update imports:
   // Before
   import { ... } from '@features/ProductReviews';
   // After
   import { ... } from '@features/product-reviews';

───────────────────────────────────────────────────────────────

📊 Summary:
   • Errors: 2 (must fix)
   • Warnings: 1 (recommended)

💡 Quick fixes available:
   Run /fsdarch:validate --fix to auto-fix W101 (naming)

═══════════════════════════════════════════════════════════════

Read the full file on GitHub · 273 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 · 273 lines · 8 tokens per session scan A 0f59b605cf96

Subscribe to this mod's changes

validate is a command published in the GitHub repository jhlee0409/claude-plugins (4 stars, last pushed 7mo ago), licensed MIT. It adds 8 tokens to every session and 1,860 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.