Debug

cyrusagents/cyrus/skills/debug

作者 cyrusagents9cb20212dfb0caec7fc44a4688d41829589087bc無授權條款850 個星標收錄於 2026年10月9日更新於 2026年10月9日儲存庫今天更新

Full debugging workflow — reproduce the bug with a focused check, perform root cause analysis, then implement a minimal fix.

AI 產生的概覽

引導結構化除錯流程:重現缺陷、找出根因,再套用最小且經驗證的修正。

功能
此技能為已回報的缺陷提供兩階段除錯流程。第一階段分析缺陷回報,從症狀追蹤到源頭,判定根因,用最小可行的檢查重現錯誤,並記錄根因與重現步驟。第二階段規劃並實作針對根因的最小修正,然後重複重現並執行相關既有檢查以驗證修正。
適用情境
適用於已回報具體缺陷、需要診斷並修正的情況。適合原因尚不明確、希望採用嚴謹的「先重現再修正」方式,而非大範圍重構或無關變更的場合。
執行需求
不需要指令碼或特殊工具,僅為純指示式工作流程。前提是能存取程式碼庫,並能執行指令或測試來重現問題。

Debug

Debug a reported issue using a structured reproduction-then-fix approach.

Phase 1: Reproduction & Root Cause Analysis

  1. Investigate — Analyze the bug report for key symptoms and error messages
  2. Trace — Search the codebase for error occurrence patterns, trace from symptom to source
  3. Root cause — Identify the root cause through data flow analysis and edge case checking
  4. Reproduce — Reproduce the exact error with the smallest useful check (a command, dry run, manual flow, or automated test)
  5. Document — Clearly document the root cause and reproduction steps

Phase 2: Fix Implementation

  1. Plan — Analyze the optimal fix approach based on root cause, check for similar fixes in the codebase
  2. Implement — Make the minimal, targeted fix that addresses the root cause
  3. Verify — Repeat the reproduction to confirm the fix and run relevant existing checks. Follow verify-and-ship for proportionate scope; add a regression test only when the concrete failure warrants durable coverage

Principles

  • Minimal changes — Fix the bug, nothing more
  • Targeted — Only touch affected code paths
  • Verified — Confirm the reproduction succeeds after the fix and preserve relevant existing safeguards; a new test file is not mandatory
  • No unrelated improvements — Stay focused on the specific bug

來源與署名

來源:cyrusagents/cyrus位於skills/debug提交9cb2021

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架