agentleFS
Hvftpie13Hvftpie13/Flashmind_Gemini-3.8-Flash_Smart-agent/skills/systematic-debugging/SKILL.md

systematic-debugging

Skill39 starsChanged 17 days agoMITView on GitHub

Use when something is broken — an error message, stack trace, failing test, crash, wrong output, "it doesn't work", build failure, or unexpected behavior. Finds the root cause with evidence before changing code, then records the fix in Engram memory.

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

We split this skill into the rules it gives an agent

9 rules. 0 are common, 8 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 177 edited versions we read keep these.

  • 8

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Do not guess-and-patch. Find the cause with evidence, fix it once, prove it is fixed.

    line 8
  2. Distinctive:

    When possible, write a failing test that captures the bug.

    line 17
  3. Distinctive:

    Read the stack trace from the top frame in project code, not library internals.

    line 20
  4. Distinctive:

    Read the real code at that location.

    line 21
  5. Distinctive:

    Write one sentence: "It fails because ___." It must be backed by something you observed (a printed value, a log line, a reproduced …

    line 26
  6. Distinctive:

    Ask "why?" until you reach a cause, not a symptom (e.g.

    line 28
  7. Very specific:

    Do not silence the error (empty catch, || true, // @ts-ignore, skip) unless that *is* the correct fix and you explain why.

    line 33
  8. Distinctive:

    After two failed hypotheses, stop and summarize: what you tried, what you observed, what you now suspect.

    line 51
  9. Distinctive:

    Ask the user for the missing piece rather than trying random changes.

    line 52

“Common” is measured: kept by at least 6 in 10 of the 177 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Systematic Debugging

Do not guess-and-patch. Find the cause with evidence, fix it once, prove it is fixed.

1. Check memory first

mem_search with the error message, module name, and symptom. This bug (or a cousin) may already be solved.

2. Reproduce

  • Get the exact error: full message, stack trace, command, input, environment.
  • Reproduce it yourself with the smallest possible command or test. If you cannot reproduce it, say so and collect more information (logs, versions, steps) instead of guessing.
  • When possible, write a failing test that captures the bug.

3. Locate

  • Read the stack trace from the top frame in project code, not library internals.
  • Read the real code at that location. Do not reason about code you have not opened.
  • Narrow down: add a temporary log/assert, use git log -p / git bisect for regressions, or comment out halves until the failure moves.

4. Find the root cause

Write one sentence: "It fails because ___." It must be backed by something you observed (a printed value, a log line, a reproduced condition) — not a hunch. Ask "why?" until you reach a cause, not a symptom (e.g. "null user" → "token expired" → "refresh not awaited").

5. Fix

  • Fix the cause, with the smallest change that does it.
  • Do not silence the error (empty catch, || true, // @ts-ignore, skip) unless that is the correct fix and you explain why.
  • Remove temporary logs.

6. Prove it

  • The reproduction from step 2 now passes.
  • Related tests still pass (see verify-before-done).

7. Save the lesson

mem_save with:

Title: <short bug name>
What: <symptom>
Why: <root cause>
Where: <file:line / module>
Lesson: <how to avoid or spot it next time>

When stuck

After two failed hypotheses, stop and summarize: what you tried, what you observed, what you now suspect. Ask the user for the missing piece rather than trying random changes.

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.