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.
npx agentmods add skills/lglucas/ai-dev-operating-system/rollback-safenpx skills add lglucas/ai-dev-operating-system --skill rollback-safegit clone --depth 1 https://github.com/lglucas/ai-dev-operating-systemWrote 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.
[](https://agentmods.dev/skills/lglucas/ai-dev-operating-system/rollback-safe)<a href="https://agentmods.dev/skills/lglucas/ai-dev-operating-system/rollback-safe"><img src="https://agentmods.dev/badge/skills/lglucas/ai-dev-operating-system/rollback-safe.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00071 | $0.00903 |
| Opus 5 | $0.00036 | $0.00451 |
| Sonnet 5 | $0.00014 | $0.00181 |
| Haiku 4.5 | $0.00007 | $0.00090 |
Grade A, and why
rollback-safe 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 5d 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.
How it starts
The opening of the file, as written. The whole thing — 96 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Rollback Safe
When to run this skill
- The user says "desfaz isso" / "volta o que você fez" / "anda pra trás" / "tira essa última mudança".
bug-triage-agentrecommends a revert.- A change just shipped and broke something obvious.
- The user pasted a wrong thing into a config / env file.
Mental model for the vibe coder
Pensa numa máquina do tempo do projeto. Cada commit é uma foto do projeto inteiro. "Desfazer" não apaga a foto — ele só te leva pra foto de antes. Se mudar de ideia, você pode voltar pra foto atual a qualquer momento. Nada que você fez se perde.
Rollback levels (always try the smallest first)
Level 0 — Nothing committed yet
Use git restore <file> for unstaged changes, git restore --staged <file> for staged.
Safe and instant.
Level 1 — Last commit is the bad one
git revert HEAD --no-edit
Creates a new commit that undoes the previous one. History stays linear, nothing lost.
Level 2 — Several commits to undo
Pick the last good commit hash and:
git revert <bad-commit>..<HEAD> --no-edit
Each bad commit gets its own undo commit.
Level 3 — Already pushed and remote needs cleaning
Use git revert (not git reset --hard) so collaborators / CI / Vercel pick up the undo cleanly.
Level 4 — DO NOT default to this
git reset --hard <hash> rewrites local history. Only use after explicitly asking the user, AND backing up untracked files first. Never on a shared branch.
Pre-flight checklist (mandatory)
Before running ANY rollback command:
-
Snapshot uncommitted work.
git stash push -u -m "rollback-safe-snapshot-$(date +%s)"Even if it looks like "nothing important", stash it. Stashes can be popped back.
-
Confirm the target. Show the user the exact commit (hash, message, date) you're about to undo.
-
Show the blast radius. List which files will change.
-
Confirm with the user in plain Portuguese.
Vou voltar o projeto pro estado antes de [commit msg]. Isso vai mudar [N] arquivos. Seu trabalho não-commitado tá guardado e dá pra voltar. Posso prosseguir?
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.
- 5d ago First seen · 96 lines · 71 tokens per session scan A 85623c94b8cd
rollback-safe is a skill published in the GitHub repository lglucas/ai-dev-operating-system (11 stars, last pushed 27d ago), licensed MIT. It adds 71 tokens to every session and 903 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.
Other skills, from other repositories
adk-git
Writes commit messages and pull request descriptions for the adk-python repository: Conventional Commits types and scopes, subject lines that say why a change was made, and the linked-issue and testing-plan sections the PR template requires. Use when writing or rewording a commit message, squashing commits before a…
squash-merge
Squash-merge a PR into zeroclaw-labs/zeroclaw master with fully preserved commit history in the squash message body. Use this skill when the user explicitly mentions squash-merging, merging a specific PR number, landing a PR, or 合入 — e.g. "squash-merge #123", "merge PR 456", "land #789", "合入 #123", "/squash-merge…
work
Handle issue/PR work items with worktree isolation. Triggered by "/work [issuelink|description]" to start focused work.
meta-pre-commit-quality-gate
Run three quality gates (ruff + mypy + pytest) in parallel over the staged diff, then arbitrate a single BLOCK/APPROVE verdict. Use before committing changes locally when you want a comprehensive pre-commit gate beyond per-file linting — exactly the same gate set CI enforces.
omh-github-issue-intake
This is a Hermes-native github-issue-intake workflow skill.
commit
Skill "commit" from clacky-ai/openclacky, covering smart commit skill, critical requirement: single-line commits only, core philosophy, usage and process steps.