agentleFS
adtn0810adtn0810/truestack/skills/systematic-debugging/SKILL.md

systematic-debugging

Skill2 starsChanged 2 months agoMITView on GitHub

Use when diagnosing broken, incorrect, flaky, slow, or resource-heavy behavior, or checking a claimed root cause. Require causal evidence before confirmation; skip routine implementation without a defect.

190 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use chinese-code-review, chinese-commit-conventions and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • Leodorareluctant259Skill

    chinese-code-review

    中文代码审查规范——在保持专业严谨的同时,用符合国内团队文化的方式给出有效反馈

    Also in 8 projects that use this

  • Leodorareluctant259Skill

    chinese-commit-conventions

    中文 Git 提交规范 — 适配国内团队的 commit message 规范和 changelog 自动化

    Also in 8 projects that use this

  • obraSkill

    diagnosing-superpowers

    Use when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.

    Also in 20 projects that use this

  • mjunaidcaSkill

    building-chatgpt-apps

    Guides creation of ChatGPT Apps with interactive widgets using OpenAI Apps SDK and MCP servers. Use when building ChatGPT custom apps with visual UI components, embedded widgets, or rich interactive experiences. Covers widget architecture, MCP server setup with FastMCP, response metadata, and Developer Mode configuration. NOT when building standard MCP servers without widgets (use building-mcp-servers skill instead).

    Also in 4 projects that use this

  • mjunaidcaSkill

    building-chat-interfaces

    Build AI chat interfaces with custom backends, authentication, and context injection. Use when integrating chat UI with AI agents, adding auth to chat, injecting user/page context, or implementing httpOnly cookie proxies. Covers ChatKitServer, useChatKit, and MCP auth patterns. NOT when building simple chatbots without persistence or custom agent integration.

    Also in 4 projects that use this

  • +2 more from Leodorareluctant259
  • +5 more from mjunaidca

The file

Files
SKILL.md

Systematic debugging

Find the failing mechanism before changing it. Preserve the smallest useful reproduction, the observed result, the expected result, and the relevant environment or version. If a production issue cannot reproduce locally, collect bounded evidence from the affected path using existing authorized read access.

Trace the failing input through the code and component boundaries. Check recent changes, logs, exceptions, configuration, dependency versions, and stored state only as the evidence requires. Distinguish an observed fact from an explanation. An error message identifies where failure surfaced; it does not automatically identify its cause.

Form a testable hypothesis and choose a probe that can separate it from plausible alternatives. Change one meaningful variable at a time. Prefer inspecting an invariant, reproducing a boundary case, or tracing a request over speculative edits. Keep temporary diagnostics narrow, redact sensitive data, and remove them when no longer useful.

Evidence before a diagnosis

Use explicit certainty labels: observed symptom, suspected cause, or confirmed cause for a stated scope. Do not announce “root cause found” merely because code looks wrong, a log correlates with the failure, or another agent sounds confident. A real defect in an unused path can be unrelated to the reported incident.

Before confirming, establish the reported failure, connect the proposed mechanism to the executed path and relevant input/state, and obtain a discriminating result. A controlled failure-before/fix-after reproduction with a matching trace or code path is strong evidence; so is decisive captured execution evidence when reproduction is unavailable. A passing suite, a workaround, or disappearance after several simultaneous changes does not by itself establish causality. If the evidence does not distinguish plausible causes, retain the hypothesis label and continue investigating within authorization.

Provide the proof with the diagnosis, without waiting to be asked: the observed failure, source/trace location, and probe or test result that supports the causal link. State the scope proved. A local reproducer does not automatically establish production attribution; that needs matching incident conditions/version evidence. Do not perform unauthorized production writes to obtain proof.

Preserve the certainty label and raw evidence in handoffs. If later evidence disproves a diagnosis, retract it explicitly and update the explanation; do not replace one unsupported confident claim with another. These rules gate claims, not progress: investigation and clearly labelled mitigation can continue while the cause is uncertain.

After two failed fixes for the same symptom, stop patching and revisit the model with fresh evidence or an independent investigation. Changing the patch does not reset the count. Do not repeat an identical unsuccessful attempt, mask an exception, loosen an assertion, or add arbitrary sleeps merely to make the signal disappear.

Performance mode

Define the metric, workload, data size, concurrency, and environment that represent the complaint. Capture a comparable baseline. Use a profiler, trace, query plan, allocation/connection evidence, or browser timing to locate the actual bottleneck. Check query count and cardinality before adding indexes or caches. Apply one justified change, then remeasure under comparable conditions and confirm correctness. Report absolute measurements and conditions; separate measured improvement from expected production benefit.

Fix and close

Choose the smallest fix that removes the cause while preserving unrelated behavior. Reproduce the original failure after the fix and add a meaningful regression guard when it protects a likely recurrence. Use test-verify for repository checks and database-api-evolution when the remedy changes persisted state or an API contract.

Conclude with the cause, evidence, changed behavior, and verification. If the cause remains uncertain, label the hypothesis and the next discriminating check. A workaround may be useful, but report its limits and remaining investigation honestly.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.