agentleFS
bonez-iobonez-io/re_gent/.claude/skills/bug-blame/SKILL.md

bug-blame

Skill4 starsChanged 6 months agoApache-2.0View on GitHub

Trace a bug or incident back through captured history to the change that caused it, the prompt behind that change, and its blast radius. Use when something broke and you need to know what changed and why.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If given a path or path:line, start there:

    line 15
  2. Very specific:

    Read the user message on that step.

    line 36
  3. Distinctive:

    Check the assistant message too.

    line 41

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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.

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

Answer four questions about a defect, in order: what changed, when, why, and what else moved with it.

git blame answers the first two. Only re_gent answers the third — the prompt that caused the edit — and the fourth is what turns a fix into a safe fix.

1. What changed

If given a path or path:line, start there:

rgt blame <path>[:<line>]

Each line carries the step hash that last wrote it. Take the step for the suspect line. If given only a symptom, find candidate files first with rgt log --json -n 50 and match against the described behaviour.

2. When, and in what company

rgt show <step-hash>

This gives the full step: timestamp, tool calls with their arguments and results, every file the turn touched, and the surrounding conversation.

3. Why — the prompt

Read the user message on that step. This is the instruction the agent was following. State it verbatim. Very often the bug is not a coding mistake but a faithful execution of an ambiguous or wrong instruction, and that distinction changes the fix: rewrite the code, or rewrite the expectation.

Check the assistant message too. If the agent explained a tradeoff or flagged an assumption, the defect may be a known compromise rather than an accident.

4. Blast radius

The step's files list is the immediate radius — everything that turn changed under one intention. Widen it:

  • Other steps in the same session, before and after (rgt log --session <id>), since a multi-turn task spreads one intention across several steps.
  • Files that habitually travel with the suspect file — invoke the file-coupling skill. A file coupled to the culprit but not touched in this step is the highest-value thing to check: it usually should have changed and did not.

Report

Symptom     <what the user described>
Cause       step <hash> · <timestamp> · <tool>
Prompt      "<the user instruction, verbatim>"
Reasoning   <what the agent said it was doing, if relevant>
Changed     <files in that step>
Also check  <coupled files that did NOT change — likely gaps>
Session     <session id>, step N of M

Finish with a recommended next action: fix forward, or rgt rewind <step> to restore the workspace to before the change. Name the rewind target explicitly and say that rewind snapshots the current state first, so it is reversible.

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.