$npx -y skills add CaesiumY/ko-design-md --skill design-mdAdd a new design.md catalog entry to ko-design-md. Use this skill IMMEDIATELY when the user wants to onboard a new brand into THIS project's catalog — produce services/{slug}.md (Stitch v0.1 format) plus services/{slug}.tokens.json (token-card sidecar) plus public/preview/{slug}/
| 1 | # /design-md skill — orchestration body |
| 2 | |
| 3 | This skill builds a complete catalog entry through a 5-subagent pipeline with one user checkpoint. The pipeline is heavy (research, drafting, two review loops) so resumability matters: each stage's artifact lives on disk in `.claude/cache/design-md/{slug}/` and the next stage reads from there. State is encoded by file presence — no separate state.json needed for v1. |
| 4 | |
| 5 | ## Pipeline shape |
| 6 | |
| 7 | ``` |
| 8 | [INTAKE] → research-collector → design-md-author ⇄ design-md-reviewer (loop ≤3) |
| 9 | ↓ score≥8 or N=3 |
| 10 | [USER CHECKPOINT] |
| 11 | ↓ approve |
| 12 | [WRITE_MD] → [TOKENS] |
| 13 | ↓ |
| 14 | preview-html-author ⇄ preview-html-reviewer (loop ≤3, non-blocking) |
| 15 | ↓ |
| 16 | [WRITE_PREVIEW] |
| 17 | ↓ |
| 18 | [BUILD_OG] |
| 19 | ↓ |
| 20 | [VERIFY] |
| 21 | ↓ |
| 22 | END |
| 23 | ``` |
| 24 | |
| 25 | **Loop termination**: design loop is blocking — score must reach 8/10 within 3 iterations or the user decides at the checkpoint. Preview loop is non-blocking — proceed with warning if score < 8 at iteration 3. |
| 26 | |
| 27 | **Key reference files** (read these before dispatching subagents that need them): |
| 28 | - `.claude/skills/design-md/references/stitch-format.md` |
| 29 | - `.claude/skills/design-md/references/rubric-design.md` |
| 30 | - `.claude/skills/design-md/references/rubric-preview.md` |
| 31 | |
| 32 | ## Stage 1 — Preflight |
| 33 | |
| 34 | Verify the working environment before doing anything user-visible. |
| 35 | |
| 36 | 1. `Bash`: `pwd` to capture the absolute repo root. Hold this value as `${repo_root}` in your reasoning and substitute it literally into every later Bash command and dispatch prompt that touches a repo path. The shell preserves cwd across calls, but pinning the absolute path makes Stage 8/10/11 robust to any inadvertent `cd`. |
| 37 | 2. `Bash`: `date +%Y-%m-%d` to capture today's date. Hold this value as `${today}` in your reasoning. Stage 6a passes this to the author for the `last_updated` frontmatter field; the project's date validator at `src/lib/content-parser.ts:158-171` rejects any other format. |
| 38 | 3. `Read` `${repo_root}/package.json`. If `"name"` is not exactly `"ko-design-md"`, abort with: "이 스킬은 ko-design-md 레포 안에서만 동작합니다. 현재 디렉터리: ${repo_root}". Do not proceed. |
| 39 | 4. Verify `${repo_root}/src/lib/content-types.ts` is readable. If not, abort. |
| 40 | 5. `Read` `${repo_root}/src/lib/content-types.ts` and extract the live `CATEGORIES` const. Use this as the source of truth for the intake category picker (do NOT hardcode the enum from memory — it can drift). |
| 41 | |
| 42 | ## Stage 2 — Conversational intake |
| 43 | |
| 44 | Use a single `AskUserQuestion` form with these 4 questions (multi-select where indicated): |
| 45 | |
| 46 | 1. **브랜드명** (text via "Other" → custom input): e.g. "토스", "당근", "구름". Use the Korean company/brand display name as it should appear in the `name` frontmatter, not the design system product name. If research later surfaces a distinct design system name (e.g. "SEED Design", "Vapor UI"), the author stores that in optional `design_system_name`. |
| 47 | 2. **참고 URL** (text via "Other"): comma-separated URLs. **2개 이상 권장** — 1개만 입력 시 research-collector가 INSUFFICIENT_SOURCES로 중단할 수 있고, 그 경우 스크린샷 보강 필요. Brand homepage, design system page, blog post about their UI, etc. |
| 48 | 3. **카테고리** (single-select): all values from `CATEGORIES` const, in order. Last option is `etc`. |
| 49 | 4. **언어** (single-select): `ko (한국어 본문)`, `en (English body)`, `both (두 파일 생성)`. Default `ko` recommended. |
| 50 | |
| 51 | Then ask three follow-up text inputs: |
| 52 | - **스크린샷 경로** (optional) — comma-separated absolute paths to screenshot files. The us |