scaffold

scaffold is a command for coding agents from jhlee0409/claude-plugins. It costs 10 tokens per session (1,911 once invoked), scanned A, original, MIT.

A code scaffolding command for FSD slices and segments. A slice is a self-contained part of a feature area, while segments commonly separate its user interface, data model, and API code.

In plain words
What is it for?
Use it to create slices or selected segments in the entities, features, widgets, or pages layers, including public `index.ts` files and project-matching naming patterns.
Why use it?
It avoids repeatedly creating folders and starter files by hand and keeps new code consistent with nearby slices. It also rejects unsafe names that could create files outside the project structure.

Command

Part of the fsdarch plugin — 4 skills, 6 commands shipped together

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/scaffold
Clone the repo
git clone --depth 1 https://github.com/jhlee0409/claude-plugins

Or install fsdarch, the plugin that ships this one along with the rest of its 4 skills, 6 commands.

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 scaffold

README.md
[![agentmods](https://agentmods.dev/badge/commands/jhlee0409/claude-plugins/scaffold.svg)](https://agentmods.dev/commands/jhlee0409/claude-plugins/scaffold)
Your own site
<a href="https://agentmods.dev/commands/jhlee0409/claude-plugins/scaffold"><img src="https://agentmods.dev/badge/commands/jhlee0409/claude-plugins/scaffold.svg" alt="Measured on agentmods" height="20"></a>
Per session 10 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,911 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.00010 $0.01911
Opus 5 $0.00005 $0.00955
Sonnet 5 $0.00002 $0.00382
Haiku 4.5 $0.00001 $0.00191

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

Security

Grade A, and why

scaffold 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 4d 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/scaffold.md · 295 lines

How it starts

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

/fsdarch:scaffold

새 슬라이스 또는 세그먼트 보일러플레이트를 생성합니다. 프로젝트 패턴을 학습하여 일관된 스타일로 코드를 생성합니다.

Syntax

/fsdarch:scaffold <layer> <slice-name> [segment]

Prerequisites

  • .fsd-architect.json 설정 파일 존재

Arguments

Argument Description Example
layer FSD 레이어 (entities, features, widgets, pages) features
slice-name 슬라이스 이름 auth
segment (선택) 특정 세그먼트만 생성 ui, model, api

Execution Flow

Step 1: Validate Input

  1. 레이어 유효성 검사 (sliced layer인지 확인)
  2. 슬라이스 이름 검사 (기존 존재 여부)
  3. 세그먼트 유효성 검사 (SECURITY CRITICAL):
    • --segments 플래그의 각 세그먼트에 대해 slice-generator의 validateSegmentName() 호출
    • Path traversal 공격 방지: .., /, \ 금지
    • Hidden directory 방지: .으로 시작 금지
    • 정규식 패턴 ^[a-zA-Z][a-zA-Z0-9-_]*$ 준수 필수
    • 검증 실패 시 E305 에러 반환

Step 2: Load Project Patterns

Use skill: layer-detector

  1. 설정 파일에서 패턴 로드:

    • Naming convention (kebab-case, camelCase, etc.)
    • 사용 중인 세그먼트
    • Index file 패턴
  2. 동일 레이어의 기존 슬라이스 분석:

    • 파일 구조 패턴
    • Export 스타일
    • 타입 정의 패턴

Step 3: Generate Structure

Use skill: slice-generator

  1. 슬라이스 디렉토리 생성
  2. 설정된 세그먼트별 파일 생성
  3. Public API (index.ts) 생성

Step 4: Apply Patterns

  1. Naming Convention 적용

    • 디렉토리명: 설정된 컨벤션 따름
    • 파일명: 기존 패턴 따름
  2. Import Style 적용

    • Alias 사용 (설정된 경우)
    • 상대 경로 스타일
  3. Code Style 적용

    • 기존 코드에서 학습한 패턴
    • TypeScript/JavaScript 설정

Step 5: Display Result

═══════════════════════════════════════════════════════════════
                    SLICE CREATED: auth
═══════════════════════════════════════════════════════════════

📁 Created structure:

src/features/auth/
├── index.ts          # Public API
├── ui/
│   ├── index.ts
│   ├── LoginForm.tsx
│   └── LoginForm.module.css
├── model/
│   ├── index.ts
│   ├── types.ts
│   └── useAuth.ts
├── api/
│   ├── index.ts
│   └── authApi.ts
└── lib/
    └── index.ts

📝 Files created: 10
🎨 Pattern applied: kebab-case, barrel exports

💡 Next steps:
   1. Implement your business logic in model/
   2. Create UI components in ui/
   3. Define API calls in api/
   4. Export public interface through index.ts

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

Read the full file on GitHub · 295 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. 4d ago First seen · 295 lines · 10 tokens per session scan A 49c35f58c311

Subscribe to this mod's changes

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