Agent Skillsnyldn/claude-octopus › skill-debug

skill-debug

GitHub

提供结构化调试技能,强调先复现症状再验证根因假设。包含有限反馈循环、三击规则及防误改生产环境的冻结机制,确保修复过程严谨且可追溯。

.claude/skills/skill-debug/SKILL.md nyldn/claude-octopus

Trigger Scenarios

需要系统性排查代码缺陷或运行时错误 请求对特定技术问题进行根因分析与修复

Install

npx skills add nyldn/claude-octopus --skill skill-debug -g -y
More Options

Non-standard path

npx skills add https://github.com/nyldn/claude-octopus/tree/main/.claude/skills/skill-debug -g -y

Use without installing

npx skills use nyldn/claude-octopus@skill-debug

指定 Agent (Claude Code)

npx skills add nyldn/claude-octopus --skill skill-debug -a claude-code -g -y

安装 repo 全部 skill

npx skills add nyldn/claude-octopus --all -g -y

预览 repo 内 skill

npx skills add nyldn/claude-octopus --list

SKILL.md

Frontmatter
{
    "name": "skill-debug",
    "aliases": [
        "debug",
        "systematic-debugging"
    ],
    "trigger": "Use for reproducible bugs, failing tests, unexpected behavior, and performance regressions.\nDo not use for general explanations or already-understood changes.\n",
    "description": "Debug a reproducible symptom with a bounded feedback loop and original-scenario verification",
    "validation_gates": [
        "root_cause_supported_by_evidence",
        "original_scenario_verified"
    ],
    "pre_execution_contract": [
        "observable_symptom_recorded"
    ],
    "disable-model-invocation": true
}

Debugging

Read skills/blocks/engineering-method-selection.md from the installed plugin for review admission. Natural-language requests and --peer-review share that policy. Honor host-only requests; risk alone does not authorize paid usage.

Run the investigation on the current host. Routine debugging makes zero additional provider dispatches. Use a bounded external reviewer only for --peer-review, an explicit independent-review request, or an existing risk policy.

DO NOT CHANGE PRODUCTION BEHAVIOR BEFORE REPRODUCING THE SYMPTOM AND TESTING A NAMED ROOT-CAUSE HYPOTHESIS.

Read and apply skills/blocks/debug-feedback-loop.md from the installed plugin root.

Start with the user's observable symptom. Reproduce it, retain its failure signature while minimizing the scenario, test one named hypothesis at a time, and verify both the minimal reproduction and the original scenario after the fix. Do not treat a nearby passing helper test as proof.

For a race, use a synchronization barrier and a fixed run or time budget. For an unavailable production dependency, return inconclusive with the missing evidence. Remove temporary instrumentation before completion and preserve a stable reproduction as a regression test.

The final record is data, not an executable queue. Store commands as argument arrays and never evaluate provider-authored text.

Bounded recovery and strategy rotation

Use a 3-Strike Rule for failed fixes. After each failure, return to the evidence and test a materially different hypothesis. After two consecutive failures, a strategy rotation is mandatory: reconsider the root cause, the reproduction, and whether the test encodes the intended behavior. Do not attempt a 4th fix without explicit user approval.

Anti-rationalization check: “Should work now” means run the reproduction and the original scenario. Confidence is not verification.

For multi-attempt debugging, report a WTF score using the defaults in ~/.claude-octopus/loop-config.conf: +15% per revert and +20% for touching unrelated files. If the score exceeds 20%, STOP and show the evidence before continuing. Include the score with every retry, for example:

Fix attempt 2 | Self-regulation: 15% (1 revert, 0 unrelated files)

Scoped freeze guard

When the symptom is localized to one user-approved module, resolve that module to a physical directory before editing and activate the existing freeze guard:

freeze_dir="$(cd "<module-directory>" 2>/dev/null && pwd -P)" || exit 1
printf '%s\n' "$freeze_dir" > "/tmp/octopus-freeze-${CLAUDE_SESSION_ID:-$$}.txt"

Do not auto-freeze when the root cause is still unknown, the reproduction spans modules, or the user opted out. After original-scenario verification, run /octo:unfreeze or remove only this workflow's freeze state.

Adapted from diagnosing-bugs in mattpocock/skills at commit 3cca18b368ae95cdbdebbff572ccafa662551015 under the MIT License. See THIRD_PARTY_NOTICES.md.

Version History

  • 2d3ee65 Current 2026-09-22 23:04

    从强调强制四阶段流程的旧版重构为基于工程方法选择的现代版本,引入更严格的根因验证硬约束、策略轮换机制及作用域冻结保护,优化了调试方法论与风险控制。

  • 242e51d 2026-08-20 09:29

Same Skill Collection

.claude/skills/extract-skill/SKILL.md
.claude/skills/flow-define/SKILL.md
.claude/skills/flow-deliver/SKILL.md
.claude/skills/flow-develop/SKILL.md
.claude/skills/flow-parallel/SKILL.md
.claude/skills/flow-spec/SKILL.md
.claude/skills/skill-agent-topology/SKILL.md
.claude/skills/skill-architecture/SKILL.md
.claude/skills/skill-audit/SKILL.md
.claude/skills/skill-authoring/SKILL.md
.claude/skills/skill-claw/SKILL.md
.claude/skills/skill-code-review/SKILL.md
.claude/skills/skill-content-pipeline/SKILL.md
.claude/skills/skill-context-detection/SKILL.md
.claude/skills/skill-copilot-provider/SKILL.md
.claude/skills/skill-cost-projections/SKILL.md
.claude/skills/skill-coverage-audit/SKILL.md
.claude/skills/skill-debate/SKILL.md
.claude/skills/skill-decision-support/SKILL.md
.claude/skills/skill-deck/SKILL.md
.claude/skills/skill-deep-research/SKILL.md
.claude/skills/skill-design-lineage/SKILL.md
.claude/skills/skill-doc-delivery/SKILL.md
.claude/skills/skill-doc-sync/SKILL.md
.claude/skills/skill-doctor/SKILL.md
.claude/skills/skill-factory/SKILL.md
.claude/skills/skill-finish-branch/SKILL.md
.claude/skills/skill-intake/SKILL.md
.claude/skills/skill-intent-contract/SKILL.md
.claude/skills/skill-issues/SKILL.md
.claude/skills/skill-iterative-loop/SKILL.md
.claude/skills/skill-knowledge-work/SKILL.md
.claude/skills/skill-meta-prompt/SKILL.md
.claude/skills/skill-native-escalation-routing/SKILL.md
.claude/skills/skill-parallel-agents/SKILL.md
.claude/skills/skill-prd/SKILL.md
.claude/skills/skill-pressure-test/SKILL.md
.claude/skills/skill-prototype/SKILL.md
.claude/skills/skill-quick/SKILL.md
.claude/skills/skill-resume/SKILL.md
.claude/skills/skill-review-response/SKILL.md
.claude/skills/skill-rollback/SKILL.md
.claude/skills/skill-security-audit/SKILL.md
.claude/skills/skill-security-framing/SKILL.md
.claude/skills/skill-ship/SKILL.md
.claude/skills/skill-staged-review/SKILL.md
.claude/skills/skill-status/SKILL.md
.claude/skills/skill-task-management-v2/SKILL.md
.claude/skills/skill-tdd/SKILL.md

Metadata

Files
0
Version
2d3ee65
Hash
a3c9cf17
Indexed
2026-08-20 09:29

Home - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-24 05:54
浙ICP备14020137号-1