agentleFS
rpraharajrpraharaj/ai-sdlc/skills/revert-change/SKILL.md

revert-change

Skill0 starsChanged 18 days agoMITView on GitHub

Safely undo a commit, merge, PR, or deploy without rewriting shared history. Use when the user asks to revert, roll back, undo a merge, or back out a change. Do not reset shared branches.

1 other project uses a version of this, 1 of them edited.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If you cannot name the target, stop.

    line 32
  2. Distinctive:

    Run AGENTS.md Test if cheap.

    line 45

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Revert change

Undo a known change. Prefer a new revert commit. Do not reset --hard or force-push a branch other people use.

Is this the right skill?

SignalDo this instead
Live incident, action not yet chosenincident-triage first
Spoken rollback plan for a releaseplan-rollback then this if git undo is the step
Not a git repostop

Required inputs

  • Exact target: commit SHA, merge, PR/MR, tag, or release
  • git
  • For a deployed target: context/environments.md, context/decision-rights.md, and the named rollback plan; missing authority or environment → stop before runtime changes

If you cannot name the target, stop.

Human decisions (do not invent)

  • reset --hard (only if they asked to discard, local branch, unpushed)
  • Push (only if asked; never force to default branch)

Procedure

  1. Identify the target (git log, status, current branch).
  2. Shared/pushed/merge → git revert (-m 1 on a merge). Default branch → revert only, never reset. Unpushed local commits on your branch → reset only as they asked.
  3. Deploy already out: identify the exact deployed revision and environment before any runtime action. Use the existing rollback plan and verify authorized human evidence using context/decision-rights.md. A git revert does not authorize production rollback. If policy reserves production execution for a human, hand off the reviewed command; otherwise run only the explicitly approved existing rollback. Unknown or stale authority → stop. If no rollback path exists, say what a human must decide.
  4. Secret files: a revert must not restore committed secrets without telling the user.
  5. Run AGENTS.md Test if cheap. If this stopped a fire, a focused check is enough — say what you did not run.

Output

  • Path: the revert commit (or local reset)
  • Template: references/revert-report.md

Quality bar

  • Target named
  • Shared history not rewritten
  • No force to main/master/trunk
  • Runtime rollback has current target/environment approval evidence and respects the production execution policy

Done

Fill the report. Do not push unless asked.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.