codebug
Skill0 starsChanged 5 months agoMITView on GitHub
The "diagnose" loop. Systematically diagnose root causes for bugs, errors, and unexpected behavior. Use this skill when something is broken and you need structured analysis instead of guessing — the core engine jumps here when cotest finds a failure.
In this repository20 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- new-skillSkill
- cobuildSkill
- cochallengeSkill
- cochangelogSkill
- coconsolidateSkill
- cocreatorSkill
- cocritiqueSkill
- codirectSkill
- codrawSkill
- cohardenSkill
- colearnSkill
- coplanSkill
- coresearchSkill
- cospecifySkill
- costudySkill
- cotestSkill
- cotranslateSkill
- my-skillSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 4 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 46
After adding or updating a record, refresh the index:
- Distinctive: line 73
Fixing the named symptom manufactures the next false pass: When you diagnose round *N* by its reported symptom and fix exactly that, round …
- Distinctive: line 89
Never assume; verify with evidence
- Distinctive: line 91
Document dead ends—they save time later
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Analyzing Problems
The doer is codebugger. This is the diagnose loop the core engine jumps to when cotest finds a failure; it feeds confirmed fixes back to cobuild and recurring lessons to colearn.
Purpose
Apply a structured, repeatable process to identify the true root cause of issues rather than treating symptoms.
When to Use
- A bug is reported or an error occurs
- Behavior differs from expectations
- A fix didn't work or the issue keeps recurring
- You need to explain why something broke
How to Use
- Reproduce the problem consistently
- Gather relevant logs, stack traces, and context
- Isolate the minimal conditions that trigger it
- Hypothesize potential causes
- Test each hypothesis systematically
- Verify the root cause before proposing fixes
Memory Bank
Storage: Resolve
workspaceRootfrom.agents/workspace/cocreation.yaml(default.agents). Inlocal, write the full record to<workspaceRoot>/skills/<name>/memory-bank/and refresh its index. Inlinear-primary, write the human-facing artifact through the active backend and keep provider metadata, links, and the local navigation/index cache; never write project records into the plugin cache.
Save each analysis as its own file in the memory bank, named after the problem:
.agents/skills/codebug/memory-bank/2026-06-26-login-timeout.mdCopy _template.md as a starting point and keep its frontmatter (title, date, status) filled in—those fields become the columns in the index. Do not write into ANALYSIS.md—that file is the auto-generated index.
After adding or updating a record, refresh the index:
node .agents/skills/codebug/index.mjsThis regenerates ANALYSIS.md with a link to every analysis in the folder.
Analysis Template
## Problem: [Short description]
- **Symptoms**: [What is happening?]
- **Expected**: [What should happen?]
- **Reproduction**: [Steps to trigger]
- **Hypotheses**:
1. [First guess]
2. [Second guess]
- **Tests**:
1. [Test 1 → Result]
2. [Test 2 → Result]
- **Root cause**: [Confirmed cause]
- **Fix**: [Solution or next step]Guardrail — re-verify against the full spec, not the last fix
Fixing the named symptom manufactures the next false pass. When you diagnose round N by its reported symptom and fix exactly that, round N+1 silently adopts that symptom as the whole pass bar — so the next defect, which the same spec would have caught, sails through because you only checked "is the last thing fixed?" Always re-verify a fix against the full original spec, never against the single symptom you just closed. A green on "the reported bug is gone" is not a green on "the behavior is correct."
Self-eval gate (close the loop)
- Root cause confirmed + fix verified → PASS forward to
cobuildto apply it, thencotestto re-check; log the lesson tocolearn. - Hypotheses exhausted, still not reproduced → re-loop with fresh evidence, bounded retries (default: cancel after ~3 passes, not extend the hunt).
- Needs a product/design decision or access you don't have → escalate to the human.
- Diagnosis reveals systemic drift across screens → cross-loop to
coconsolidate; if it's a hardening/robustness gap, hand tocoharden.
Principles
- Never assume; verify with evidence
- Change one variable at a time
- Document dead ends—they save time later
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
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.

