skill-git:revert

A command that restores one or more skills to an earlier version, undoing later changes.

In plain words
What is it for?
Use it to roll back a skill, restore a named version, or discard uncommitted skill changes.
Why use it?
It lets you recover from unwanted edits or a bad skill update while showing what will be removed and asking for confirmation first.

Command

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.

agentmods
npx agentmods add commands/knowledgexlab/skill-git/revert
Clone the repo
git clone --depth 1 https://github.com/KnowledgeXLab/skill-git
Per session 80 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,504 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00080 $0.02504
Opus 5 $0.00040 $0.01252
Sonnet 5 $0.00016 $0.00501
Haiku 4.5 $0.00008 $0.00250

Measured 2d ago against content hash 25ecbc7cbb5f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

skill-git: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 2d 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.

commands/revert.md · 271 lines

How it starts

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

You are running /skill-git:revert. Follow these steps exactly.

Task Tracking

You MUST create a task for each item below and update each task's status as you progress (pending → in_progress → completed):

  1. Select skill(s) — parse arguments or list registered skills for the user to choose
  2. Determine target version — detect dirty/clean state, resolve target tag for each skill
  3. Analyze changes — summarize what will be undone in plain language
  4. Confirm with user — show warning prompt and wait for explicit confirmation
  5. Execute revert — backup, reset, delete tags, update config.json
  6. Report result — display success/failure for each skill

Prelude

!bash "${CLAUDE_PLUGIN_ROOT}/scripts/sg-prelude.sh" $ARGUMENTS

If STATUS is not ok:

  • Re-examine RAW_ARGUMENTS — check if the user expressed an agent name or intent that can be semantically resolved (e.g. a typo, a paraphrase, or an implicit default).
  • If you can determine intent, note the resolution (e.g. "Treating -a cluade as claude") and proceed.
  • If STATUS is not_initialized and INITIALIZED_AGENTS is non-empty, suggest the user run /skill-git:init -a <agent>, or mention which agents are already available.
  • If STATUS is error, display REASON as a plain-language error and stop.
  • If intent cannot be resolved, display a clear error and stop.

Use AGENT, GLOBAL_BASE, and SKILLS_JSON from prelude output for all subsequent steps. The skills map referred to throughout this document is the parsed content of SKILLS_JSON.

Agent name in positional position: If $ARGUMENTS contains a known agent name (claude, gemini, codex, openclaw) as a standalone positional token not preceded by -a, silently treat it as -a <agent>: override AGENT, re-read GLOBAL_BASE and SKILLS_JSON from ~/.skill-git/config.json for that agent. Do not pass it to any skill-name parsing steps.

Step 1 — Select Skill(s)

Parse $ARGUMENTS for any skill name(s) or version hints expressed in natural language. Accepted forms:

  • No argument → list all registered skills and ask the user which one(s) to revert
  • One or more skill names → proceed with those skills
  • A version tag (e.g. v1.0.1) → use as the target version (resolve skill interactively if ambiguous)

Read the full file on GitHub · 271 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. 2d ago First seen · 271 lines · 0 tokens per session scan A 25ecbc7cbb5f

Subscribe to this mod's changes

skill-git:revert is a command published in the GitHub repository KnowledgeXLab/skill-git (41 stars, last pushed 4mo ago), licensed MIT. It adds 80 tokens to every session and 2,504 once invoked, about $0.0004 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.