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 从公开仓库中收录这些内容。

举报或申请下架