跳到正文
cccskills
免费在 GitHub 公开

skill-debug

Investigate reproducible bugs by recreating symptoms, testing one possible cause at a time, and checking fixes in both a simplified test case and the original scenario. Retry limits keep unsuccessful fixes from continuing unchecked.

中文简介正在准备中。当前显示英语简介。

原文查看原文说明

Debug a reproducible symptom with a bounded feedback loop and original-scenario verification

查看安装方法

适用场景

  • Investigating a reproducible bug
  • Checking a fix in the original scenario
  • Reconsidering causes after failed fixes
  • Preserving a reproduction as a regression test

包含的文件(2)

  • SKILL.md5.3 KB
  • agents/openai.yaml166 B

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Host: Codex CLI — This skill was designed for Claude Code and adapted for Codex. Cross-reference commands use installed skill names in Codex rather than /octo:* slash commands. Use the active Codex shell and subagent tools. Do not claim a provider, model, or host subagent is available until the current session exposes it. For host tool equivalents, see skills/blocks/codex-host-adapter.md.

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.

<HARD-GATE> DO NOT CHANGE PRODUCTION BEHAVIOR BEFORE REPRODUCING THE SYMPTOM AND TESTING A NAMED ROOT-CAUSE HYPOTHESIS. </HARD-GATE>

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:

_OCTO_SESSION_ID="${CLAUDE_CODE_SESSION_ID:-${CLAUDE_SESSION_ID:-}}"
if [[ -z "$_OCTO_SESSION_ID" ]]; then
    printf 'Freeze activation requires a shared Claude session ID; stop before editing.\n' >&2
    exit 1
fi
freeze_dir="$(cd "<module-directory>" 2>/dev/null && pwd -P)" || exit 1
_OCTO_FREEZE_FILE="/tmp/octopus-freeze-${_OCTO_SESSION_ID}.txt"
if [[ -e "$_OCTO_FREEZE_FILE" || -L "$_OCTO_FREEZE_FILE" ]]; then
    if [[ -f "$_OCTO_FREEZE_FILE" && ! -L "$_OCTO_FREEZE_FILE" &&
          -O "$_OCTO_FREEZE_FILE" && -s "$_OCTO_FREEZE_FILE" ]]; then
        printf 'Freeze already active; left unchanged.\n'
    else
        printf 'Unsafe or empty freeze state; stop and inspect it before retrying.\n' >&2
        exit 1
    fi
else
    (umask 077; python3 - "$_OCTO_FREEZE_FILE" "$freeze_dir" <<'PYFREEZE'
import os
import sys

try:
    fd = os.open(sys.argv[1], os.O_WRONLY | os.O_CREAT | os.O_EXCL, 0o600)
    with os.fdopen(fd, "w", encoding="utf-8") as state:
        state.write(sys.argv[2] + "\n")
except OSError:
    raise SystemExit("Freeze activation failed; inspect the state before retrying.")
PYFREEZE
    ) || exit 1
fi

Activation requires a nonempty CLAUDE_CODE_SESSION_ID or CLAUDE_SESSION_ID. Both activation and freeze enforcement require Python 3. Existing empty, symlinked or nonregular state is refused for manual inspection; active state contents are never read or printed by this activation check. Exclusive creation refuses a state path introduced after the check.

A freeze that is already active (from /octo:freeze, /octo:guard or an earlier workflow) stays as it is: do not replace it, and do not remove it when debugging ends. Its current boundary still blocks edits outside that scope. To target another module, consciously unfreeze and freeze the new scope before editing. 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 only if this workflow created the freeze and the state file still names the directory it set; a different directory means the user froze again since, so leave that freeze in place.

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

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Interpret the saved results of a completed AI council review. Count verdicts, check whether enough participants responded and whether models are independent, surface substantive dissent, and explain what action the outcome supports.

中文简介正在准备中。当前显示英语简介。

  • Explain a completed council review
  • Check vote counts and quorum
  • Assess model independence and dissent
nyldn/claude-octopus42692026年10月19日 更新

Turn a technical choice into a structured debate between different AI model families. Assign explicit positions, launch the discussion, and summarize agreement, disagreement, and a recommendation supported by the strongest argument that survives the debate.

中文简介正在准备中。当前显示英语简介。

  • Compare Redis and Memcached for session storage
  • Debate monorepo versus polyrepo organization
  • Examine a technical choice from opposing positions
nyldn/claude-octopus42692026年10月19日 更新

Clarify a feature’s requirements with multiple AI providers, combining technical constraints with user and business needs. Produce a scoped definition covering priorities, edge cases, exclusions, and a requirements checklist before implementation begins.

中文简介正在准备中。当前显示英语简介。

  • Defining requirements for a user authentication system
  • Setting boundaries for a notification feature
  • Identifying technical constraints and edge cases
nyldn/claude-octopus42692026年10月19日 更新

Review code or documents with available AI providers before delivery. Combine findings into a scored validation report that checks prior requirements and decisions, separates critical issues from warnings, and recommends next steps.

中文简介正在准备中。当前显示英语简介。

  • Review authentication code before release
  • Check API readiness before deployment
  • Review a PRD for missing requirements
nyldn/claude-octopus42692026年10月19日 更新

Develop complex features or business documents by gathering approaches from available AI providers. Combine their perspectives with prior project decisions and quality checks to produce a proposed plan, then proceed with implementation after user confirmation.

中文简介正在准备中。当前显示英语简介。

  • Planning and implementing a complex feature
  • Comparing approaches for an external service integration
  • Developing a product requirements document or strategy
nyldn/claude-octopus42692026年10月19日 更新

Research technical or business questions through multiple available AI providers, each assigned a different perspective. Combine usable results into a report covering findings, disagreements, evidence gaps, priorities, and recommended next steps.

中文简介正在准备中。当前显示英语简介。

  • Compare libraries and technical approaches
  • Research markets and competitor strategies
  • Synthesize literature from multiple perspectives
nyldn/claude-octopus42692026年10月19日 更新

查看 nyldn 的全部技能

报告此技能的问题