code-change-undo-revert
Skill136 starsChanged 5 months agoMITView on GitHub
Restore requested code changes or checkpoints.
- Deletes or force-pushes
In this repository80 other files it gives its agents.
- AGENTS.mdAGENTS.md
- accessibility-audit-websitesSkill
- accessibility-performance-polishSkill
- agent-evaluation-operationsSkill
- agent-memory-provenanceSkill
- agent-orchestration-architectureSkill
- animation-easing-languageSkill
- animation-jank-qaSkill
- animation-tool-routerSkill
- anti-generic-website-reviewSkill
- brand-voice-to-ui-copySkill
- browser-inspection-workflowSkill
- code-change-safety-checkpointSkill
- color-material-lighting-directionSkill
- content-pruning-reviewSkill
- content-structure-information-architectureSkill
- conversion-forms-checkout-polishSkill
- creativitySkill
- critical-thinkingSkill
- cross-browser-qaSkill
- css-grid-editorial-systemsSkill
- cta-language-systemsSkill
- deep-researchSkill
- design-motion-principlesSkill
- editorial-typography-systemsSkill
- evidence-reconciliationSkill
- final-client-handoffSkill
- frontend-quality-auditorSkill
- frontend-tooling-trust-gateSkill
- gsap-performanceSkill
- hero-image-art-directionSkill
- image-crop-responsive-qaSkill
- image-video-loading-qaSkill
- logical-thinkingSkill
- mobile-responsive-qaSkill
- modern-site-engineeringSkill
- motion-language-directorSkill
- motion-performance-qaSkill
- motion-react-layout-transitionsSkill
- motion-react-microinteractionsSkill
- motion-react-page-transitionsSkill
- motion-react-patternsSkill
- nextjs-app-router-routingSkill
- nextjs-server-client-boundariesSkill
- nextjs-site-architectureSkill
- non-generic-web-copySkill
- performance-audit-websitesSkill
- performance-budget-labSkill
- premium-visual-reference-librarySkill
- premium-web-build-gateSkill
- radix-accessible-primitivesSkill
- react-accessible-componentsSkill
- react-component-compositionSkill
- react-component-craftSkill
- react-error-loading-empty-statesSkill
- react-form-patternsSkill
- react-responsive-componentsSkill
- react-state-and-effects-disciplineSkill
- reduced-motion-designSkill
- responsive-visual-polish-qaSkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. About 0 are common, 13 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈13
Distinctive · estimate
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 8
Use this skill when the user wants to go back safely.
- Distinctive: line 12
Use these phrases only when the surrounding request establishes code/repository rollback intent:
- Distinctive: line 27
Run git status --short --branch when in a git repo.
- Distinctive: line 32
If the user wants only your latest edits undone, revert only those files or hunks.
- Distinctive: line 33
If the user wants a branch or commit reverted, inspect the commit range first.
- Distinctive: line 34
If a local backup exists, compare backup files before copying anything back.
- Distinctive: line 36
Avoid broad destructive commands.
- Distinctive: line 37
Do not run git reset --hard, git clean -fd, or branch deletion unless explicitly authorized for the resolved scope.
- Distinctive: line 38
Do not remove untracked files until you know they are safe to delete.
- Distinctive: line 39
Do not overwrite user edits mixed into a file unless the user approves.
- Very specific: line 42
Use git restore for the explicitly selected working-tree/index state.
- Distinctive: line 43
Prefer patch-level edits when user and assistant changes are mixed.
- Distinctive: line 44
Prefer copying from a timestamped backup only for files known to belong to the requested rollback.
- Distinctive: line 47
Run relevant tests, builds, or diff checks when possible.
≈ “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.
Files
Code Change Undo And Revert
Use this skill when the user wants to go back safely. The job is to identify what changed, preserve user work, and choose the least destructive undo path.
Trigger
Use these phrases only when the surrounding request establishes code/repository rollback intent:
- undo
- revert
- roll back
- restore
- recover
- go back to before
- remove your changes
- bring back deleted code
- compare against the checkpoint
Workflow
- Inspect the current state.
- Run
git status --short --branchwhen in a git repo. - Review changed files before reverting anything.
- Identify whether changes are yours, the user's, generated output, or mixed.
- Run
- Choose the safest target.
- If the user wants only your latest edits undone, revert only those files or hunks.
- If the user wants a branch or commit reverted, inspect the commit range first.
- If a local backup exists, compare backup files before copying anything back.
- Avoid broad destructive commands.
- Do not run
git reset --hard,git clean -fd, or branch deletion unless explicitly authorized for the resolved scope. Do not seek a second confirmation for an already precise authorization. - Do not remove untracked files until you know they are safe to delete.
- Do not overwrite user edits mixed into a file unless the user approves.
- Do not run
- Apply the revert.
- Use
git restorefor the explicitly selected working-tree/index state; inspect its source first. Usegit revert <commit>to reverse a committed change while preserving history when that is the requested operation. - Prefer patch-level edits when user and assistant changes are mixed.
- Prefer copying from a timestamped backup only for files known to belong to the requested rollback.
- Use
- Verify and report.
- Run relevant tests, builds, or diff checks when possible.
- Summarize what was restored, what remains changed, and any files intentionally left alone.
User Communication
Be explicit:
- what checkpoint or commit you are reverting to
- which files will change
- which files contain user changes and are being preserved
- which commands were run
- how to inspect the result
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.

