Agent Skillscbrock84/headcount › systematic-debugging

systematic-debugging

GitHub

提供系统化调试方法论,强调先复现和定位根因再修复。适用于测试失败、生产错误及间歇性问题排查,指导通过二分法缩小范围、验证假设并确认因果,避免盲目修改。

plugins/technology/skills/systematic-debugging/SKILL.md cbrock84/headcount

Trigger Scenarios

测试失败或断言错误 生产环境报错或异常行为 间歇性/随机性问题 修复未生效或问题复发

Install

npx skills add cbrock84/headcount --skill systematic-debugging -g -y
More Options

Non-standard path

npx skills add https://github.com/cbrock84/headcount/tree/main/plugins/technology/skills/systematic-debugging -g -y

Use without installing

npx skills use cbrock84/headcount@systematic-debugging

指定 Agent (Claude Code)

npx skills add cbrock84/headcount --skill systematic-debugging -a claude-code -g -y

安装 repo 全部 skill

npx skills add cbrock84/headcount --all -g -y

预览 repo 内 skill

npx skills add cbrock84/headcount --list

SKILL.md

Frontmatter
{
    "name": "systematic-debugging",
    "description": "Finds the root cause of a bug, test failure, or unexpected behavior before proposing any fix. Use this whenever something is broken and the cause is not yet proven — a failing test, a production error, intermittent behavior, or a symptom that appeared after a change. Also use when a fix has been attempted and did not work, or when the same bug keeps coming back."
}

Systematic debugging

The rule

No fix before the cause is proven. A change that makes a symptom disappear without an explanation has not fixed anything — it has moved the failure somewhere you are not looking.

Method

  1. Reproduce it deterministically. If you cannot make it happen on demand, you cannot know when it is fixed. Intermittent means you have not found the variable yet — order, timing, state, environment, data.
  2. Narrow the blast radius. Bisect: which commit, which input, which branch, which layer. Halve the search space with each step rather than reading everything.
  3. State a hypothesis that can be wrong. "The cache returns stale rows after a write" is a hypothesis. "Something is wrong with caching" is not.
  4. Test the hypothesis directly — a log line, a breakpoint, a probe. Prove it, do not infer it.
  5. Explain the whole symptom. If your cause explains the error but not why it started Tuesday, you have found a bug, not the bug.
  6. Fix, then verify by reverting. Put the bug back and confirm the test fails again. This is the step people skip, and it is the one that proves causation rather than coincidence.

Anti-patterns

  • Shotgun changes — altering several things at once. Now you cannot attribute the fix.
  • "Probably a flake." Not a diagnosis. A test that fails intermittently is reporting a real race, ordering dependency, or shared-state leak.
  • Fixing the symptom — catching the exception, adding a retry, widening a timeout — without knowing what threw it.
  • Trusting the error message's location. Where it surfaced is rarely where it originated.

Never

  • Close a bug without a reproduction that failed before the fix and passes after it.
  • Deploy a change to production to find out whether it works. Reproduce somewhere you can observe first.
  • Change the environment and the code in the same step.
  • Leave a debugging aid in the code as the fix — a widened timeout, a disabled check, a swallowed exception.

Return contract

State the reproduction, the proven cause, the fix, and the verification that the fix addresses that cause specifically. Name anything you ruled out and how.

Version History

  • d58a7ee Current 2026-09-02 21:11

Same Skill Collection

plugins/corporate-strategy/skills/chief-strategy-officer/SKILL.md
plugins/corporate-strategy/skills/market-entry/SKILL.md
plugins/corporate-strategy/skills/mergers-and-acquisitions/SKILL.md
plugins/corporate-strategy/skills/portfolio-strategy/SKILL.md
plugins/corporate-strategy/skills/scenario-planning/SKILL.md
plugins/corporate-strategy/skills/strategic-alliances/SKILL.md
plugins/customer-experience/skills/chief-customer-officer/SKILL.md
plugins/customer-experience/skills/customer-onboarding-and-implementation/SKILL.md
plugins/customer-experience/skills/customer-success-management/SKILL.md
plugins/customer-experience/skills/escalation-management/SKILL.md
plugins/customer-experience/skills/self-service-and-knowledge/SKILL.md
plugins/customer-experience/skills/support-operations/SKILL.md
plugins/customer-experience/skills/voice-of-customer/SKILL.md
plugins/data-analytics/skills/ai-ml-governance/SKILL.md
plugins/data-analytics/skills/business-intelligence/SKILL.md
plugins/data-analytics/skills/chief-data-officer/SKILL.md
plugins/data-analytics/skills/data-engineering/SKILL.md
plugins/data-analytics/skills/data-governance/SKILL.md
plugins/data-analytics/skills/data-modeling/SKILL.md
plugins/demand-generation/skills/ai-search-optimization/SKILL.md
plugins/demand-generation/skills/app-store-optimization/SKILL.md
plugins/demand-generation/skills/experimentation/SKILL.md
plugins/demand-generation/skills/landing-page-cro-expert/SKILL.md
plugins/demand-generation/skills/lead-capture/SKILL.md
plugins/demand-generation/skills/lifecycle-messaging/SKILL.md
plugins/demand-generation/skills/listing-distribution/SKILL.md
plugins/demand-generation/skills/marketing-analytics/SKILL.md
plugins/demand-generation/skills/paid-advertising/SKILL.md
plugins/demand-generation/skills/programmatic-seo/SKILL.md
plugins/demand-generation/skills/seo-strategy/SKILL.md
plugins/executive/skills/ai-research-analyst/SKILL.md
plugins/executive/skills/business-growth-consultant/SKILL.md
plugins/executive/skills/chief-executive/SKILL.md
plugins/executive/skills/fundraising-and-investor-relations/SKILL.md
plugins/executive/skills/saas-idea-validator/SKILL.md
plugins/finance/skills/budgeting-and-forecasting/SKILL.md
plugins/finance/skills/capital-allocation/SKILL.md
plugins/finance/skills/capital-structure-and-covenants/SKILL.md
plugins/finance/skills/cost-accounting/SKILL.md
plugins/finance/skills/financial-modeling/SKILL.md
plugins/finance/skills/financial-reporting-and-close/SKILL.md
plugins/finance/skills/financial-statement-analysis/SKILL.md
plugins/finance/skills/internal-controls-and-audit/SKILL.md
plugins/finance/skills/revenue-recognition/SKILL.md
plugins/finance/skills/tax/SKILL.md
plugins/finance/skills/treasury-and-liquidity/SKILL.md
plugins/finance/skills/unit-economics/SKILL.md
plugins/it-operations/skills/backup-and-recovery/SKILL.md
plugins/it-operations/skills/chief-information-officer/SKILL.md
plugins/it-operations/skills/cloud-administration/SKILL.md

Metadata

Files
0
Version
9cbf340
Hash
9fb2d307
Indexed
2026-09-02 21:11

Home - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-16 00:27
浙ICP备14020137号-1 $Map of visitor$