git-recovery
Skill1 starsChanged 28 days agoMITView on GitHub
Conductor-only. Emergency and advanced git procedure — undoing commits, recovering lost work (reflog), stash vs checkpoint, cherry-pick, bisect, history rewrites, deleting branches, and resolving merge/rebase/cherry-pick conflicts.
- Deletes or force-pushes
- Commits and pushes
4 other projects use a version of this.
Adopted by
Most recently taken up by
- d4rken/clankermuxtheir own version, first seen Nov 2, 2026
- gabrielbauman/skillstheir own version, first seen Nov 1, 2026
- Indium-AI-Labs/indium-agentkittheir own version, first seen Nov 1, 2026
- Ionate-Technologies/indium-agentkittheir own version, first seen Oct 20, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- Indium-AI-Labs/indium-agentkit★ 18same name
- Ionate-Technologies/indium-agentkit★ 17same name
- d4rken/clankermux★ 11same name
- gabrielbauman/skills★ 1same 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 repository20 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- adversarial-reviewSkill
- clean-architectureSkill
- decision-recordingSkill
- design-system-checkSkill
- dispatch-handoffSkill
- feature-branchingSkill
- finding-dispositionSkill
- gotcha-recordingSkill
- human-checkpointSkill
- plan-reviewSkill
- plan-writingSkill
- pr-createSkill
- simplicity-ladderSkill
- spec-writingSkill
- subagent-contractSkill
- subagent-dispatchSkill
- tdd-loopSkill
- update-toolkitSkill
- wiki-updateSkill
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 1 is distinctive, and 1 is very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
1
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
- Distinctive: line 9
Before any destructive git operation, run git status --porcelain and account for every line (rule 21).
- Very specific: line 29
If union-merging docs/wiki/log.md puts entries out of order, sort them oldest-first by ## [YYYY-MM-DD HH:MM] in the merge commit.
“Common” is measured: kept by at least 6 in 10 of the 4 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.
Files
Git Recovery
Before any destructive git operation, run git status --porcelain and account for every line (rule 21).
Rules for the risky operations
- Destructive = ask first:
git reset --hard,git branch -D,git clean, force-push, or any history rewrite requireshuman-checkpointapproval and a tag first (git tag checkpoint-$(date -u +%Y%m%dT%H%M%SZ)).git reset --soft/git resetof an unpushed commit preserves changes and needs neither. - Checkpoint over stash: Pause mid-task with a tagged
wip:commit (feature-branching § Mid-task pause). Use stash only for a brief same-session pause (git stash push -u -m "wip: <unique tag>", apply by SHA fromgit stash list --format='%H %gs', never baregit stash pop). - Merge, never rebase, to sync: Rebase +
--force-with-leaserequires explicit human approval; bare--forceor rebasingdevelop/mainis forbidden. - Lost commits: Recover from
git reflogviagit checkout -b recover/<stamp> <sha>. - Sensitive data in history: Requires human approval, then
git filter-repo --path <file> --invert-paths(neverfilter-branch). - Cherry-pick sparingly (prefer merging related branches).
- Bisect with
git bisect run <test command>and always finish withgit bisect reset. - Deleting a merged branch:
git branch -d <branch>andgit push origin --delete <branch>(-Drequires approval).
Resolving conflicts
On CONFLICT (content), resolve every hunk on its merits (never take one side wholesale) and complete the operation (git commit or rebase/cherry-pick --continue) only after no conflict markers remain and the full test suite passes.
- Ambiguous hunk or failing suite after resolution →
human-checkpoint. - When in doubt with no human available: abort (
git merge --abort/rebase --abort/cherry-pick --abort), tag a checkpoint, and runhuman-checkpoint.
If union-merging docs/wiki/log.md puts entries out of order, sort them oldest-first by ## [YYYY-MM-DD HH:MM] in the merge commit.
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.

