rollback
Skill4 starsChanged 48 days agoMITView on GitHub
Safely undo committed or shipped changes with non-destructive git revert or restore. Use only when the user explicitly asks to roll back, revert, undo, back out, or restore; never reset hard, force-push, or substitute for PR review, monitoring, or issue status work.
- Deletes or force-pushes
10 other projects use a version of this.
Adopted by
Most recently taken up by
- synaptiai/agent-capability-standardtheir own version, first seen Nov 1, 2026
- elfrost/ai-patchlabtheir own version, first seen Oct 13, 2026
- tejastn10/workbenchtheir own version, first seen Oct 13, 2026
- purpleeddy/claddingtheir own version, first seen Oct 11, 2026
- popup-studio-ai/bkit-claude-codetheir own version, first seen Oct 8, 2026
- kapadias/nonnatheir own version, first seen Oct 1, 2026
Other versions10 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 10
- suboss87/FDEOps★ 940same name
- popup-studio-ai/bkit-claude-code★ 605same name
- ww-w-ai/bkit-claude-code★ 605same name
- ww-w-ai/bkit-gemini★ 66same name
- nahid-sparktales/agent-dispatcher★ 59same name
- purpleeddy/cladding★ 16same name
- synaptiai/agent-capability-standard★ 6same name
- elfrost/ai-patchlab★ 1same name
- tejastn10/workbench★ 1same name
- kapadias/nonna★ 0same 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 repository51 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .cursor/rules/permissions-guidance.mdcCursor rule
- claim-safetySkill
- devSkill
- gatesSkill
- hermes-forgeSkill
- issue-basicsSkill
- kernelSkill
- memorySkill
- parallel-deep-researchSkill
- planSkill
- portabilitySkill
- researchSkill
- reviewSkill
- rollbackSkill
- setupSkill
- shepherdSkill
- shipSkill
- smithSkill
- sonarcloud-analysisSkill
- sonarcloudSkill
- statusSkill
- triage-readySkill
- using-forgeSkill
- validateSkill
- verifySkill
- worktreeSkill
- claim-safetySkill
- devSkill
- gatesSkill
- hermes-forgeSkill
- issue-basicsSkill
- kernelSkill
- memorySkill
- parallel-deep-researchSkill
- planSkill
- portabilitySkill
- researchSkill
- reviewSkill
- setupSkill
- shepherdSkill
- shipSkill
- smithSkill
- sonarcloud-analysisSkill
- sonarcloudSkill
- statusSkill
- triage-readySkill
- using-forgeSkill
- validateSkill
- verifySkill
- worktreeSkill
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 3 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 9 edited versions we read keep these.
3
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
- Very specific: line 42
Commit hashes: Must match /^[0-9a-f]{4,40}$/i or be 'HEAD'
- Distinctive: line 56
No git operations performed
- Distinctive: line 60
Never uses git reset --hard (destructive)
- Distinctive: line 102
When to reach for rollback, how it fits the workflow, how revert state is recorded, and error recovery are in …
“Common” is measured: kept by at least 6 in 10 of the 9 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
Comprehensive rollback system with multiple methods and automatic USER content preservation.
Rollback
This skill provides safe rollback operations with comprehensive validation and USER section preservation.
Usage
bunx forge rollbackInteractive menu with 6 options:
- Rollback last commit - Quick undo of most recent change
- Rollback specific commit - Target any commit by hash
- Rollback merged PR - Revert an entire PR merge
- Rollback specific files - Restore only certain files
- Rollback entire branch - Revert multiple commits
- Preview rollback - Dry run mode (shows changes without executing)
How It Works
Safety Features
1. Working Directory Check
- Requires clean working directory (no uncommitted changes)
- Prevents accidental data loss
- Prompts to commit or stash changes first
2. Input Validation
- Commit hashes: Must match
/^[0-9a-f]{4,40}$/ior be 'HEAD' - File paths: Validated to be within project (prevents path traversal)
- Methods: Whitelisted to 'commit', 'pr', 'partial', 'branch'
- Shell metacharacters: Rejected (
;,|,&,$,`,(,),<,>,\n,\r)
3. USER Section Preservation
- Automatically extracts USER sections before rollback
- Restores USER sections after rollback
- Preserves custom commands in
.claude/commands/custom/ - Amends rollback commit to include restored content
4. Dry Run Mode
- Preview affected files without executing
- Shows what would change
- No git operations performed
5. Non-Destructive
- Uses
git revert(creates new commit) - Never uses
git reset --hard(destructive) - Preserves full git history
- Can be undone with another rollback
USER Section Preservation
What Gets Preserved:
<!-- USER:START -->
Your custom content here
<!-- USER:END -->
<!-- USER:START:custom-name -->
Named USER section
<!-- USER:END:custom-name -->Process:
- Extract all USER sections from AGENTS.md, CLAUDE.md, etc.
- Backup custom commands from
.claude/commands/custom/ - Execute rollback operation
- Restore USER sections to current file content
- Restore custom command files
- Amend rollback commit to include restored content
Result: Your customizations survive rollback operations.
Rollback methods
Six methods, selected interactively. Full step-by-step walkthroughs (commands, prompts, expected output) are in references/methods.md — read it when running a specific rollback.
- Rollback last commit — undo the most recent commit.
- Rollback specific commit — revert one commit by hash.
- Rollback merged PR — revert a merge commit.
- Rollback specific files — restore named files from the previous commit.
- Rollback entire branch — reset a range.
- Preview (dry run) — show what a rollback would do, change nothing.
Integration, issue status & troubleshooting
When to reach for rollback, how it fits the workflow, how revert state is recorded, and error recovery are in references/workflow-integration.md.
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.

