revert
Skill40 starsChanged 4 months agoMITView on GitHub
Git-aware revert that understands Draft tracks, phases, and tasks. Safely undo work at task, phase, or track level. Use when the user asks to 'revert this track', 'undo a phase', 'revert task X', or says 'roll back the last task', 'undo this work'.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- mindattic/Prosetheir own version, first seen Oct 16, 2026
- lukasrepublic/agentic-foundrytheir own version, first seen Oct 11, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- mindattic/Prose★ 4same name
- lukasrepublic/agentic-foundry★ 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 repository35 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- web/llms-full.txtllms.txt
- web/llms.txtllms.txt
- adrSkill
- assist-reviewSkill
- bughuntSkill
- changeSkill
- coverageSkill
- debugSkill
- decomposeSkill
- deep-reviewSkill
- deploy-checklistSkill
- discoverSkill
- docsSkill
- documentationSkill
- draftSkill
- graphSkill
- impactSkill
- implementSkill
- incident-responseSkill
- initSkill
- integrationsSkill
- jiraSkill
- learnSkill
- new-trackSkill
- opsSkill
- planSkill
- quick-reviewSkill
- reviewSkill
- standupSkill
- statusSkill
- tech-debtSkill
- testing-strategySkill
- tourSkill
- uploadSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
16 rules. About 0 are common, 8 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
Not checking for uncommitted changes first
- Very specific: line 16
Not updating Draft state after git revert
- Very specific: line 31
If draft/ does not exist: STOP — "No Draft context found.
- Distinctive: line 34
Run git status --porcelain.
- Distinctive: line 40
Ask user what level to revert:
- Distinctive: line 46
If user specifies by name/description, find the matching commits.
- Very specific: line 50
Primary method: Read plan.md — every completed task has its commit SHA recorded inline.
- Distinctive: line 54
Fallback method (if SHAs missing but completed tasks exist): Search git log by track ID pattern:
- Very specific: line 71
Cross-reference: Verify SHAs from plan.md match the git log results.
- Very specific: line 108
Read draft/workflow.md → ## Toolchain section for VCS CLI.
- Distinctive: line 128
Remove the commit SHA from the reverted task line
- Very specific: line 137
Update draft/tracks.md if track status changed
- Very specific: line 139
Stale reports: After revert, existing review-report-latest.md and bughunt-report-latest.md for the track are stale.
- Very specific: line 162
If the process is interrupted between git revert and Draft state update, the recovery procedure is: check git log for the revert commit, …
- Distinctive: line 168
If user says no to preview:
- Distinctive: line 174
If git revert has conflicts:
≈ “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
Draft Revert
Perform intelligent git revert that understands Draft's logical units of work.
Red Flags - STOP if you're
- Reverting without showing preview first
- Skipping user confirmation
- Not checking for uncommitted changes first
- Reverting more than requested
- Not updating Draft state after git revert
- Assuming you know which commits to revert without checking
Preview and confirm before any destructive action.
Step 0: Pre-flight Check
Verify Draft context exists:
ls draft/tracks.md 2>/dev/nullIf
draft/does not exist: STOP — "No Draft context found. Run/draft:initfirst."- Check working tree:
Run
git status --porcelain. If output is non-empty, warn the user about uncommitted changes and suggest stashing or committing first. Do NOT proceed until working tree is clean.
Step 1: Analyze What to Revert
Ask user what level to revert:
- Task - Revert a single task's commits
- Phase - Revert all commits in a phase
- Track - Revert entire track's commits
If user specifies by name/description, find the matching commits.
Step 2: Find Related Commits
Primary method: Read plan.md — every completed task has its commit SHA recorded inline. Use these SHAs directly.
If no commits found (all tasks are [ ] Pending with no SHAs): announce "No commits found for this scope — nothing to revert." and STOP.
Fallback method (if SHAs missing but completed tasks exist): Search git log by track ID pattern:
For Draft-managed work, commits follow pattern:
feat(<track_id>): <description>fix(<track_id>): <description>test(<track_id>): <description>refactor(<track_id>): <description>
# Find commits for a track
git log --oneline --grep="<track_id>"
# Find commits in date range (for phase)
git log --oneline --since="<phase_start>" --until="<phase_end>" --grep="<track_id>"Cross-reference: Verify SHAs from plan.md match the git log results. Git log is always authoritative for commit identification. plan.md is authoritative for task-to-commit mapping. On SHA mismatch, prefer git log and warn the user.
Step 3: Preview Revert
Show user what will be reverted:
═══════════════════════════════════════════════════════════
REVERT PREVIEW
═══════════════════════════════════════════════════════════
Reverting: [Task/Phase/Track] "[name]"
Commits to revert (newest first):
abc1234 feat(add-auth): Add JWT validation
def5678 feat(add-auth): Create auth middleware
ghi9012 test(add-auth): Add auth middleware tests
Files affected:
src/auth/middleware.ts
src/auth/jwt.ts
tests/auth/middleware.test.ts
Plan.md changes:
Task 2.1: [x] (abc1234) → [ ]
Task 2.2: [x] (def5678) → [ ]
═══════════════════════════════════════════════════════════
Proceed with revert? (yes/no)Step 4: Execute Revert
If confirmed:
Maintain a list of successfully reverted commits during execution.
Read draft/workflow.md → ## Toolchain section for VCS CLI. See core/shared/vcs-commands.md for the full command mapping.
git mode:
# Revert each commit in reverse order (newest first)
git revert --no-commit <commit1>
git revert --no-commit <commit2>
# ... continue for all commits
# Create single revert commit
git commit -m "revert(<track_id>): Revert [task/phase description]"On conflict, report: "Successfully reverted: [list]. Conflict on: [sha]. Run git revert --abort to undo partial state."
Step 5: Update Draft State
- Update
plan.md:- Change reverted tasks from
[x]to[ ] - Remove the commit SHA from the reverted task line
- Add revert note
- Change reverted tasks from
- Update
metadata.json:- Decrement tasks.completed
- Decrement phases.completed if applicable
- Update timestamp
- Note:
metadata.jsononly storesphases.total(int) andphases.completed(int). Decrementphases.completedif all tasks in a previously completed phase are reverted. Phase status markers ([~],[x],[ ]) are tracked inplan.mdtext, not inmetadata.json. Updateplan.mdphase headings accordingly: if any task in a completed phase is reverted, mark that phase[~]In Progress inplan.md; if ALL tasks are reverted, mark it[ ]Pending inplan.md.
- Update
draft/tracks.mdif track status changed - Stale reports: After revert, existing
review-report-latest.mdandbughunt-report-latest.mdfor the track are stale. Resolve symlink targets first:readlink -f review-report-latest.mdandreadlink -f bughunt-report-latest.md. Add a warning header to the symlink targets (the actual timestamped files):> **WARNING: This report predates a revert operation and may be stale. Re-run the review/bughunt.**Or delete them if the revert is substantial.
Step 6: Confirm
Revert complete
Reverted:
- [list of tasks/commits]
Updated:
- draft/tracks/<track_id>/plan.md
- draft/tracks/<track_id>/metadata.json
Git status:
- Created revert commit: [sha]
The reverted tasks are now available to re-implement.
Run /draft:implement to continue.Recovery
If the process is interrupted between git revert and Draft state update, the recovery procedure is: check git log for the revert commit, then manually update plan.md task statuses to match the reverted state.
Abort Handling
If user says no to preview:
Revert cancelled. No changes made.If git revert has conflicts:
Revert conflict detected in: [files]
Options:
1. Resolve conflicts manually, then run: git revert --continue
2. Abort revert: git revert --abort
Draft state NOT updated (pending revert completion).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.

