bug-investigator
Skill875 starsChanged 4 months agoMITView on GitHub
Use when encountering any bug, test failure, or unexpected behavior during spec-superflow execution, before proposing fixes. Invoked automatically when build-executor hits a blockage.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- GrishaAngelovGH/gemini-cli-agent-skillstheir own version, first seen Jan 8, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- GrishaAngelovGH/gemini-cli-agent-skills★ 16same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository11 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
- llms.txtllms.txt
- build-executorSkill
- code-reviewerSkill
- contract-builderSkill
- need-explorerSkill
- release-archivistSkill
- spec-mergerSkill
- spec-writerSkill
- workflow-startSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 5 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
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
- Very specific: line 10
Before executing a CLI line below, replace its leading SSF with node "<plugin-root>/scripts/spec-superflow.mjs".
- Distinctive: line 24
No fixes without root cause investigation first.
- Distinctive: line 28
Use for ANY technical issue: test failures, bugs, unexpected behavior, performance problems, build failures, integration issues.
- Distinctive: line 30
Don't skip because issue "seems simple" or you're "in a hurry" — systematic debugging is faster than thrashing.
- Distinctive: line 41
Multi-component systems: add diagnostic instrumentation at each component boundary.
- Distinctive: line 64
Verify the regression and affected checks, record the outcome in the existing progress entry, then return to build-executor in executing.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
Bug Investigator
Bundled runtime
Before executing a CLI line below, replace its leading SSF with node "<plugin-root>/scripts/spec-superflow.mjs"; <plugin-root> is the absolute directory two levels above this file. Never run SSF literally or call an ssf from PATH.
Workflow routing
A new request follows this file without loading legacy instructions. For an existing change, inspect the recorded state and receipt/plan (available through SSF workflow show <change-dir> --json and SSF execution show <dir> --json when needed). Current paths are workflow_variant: direct with a valid workflow-selection receipt schema_version: 3, or workflow_variant: planned with an execution plan schema_version: 2. Older receipts (schema 1/2), legacy plans and other recorded variants use the matching section of SSF runtime asset read docs/legacy-workflow.md; follow that section for this change. A direct variant alone is insufficient: legacy Quick/Hotfix/Lightweight can also record it. The internal workflow: full value alone is not a legacy signal. Missing or corrupt state, receipt or a required plan is a recovery problem; preserve evidence rather than reinitialize or downgrade the change.
Core principle: Find root cause before attempting fixes. Symptom fixes are failure.
New direct/planned changes
Investigate in executing without a phase transition or a separate debug ledger: reproduce, trace the root cause, make one focused repair and verify. Keep useful failure evidence in the existing progress entry. Three failures for the same unresolved issue warrant a decision; unrelated findings do not accumulate a shared budget. No task book or subagent is required.
The Iron Law
No fixes without root cause investigation first. If you haven't completed Phase 1, you cannot propose fixes.
When to Use
Use for ANY technical issue: test failures, bugs, unexpected behavior, performance problems, build failures, integration issues. Especially when under time pressure, "one quick fix" seems obvious, you've already tried multiple fixes, or you don't fully understand the issue.
Don't skip because issue "seems simple" or you're "in a hurry" — systematic debugging is faster than thrashing.
The Four Phases
Complete each phase before proceeding.
Phase 1: Root Cause Investigation
- Read error messages carefully: stack traces, line numbers, file paths, error codes — they often contain the exact solution
- Reproduce consistently: exact steps, every time? If not reproducible → gather more data, don't guess
- Check recent changes: git diff, recent commits, new dependencies, config changes, environment differences
- Multi-component systems: add diagnostic instrumentation at each component boundary. Log what enters and exits each layer. Run once to gather evidence, then analyze which component fails
- Trace data flow: backward tracing — where does the bad value originate? Keep tracing up until you find the source. Fix at source, not symptom
Phase 2: Pattern Analysis
- Find working examples of similar code in the same codebase
- Compare against references — read reference implementation completely
- Identify every difference between working and broken, however small
- Understand dependencies: other components, settings, config, environment, assumptions
Phase 3: Hypothesis and Testing
Scientific method: form a single hypothesis ("I think X is the root cause because Y"), test with the smallest possible change (one variable at a time), verify before continuing. If it didn't work, form a NEW hypothesis — don't add more fixes. When you don't know, say so and ask for help.
Phase 4: Implementation
- Create failing test case — simplest reproduction, automated if possible. Follow TDD rules from build-executor
- Implement single fix — address root cause, one change at a time, no "while I'm here" improvements
- Verify fix — test passes? no regressions? issue resolved?
- If the fix fails: preserve the evidence, return to Phase 1 and form a new hypothesis. Repeated failures of the same unresolved issue require a concrete decision; unrelated issues do not share an attempt budget.
Completion
Verify the regression and affected checks, record the outcome in the existing progress entry, then return to build-executor in executing. If evidence points to an environmental or external cause, state what is known and what remains unverified. Resume from that evidence after interruption.
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.

