revert

revert is a skill for Claude Code from drafthq/draft. It costs 66 tokens per session (1,494 once invoked), scanned A, original, MIT.

A Git-based undo tool that understands Draft tracks, phases, and tasks. Git is the version-control system that records changes to a codebase.

In plain words
What is it for?
Use it to roll back a task, phase, or entire Draft track after reviewing the related commits and confirming the action.
Why use it?
It helps undo exactly the requested unit of work while checking for uncommitted changes and showing a preview before anything is reverted.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the draft plugin — 33 skills shipped together

Good fit Use it to roll back a task, phase, or entire Draft track after reviewing the related commits and confirming the action.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/drafthq/draft/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 drafthq/draft --skill revert
Clone the repo
git clone --depth 1 https://github.com/drafthq/draft

Made for: Claude Code.

Or install draft, the plugin that ships this one along with the rest of its 33 skills.

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 revert

README.md
[![agentmods](https://agentmods.dev/badge/skills/drafthq/draft/revert/github.svg)](https://agentmods.dev/skills/drafthq/draft/revert)
Your own site
<a href="https://agentmods.dev/skills/drafthq/draft/revert"><img src="https://agentmods.dev/badge/skills/drafthq/draft/revert/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for revert

Your own site · 80×15
<a href="https://agentmods.dev/skills/drafthq/draft/revert"><img src="https://agentmods.dev/badge/skills/drafthq/draft/revert.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 66 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,494 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 medium

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 →

  • medium Excessive Agency · line 17
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
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.00066 $0.01494
Opus 5.5 $0.00026 $0.00598
Sonnet 5.5 $0.00013 $0.00299
Haiku 4.5 $0.00007 $0.00149

Measured 1mo ago against content hash 6c425808c301, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

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 1mo ago.

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/revert/SKILL.md · 185 lines

How it starts

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

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

  1. Verify Draft context exists:

    ls draft/tracks.md 2>/dev/null
    

    If draft/ does not exist: STOP — "No Draft context found. Run /draft:init first."

  2. 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:

  1. Task - Revert a single task's commits
  2. Phase - Revert all commits in a phase
  3. Track - Revert entire track's commits

If user specifies by name/description, find the matching 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.

Read the full file on GitHub · 185 lines

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. 1mo ago First seen · 185 lines · 66 tokens per session scan A 6c425808c301

Subscribe to this mod's changes

revert is a skill published in the GitHub repository drafthq/draft (40 stars, last pushed 9d ago), licensed MIT. It adds 66 tokens to every session and 1,494 once invoked, about $0.0003 per session on Opus 5.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.