How this skill is triggered — by the user, by Claude, or both
Slash command
/agent-fix:bugfix-implement <analyze-report-path><analyze-report-path>The summary Claude sees in its skill listing — used to decide when to auto-load this skill
根據 analyze.md 的修復計畫進行實作。評估工程方案、判斷技術影響,產出最小範圍的程式碼修改。
根據 analyze.md 的修復計畫進行實作。評估工程方案、判斷技術影響,產出最小範圍的程式碼修改。
Project Context 已在本次任務開頭注入。請以 Project Context 中定義的目錄結構、建置指令(build、lint、test)與 knowledge skills 作為專案依據。
修改任何程式碼前,依序執行並確認每步輸出:
git status # Step 1: 確認 working tree 乾淨
git checkout main && git pull origin main # Step 2: 同步最新程式碼
git checkout -b bugfix/<issue-id>-<description> # Step 3: 建立 bugfix 分支
git branch --show-current # Step 4: 確認在正確分支
Step 4 輸出必須為 bugfix/... 才可繼續修改程式碼。
必須無條件遵守 analyze.md 中的 Fix Strategy:
DIRECT → 使用 Direct FixTACTICAL → 使用 Tactical Fix禁止自行改變策略。唯三例外(可回報錯誤而不修復):
開始實作前,讀取 analyze.md 指定的 root_cause_file 與 impacted_files,確認:
不可行時停止,輸出驗證失敗報告:
### 分析建議驗證失敗
- **問題步驟**: <哪個建議有誤>
- **原因**: <為什麼不可行>
- **證據**: <從程式碼找到的實際定義>
- **正確做法**: <應該怎麼做>
適用:獨立模組、影響範圍 ≤ 3 個檔案、非核心共用元件
適用:packages/*、引用 > 3 次的元件、核心功能(auth、websocket、store)
// [TODO refactor] <issue_id>: <簡短說明>
// 原因: <為什麼使用 Tactical Fix>
// 未來應: <理想的重構方向>
修改特定類型的程式碼前,查詢 Project Context 中宣告的對應 knowledge skill:
| 情境 | 查詢 knowledge skill 的類別 |
|---|---|
| 修改 UI component | rendering / re-render 規則 |
| 涉及資料獲取 | async / client-side 規則 |
| 新增第三方套件 | bundle size 規則 |
| 修改 Server Component | server-side 規則 |
Project Context 未宣告 knowledge skill 時,依 LLM 訓練知識處理。
確認實作沒有引入新的 UX 問題。
禁止在通過以下驗證前執行 git commit。讀取 Project Context 中 quality_checks 區塊,逐一執行所有 enabled: true 的指令:
git diff:確認只修改了該改的檔案,無意外變更驗證失敗時,修正後重新驗證再 commit。
git diff # Step 5: 確認 diff 只包含應改的檔案
git commit -m "<type>(<scope>): <description>" # Step 6: Conventional Commits 格式
console.log 或 debugger收到 tester 回饋後:
--amend)### 修復報告
- **Branch**: bugfix/<issue-id>-<description>
- **Status**: success | failed | escalated
- **Modified Files**: <修改的檔案列表>
- **Fix Summary**: <1-2 行說明使用的工程方案與選擇理由,例如:「在 onChange 加入 300ms debounce 防止 video re-render;選 debounce 而非 throttle 因需等待輸入停止後才觸發」>
修復完成後,將報告寫入 task prompt 指定的絕對路徑(Write implementation report to: <path>)。
報告存放在 agent root(非被修正的目標專案目錄)。
npx claudepluginhub noni2she/agent-fixCreates bite-sized, testable implementation plans from specs or requirements, with file structure and task decomposition. Activates before coding multi-step tasks.