Skip to content
Agentmart
Submit a tool

recover

Surgical recovery from production regressions caused by agent-introduced bugs.

Skill by drlove2002

IndexedMIT
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/drlove2002-recover

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Surgical recovery from production regressions caused by agent-introduced bugs. Finds the commit, classifies changes as intended vs drift, surgically reverts unrelated edits, checks blast radius on callers, and writes a regression test. Use when a client reports a bug, a regression is found in production, or the user says "what broke?" or "revert this safely".

Use cases: testing, agent-building

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/recover

What's inside

Skill name
recover
Description
Surgical recovery from production regressions caused by agent-introduced bugs. Finds the commit, classifies changes as intended vs drift, surgically reverts unrelated edits, checks blast radius on callers, and writes a regression test. Use when a client reports a bug, a regression is found in production, or the user says "what broke?" or "revert this safely".
License
MIT
Instructions
82 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# Regression Recovery

Recover from a production bug introduced by an agent change. The goal is surgical reversion — preserve the intended work, remove only the parts that caused harm, and add a regression test so it doesn't happen again.

## 1. Find the Commit

Ask the user which area is broken (command, feature, file). Then:

```bash
git log --oneline -20 -- <affected files>
```

Identify the commit that introduced the regression. If uncertain, present the candidates and let the user choose.

## 2. Full Diff Review

```bash
git show <commit> --stat          # Every file touched
git show <commit> -- <file>       # Per-file diff
```

## 3. Classify Every Changed Hunk

For each changed hunk, label it:

- `[FEATURE]` — part of the intended change. Keep.
- `[DRIFT]` — unrelated edit (cleanup, refactor, "improvement") that shouldn't have shipped. Revert.

Present the classification to the user before acting. Do not decide alone.

## 4. Blast Radius on Drifted Code

For every function, class, or import touched by `[DRIFT]` changes:

```bash
grep -r "function_name\|ClassName" --include="*.py" .
```

List every caller. Check if any of those callers have side-effect bugs from the drift.

## 5. Surgical Revert

For `[DRIFT]` hunks only — preserve `[FEATURE]` work:

```bash
# Revert a whole file back to pre-commit state
git checkout <commit>^ -- <file>

# OR for partial revert: use git checkout -p to select hunks
git checkout <commit>^ -- <file1> <file2>
```

If the drift is mixed into the same file as feature work, use `git checkout -p <commit>^ -- <file>` to interactively select hunks. Present the diff before committing.

## 6. Regression Test

Write a test that reproduces exactly what the client reported:

- The specific input or action
- The expected behavior
- The actual broken behavior before the fix

Run it, show it fails on the old code, passes after the revert.

## 7. Verify

```bash
# Run the regression test
# Run the existing test suite for the touched area
# Confirm the feature still works
```

Present results. Ask if this should be committed as a single `fix:` commit.

## Guardrails

- Never revert the entire commit blindly. Preserve feature work.
- Never add unrelated cleanup during recovery. Fix only the regression.
- Always present the classification before reverting. Let the user confirm.
- After recovery, save a brief postmortem to `$HOME/Projects/worldwide/plan/` — what drifted, why, and which guardrail would have caught it.

From drlove2002/ai-config, MIT.

More from drlove2002/ai-config

Signals

Stars
0
Forks
0
Open issues
0
Last commit (this folder)
Jul 17, 2026 (3 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from drlove2002

Cite this page

recover skill. Agent Mart. https://agentmart.dev/skills/drlove2002-recover (last updated 2026-10-24)