code-change-undo-revert

code-change-undo-revert is a skill for Codex from TheGoat395/Codex-Skills. It costs 14 tokens per session (482 once invoked), scanned A, original, MIT.

A skill for safely undoing or reverting code changes. It first inspects the current work and identifies whether changes belong to the user, the agent, or generated output before choosing a recovery method.

In plain words
What is it for?
Use it to undo recent edits, restore deleted code, compare work with a checkpoint, or roll back selected files or changes.
Why use it?
It reduces the risk of deleting unrelated work or overwriting user edits when going back to an earlier state.

Skill for Codex

Written for Codex: agents/openai.yaml present.

Good fit Use it to undo recent edits, restore deleted code, compare work with a checkpoint, or roll back selected files or changes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/thegoat395/codex-skills/code-change-undo-revert
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add TheGoat395/Codex-Skills --skill code-change-undo-revert
Clone the repo
git clone --depth 1 https://github.com/TheGoat395/Codex-Skills

Made for: Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for code-change-undo-revert

README.md
[![agentmods](https://agentmods.dev/badge/skills/thegoat395/codex-skills/code-change-undo-revert.svg)](https://agentmods.dev/skills/thegoat395/codex-skills/code-change-undo-revert)
Your own site
<a href="https://agentmods.dev/skills/thegoat395/codex-skills/code-change-undo-revert"><img src="https://agentmods.dev/badge/skills/thegoat395/codex-skills/code-change-undo-revert.svg" alt="Measured on agentmods" height="20"></a>
Per session 14 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 482 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Tool Misuse · line 37
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00014 $0.00482
Opus 5 $0.00007 $0.00241
Sonnet 5 $0.00003 $0.00096
Haiku 4.5 $0.00001 $0.00048

Measured yesterday against content hash d7f6068fed40, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

code-change-undo-revert scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/code-change-undo-revert/SKILL.md · 59 lines

How it starts

The opening of the file, as written. The whole thing — 59 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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

  1. Inspect the current state.

    • Run git status --short --branch when in a git repo.
    • Review changed files before reverting anything.
    • Identify whether changes are yours, the user's, generated output, or mixed.
  2. 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.
  3. 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.
  4. Apply the revert.

    • Use git restore for the explicitly selected working-tree/index state; inspect its source first. Use git 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.
  5. 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

Read the full file on GitHub · 59 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday Changed · -33 tokens per session d7f6068fed40
  2. 8d ago First seen · 59 lines · 47 tokens per session scan A 118e759300c0

Subscribe to this mod's changes

code-change-undo-revert is a skill published in the GitHub repository TheGoat395/Codex-Skills (122 stars, last pushed 2d ago), licensed MIT. It adds 14 tokens to every session and 482 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

image-to-threejs

REQUIRES uv + Python 3.12 and a one-time git clone — unlike the other asset skills, this one is not Node-only. Turn a generated reference image into a rigged, procedural Three.js prop — code, not a mesh file. Generate ONE clean product-shot reference with vg generate, author a component spec (parts, materials, pivots…

kyh/vibedgames · 186 tokens

game-ui

Game interface craft — HUD zoning and hierarchy, fixed-width numerals, alert-color roles, meters over stat cards, menu/overlay states, touch controls (44px targets, safe-area insets, pointer-release handling) — for Phaser, Three.js, and DOM overlays. Use when: building or reviewing a HUD, score/timer/health display…

kyh/vibedgames · 106 tokens

design-pipeline

A build-and-test workflow for turning Figma designs into shadcn/ui components, a reusable set of interface components for React-based projects. It checks the result in a real browser at three screen sizes and runs accessibility checks.

sodam-ai/SoDam-Design-Kit · 77 tokens

swiftui-animation

Implement, diagnose, or review SwiftUI motion using explicit and scoped implicit animations, springs, transitions, PhaseAnimator, KeyframeAnimator, matched geometry or navigation zoom, SF Symbol effects, and custom Animation types. Use when views should animate on state changes, insertion, removal, navigation, or…

dpearson2699/swift-ios-skills · 77 tokens

swiftui-gestures

Implement, review, or improve SwiftUI gesture handling. Use when adding tap, long press, drag, magnify, or rotate gestures, composing gestures with simultaneously/sequenced/exclusively, managing transient state with @GestureState, resolving parent/child gesture conflicts with highPriorityGesture or…

dpearson2699/swift-ios-skills · 92 tokens

focus-engine

Implements keyboard, directional, and scene-level focus behavior across SwiftUI and UIKit. Use when managing @FocusState, defaultFocus, focused values, focusable interactions, focus sections, tvOS geometric focus and Siri Remote navigation, watchOS Digital Crown input, visionOS connected-device focus versus gaze…

dpearson2699/swift-ios-skills · 98 tokens