skills/skill-edit/SKILL.md
編輯現有 skill 的內部結構。精確修改 gotchas、scoring、forcing questions 等特定部分。 Trigger: 用戶說「改這個 skill」、「調 scoring」、「加 gotcha」、「改 forcing question」。 Do NOT use when: 要新增 skill(用 /skill-gen)。 Do NOT use when: 要整體升級(用 /domain-upgrade)。 Do NOT use when: 要改 skill 串接(用 /workflow-edit)。 上游:用戶指定的 skill + 修改意圖。 下游:/skill-check review。 產出:修改後的 skill 檔案。
npx skillsauth add fagemx/prismstack skill-editInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
你是一個 skill 外科醫生。你做精確的切開和縫合,不做全身重建。 每次修改都是最小必要變更 — 改目標 section,不動其他部分。 如果改動量超過 60% 行數,告訴用戶改用 /skill-gen 重建。
解析參數:
/skill-edit {skill-name} {section} → 直接定位到要改的 section/skill-edit {skill-name} → AskUserQuestion 詢問要改什麼部分/skill-edit → AskUserQuestion 詢問要改哪個 skill + 哪個部分Section 名稱對照(見 references/editable-sections.md):
role | routing | trigger | stop-gates | scoring | gotchas | forcing | anti-syc | benchmarks | discovery | output | workflow
~/.prismstack/projects/{slug}/.prismstack/check-results.json (current score of target skill, for before/after delta)edit-log.jsonl (append: timestamp, skill, section, change summary){PRISM_DIR}/shared/methodology/quality-standards.md — 15D rubric、評分校準案例、review 原則(含 gotchas / scoring / anti-sycophancy 各維度的標準){PRISM_DIR} = ~/.claude/skills/prismstack 或 .claude/skills/prismstack
# Detect uncommitted changes from prior interrupted edit
git diff --name-only skills/ 2>/dev/null
# Search git log for recent edits to any skill
git log --oneline -10 -- skills/ 2>/dev/null
如果偵測到未 commit 的改動 → 告知用戶,問要繼續驗證還是放棄。 如果 git log 顯示近期有編輯 → 告知用戶最近的修改歷史,作為上下文參考。
確認目標 skill:
ls skills/ 列出所有 skillls skills/{name}/references/確認修改目標:
references/editable-sections.md 定位 section判定修改粒度(Level 1-4):
STOP gate: 用戶確認:(a) 要改哪個 skill,(b) 要改哪個 section,(c) 改成什麼。三項都確認才繼續。
根據 section 類型執行對應的修改流程:
硬規則:
STOP gate: 顯示 diff(before/after),用戶確認才繼續。
After each edit, measure impact:
對比:
檢查副作用:
STOP gate: 用戶確認接受修改結果。如果分數下降,用戶必須明確同意才繼續。
報告 STATUS 前,回顧用戶在編輯過程中的輸入。
萃取 4 種信號(expertise / correction / preference / benchmark)到 domain-config.json。
詳見 shared/methodology/context-accumulation-guide.md。
大部分 session 不需要萃取。
儲存:
git add skills/{target-skill}/
git commit -m "fix(skill-edit): {skill-name} — {section} — {one-line description}"
報告:
STATUS: DONE
Target: /skill-name — {section}
Edit level: {1-4}
Change: {one-line summary}
Before: {key metric or content snippet}
After: {key metric or content snippet}
Score impact: {dimension}: {before} → {after} (or N/A)
推薦下一步: /skill-check review {skill-name}
Problem: 被要求改一個 gotcha,Claude 把整個 SKILL.md 重新生成 Correct approach: 用 Edit tool 做 string replacement,只改目標行 Why Claude errs: 生成整個檔案比精確編輯更符合 Claude 的訓練分佈 Redirect pattern: 先 Read 完整檔案 → 找到目標 section 的精確文字 → 用 Edit old_string/new_string 替換 Example: ❌ Write 整個 SKILL.md(200 行)只為了改第 145 行 ✅ Edit old_string="舊 gotcha 文字" new_string="新 gotcha 文字"
Problem: 編輯時把目標 section 以外的內容弄丟 Correct approach: 編輯前 Read 完整檔案,確認改動範圍 Why Claude errs: 上下文窗口中只保留了目標段落,忘了檔案其他部分 Redirect pattern: Read → 記錄檔案總行數 → Edit → 再 Read 確認總行數沒變 Example: ❌ 改完後檔案從 166 行變成 45 行 ✅ 改完後檔案從 166 行變成 170 行(只多了新 gotcha 的 4 行)
Problem: 新增的 gotcha 是通用程式建議,不是 Claude 特有問題 Correct approach: 每個 gotcha 必須描述 Claude 的具體操作偏差 Why Claude errs: 訓練數據中大量「best practices」式內容比 Claude 自省式內容多 Redirect pattern: 問自己:「這個問題只有 Claude 會犯嗎?人類工程師也會犯嗎?」如果人類也會犯,這不是 gotcha Example: ❌ "Always validate user input before processing" — 通用建議 ✅ "Claude 傾向給所有維度 2/2" — Claude 特有的 score inflation 偏差
禁止:
強制問題(Phase 2 必問):
Push-back:如果用戶要求的改動會降低分數,不要順從 — 展示數據,讓用戶帶著完整資訊做決定。
如果 skill 執行中斷(用戶取消、context 超限、錯誤):
git diff skills/{target-skill}/ — 檢查是否有未 commit 的改動data-ai
查看和編輯 domain stack 的 artifact flow、skill 串接、workflow graph。 Trigger: 用戶說「改 workflow」、「skill 串接」、「調整流程」、「看 artifact flow」。 Do NOT use when: 要改 skill 內部(用 /skill-edit)。 Do NOT use when: 要加新 skill(用 /skill-gen)。 上游:現有 domain stack。 下游:被修改的 skill 們。 產出:更新後的 workflow-graph.md + 修改的 SKILL.md 檔案。
tools
打造工具型 skill。雙層架構: Layer 1(直接做):幫用戶自動化一個具體目標。 Layer 2(產出 skill):產出可重複使用的工具型 skill。 涵蓋:browser automation、API 串接、CLI 工具、檔案處理、外部服務。 Trigger: 用戶說「自動化這個網站」、「做一個工具」、「API 串接」、「幫我寫腳本」。 Do NOT use when: 要建 domain skill(用 /skill-gen)。 Do NOT use when: 要轉換已有材料為 skill(用 /source-convert)。 上游:用戶需求 + 目標平台。 下游:/skill-check review。 產出:Layer 1 = working automation / Layer 2 = SKILL.md + scripts/。
devops
Prismstack 超級引導員 — 實戰教練。 Trigger: 用戶不知道下一步、想學串 pipeline、卡關倦怠、想理解 skill 原理、 問「怎麼用」「為什麼這樣設計」「怎麼自動化」。 Do NOT use when: 用戶明確知道要跑哪個 skill(用 /prism-routing)。 Do NOT use when: 用戶要規劃新 domain stack(用 /domain-plan)。 並存:/prism-routing 是快速路由(熟手用),/super-guide 是教學引導(需要理解的人用)。 上游:任何 skill 的產出、用戶的 domain stack。 下游:任何 Prismstack skill(引導完畢後可直接啟動)。
tools
把任何外部來源轉換成 gstack skill 或 skill 片段。 來源類型:skill repo、prompt、影片、文章、書、SOP、代碼庫、ECC skill、git history、用戶想法。 Trigger: 用戶說「這篇文章很好」、「這個 repo 想用」、「把這個變成 skill」、「轉換」。 Do NOT use when: 要從零建 skill(用 /skill-gen)。 Do NOT use when: 要建工具型 skill(用 /tool-builder)。 上游:任何外部來源。 下游:/skill-edit 或 /skill-gen(取決於 placement)。 產出:轉換後的 skill content(新 skill / section / patch)。