在現有 domain stack 中新增單一 skill。不是重建整個 repo,是加一個新的。 Trigger: 用戶說「加一個 skill」、「我需要一個做 X 的 skill」、「新增」。 Do NOT use when: 要建整個 domain stack(用 /domain-build)。 Do NOT use when: 要改現有 skill(用 /skill-edit)。 Do NOT use when: 要建工具型 skill(用 /tool-builder)。 上游:用戶需求 + 現有 skill map。 下游:/skill-check design。 產出:新的 SKILL.md + references/(如需要)。
你是一個 skill 工匠。一次只建一個 skill,精確地建。 你建出的每個 skill 都必須通過 3 項獨立性測試和 7 問設計檢查。 不要急著生成 — 先理解、再定位、再動手。
解析參數:
/skill-gen {name} → 建造名為 {name} 的新 skill/skill-gen → AskUserQuestion 詢問要建什麼/skill-gen from-issue {url} → 從 issue 描述推導 skill 需求~/.prismstack/projects/{slug}/.prismstack/skill-map.json (what's planned), domain-config.json (context)skill-map.json (add new skill entry){PRISM_DIR}/shared/methodology/skill-craft-guide.md — skill 寫作原則、pattern、模板、實戰範例(含 review / bridge / control 各類型){PRISM_DIR} = ~/.claude/skills/prismstack 或 .claude/skills/prismstack
在做任何事之前,先搞清楚現有 domain 長什麼樣。
_SLUG=$(basename "$(git rev-parse --show-toplevel 2>/dev/null || pwd)")
_PROJECTS_DIR="${HOME}/.prismstack/projects/${_SLUG}"
# Search for existing skill map + routing table
ls "${_PROJECTS_DIR}"/skill-map-*.md 2>/dev/null
ls skills/*/SKILL.md 2>/dev/null
# Check for gaps in skill map vs actual skills
# (skill map may list skills not yet built)
ls skills/ — 列出所有現有 skillskills/{domain}-routing/SKILL.md)skill-map.md(如果存在)— 比對已建 skill vs 計畫中的 skill,標出缺口STOP gate: 確認已理解現有 domain context。如果找不到 routing skill 或 skill map,告知用戶但繼續。
用 AskUserQuestion(四段格式)問清楚:
跑 3 項獨立性測試(見 references/generation-workflow.md):
判定:
STOP gate: 用戶確認要建新 skill。
判斷用戶對這個 skill 提供了多少資訊:
讀 shared/methodology/skill-craft-guide.md How-To 10,按品質等級生成。
生成後在 completion 裡標記品質等級和提升建議。
references/generation-workflow.mdskills/domain-build/references/skill-template-guide.md 取對應模板生成時的硬規則:
STOP gate: 呈現生成的 SKILL.md 給用戶 review。不要說「看起來不錯」— 列出你自己的疑慮。
對新 skill 跑 /skill-check design(7Q)inline:
Before committing, score the generated skill using references/generation-quality-checklist.md.
If score < 5/8, revise the weakest dimensions before proceeding.
STOP gate: 確認 wiring 完成、artifact flow 通順。
報告 STATUS 前,回顧用戶在生成過程中的輸入。
萃取 4 種信號(expertise / correction / preference / benchmark)到 domain-config.json。
詳見 shared/methodology/context-accumulation-guide.md。
大部分 session 不需要萃取。
git add skills/{new-skill}/ + commitSTATUS: DONE
- 新 skill: {name}({type} 型)
- 檔案: skills/{name}/SKILL.md ({line_count} 行)
- References: {list or "無"}
- Design check: {score}/7
- Wired into: {routing skill name}
建議下一步:
1. `/skill-check review {new-skill-name}` — 檢查新 skill 品質
禁止:
強制問題(Phase 1 至少問一個):
如果 skill 執行中斷(用戶取消、context 超限、錯誤):
skills/{name}/ 是否已建立、SKILL.md 是否存在且完整