agent-checkpoint
An undo button for AI agent work: save the project before a risky change, see exactly what changed, roll back in one command. Use when: Save a checkpoint before a refactor, codemod, dependency upgrade or migration; See exactly which files an agent added, changed or deleted; Roll back the whole project or a single file, and undo the roll back.
- License 许可
- MIT
- 最近更新
- 2026-11-15
- Stars
- ★ 6
- Forks
- 0
01 前言 Front Matter
- name
- agent-checkpoint
- license
- MIT
- metadata
- { "author": "Nex AI", "version": "1.2", "agensi-slug": "agent-checkpoint" }
- description
- An undo button for AI agent work: save the project before a risky change, see exactly what changed, roll back in one command. Use when: Save a checkpoint before a refactor, codemod, dependency upgrade or migration; See exactly which files an agent added, changed or deleted; Roll back the whole project or a single file, and undo the roll back.
- compatibility
- Works with any agent that can run Python 3.8+: Claude Code, Codex, Cursor, Windsurf, Cowork. The automatic hook is for Claude Code.
02 资源文件 1
- 参考文档skill-report.json24.9 KB
03 SKILL.md 正文
Agent Checkpoint
Free skill by Nex AI. This file is the public guide from Agensi. Scripts, extension source, and templates from the original package are not in this folder.
What it does
One script, checkpoint.py, that gives any project an undo button for agent work:
checkpoint.py save -m "before the payments refactor"
checkpoint.py diff --patch
checkpoint.py restore 1 --dry-run
checkpoint.py restore 1
Why next to git and /rewind
- Claude Code's
/rewindtracks edits made with Claude's file tools. It does not track files changed by Bash commands (rm,mv,sed -i, generators,npm install, formatters), by background subagents, or by other tools. - Asking an agent to commit or stash before every risky step pollutes history, and
stash/checkout/resetare exactly the commands that lose uncommitted work when they go wrong.
Safe by design
- Inside git: checkpoints are commits under
refs/checkpoints/, built with a private index. Your branch, HEAD, staging area and stash are never touched, and checkpoints are never pushed. - Outside git: deduplicated content-addressed copies in
.agent-checkpoints/. - Every restore is undoable: it checkpoints the current state first.
- Never loses what it did not save: files that are ignored, too large, or inside nested repositories and submodules are left alone.
- Byte-exact: line endings, modes and symlinks come back as saved.
- Optional Claude Code hook that checkpoints before Bash commands that can change files and before subagents start, merged into your existing settings with a backup.
Python 3.8+, standard library only. 79 automated tests, including regressions for every issue found in a pre-release review.
Built by Nex AI, nex-ai.be
When to use
- Save a checkpoint before a refactor, codemod, dependency upgrade or migration
- See exactly which files an agent added, changed or deleted
- Roll back the whole project or a single file, and undo the roll back
- Recover from changes Claude Code's /rewind does not track (Bash commands, subagents, other tools)
- Checkpoint automatically before risky Bash commands with a Claude Code hook
Known limitations
Not a backup: checkpoints live on the same disk. Submodule and nested repository contents, ignored files and files over the size limit (default 50 MB) are not captured. Byte-exact line endings need git 2.40 or newer. Recreating symlinks on Windows needs Developer Mode or admin rights.
Example
Request
Refactor the payments module to support a second provider. Save a checkpoint first so we can go back if it gets messy.
Result
Checkpoint saved, refactor done, and an easy way back
Before touching anything:
$ checkpoint.py save -m "before the payments refactor"
Checkpoint 1 saved (git): before the payments refactor
After the refactor, here is exactly what changed:
$ checkpoint.py diff
Since checkpoint 1 (before the payments refactor): 4 modified, 1 added, 2 deleted
M src/index.ts
D src/orders/draft.ts
D src/orders/routes.ts
M src/orders/service.ts
A src/payments/providers/index.ts
M src/payments/refunds.ts
M src/payments/stripe.ts
The two deletions in src/orders/ were not part of the plan (a codemod I ran matched too broadly), so I rolled those back only:
$ checkpoint.py restore 1 --path src/orders/draft.ts --path src/orders/routes.ts
Restored checkpoint 1 (before the payments refactor) (src/orders/draft.ts, src/orders/routes.ts): 2 added
A src/orders/draft.ts
A src/orders/routes.ts
The state before this restore is saved as checkpoint 2. Undo with: checkpoint.py restore 2
Your branch, HEAD and staging area were not touched; 'git status' shows the restored files as changes.
If you want to drop the whole refactor
checkpoint.py restore 1 puts the project back exactly as it was, and restore 2 would bring the refactor back.
Questions
Is this a backup?
No. Checkpoints live on the same disk as the project. It undoes bad edits; it does not survive a dead drive.
Will it mess with my git history?
No. It never changes HEAD, branches, the staging area or the stash. Checkpoints are refs under refs/checkpoints/ that git push does not send.
Does it store my .env?
No. Ignored files are never captured, restored or deleted.
Does the hook slow Claude down?
Read-only commands exit in under 0.1 s. A git checkpoint of a 5,000-file project takes about 0.1 s; outside git the hook gives up after 20,000 files or 8 seconds instead of stalling.
Built by Nex AI. More skills, including the paid catalog: https://www.agensi.io/creators/ch1n4-g3nd4x
04 同仓库更多 Skills
serpmaven
Scrape Google search results (SERP) to JSON with SERP Maven (serpmaven) - a real Chrome browser on a residential proxy with sticky sessions. Run it as a CLI, a Python library, a local HTTP search API (`serve`), an MCP server or a Docker image; set the proxy login, workers, pages and cost tracking. Use when the user wants Google results, rank tracking, a self-hosted SERP API, or live Google search for an AI agent.
revnu-landing-page-audit
Find out why a landing page isn't turning visitors into signups, demos or sales. Audits one page against what the ad, post or search that sends people there promised, then checks the first screen, proof, call to action, friction and mobile. Returns at most 7 prioritized fixes, plus what is fine and what could not be checked; rewrites specific lines and fixes the page in the repo when asked. Never promises a conversion lift. Works without a Revnu account. Use when the user says or asks: "audit my landing page", "why isn't this page converting", "review my homepage", "my ads get clicks but no signups", "people bounce from the pricing page", "CRO review", "improve conversion rate", "is my hero section clear", "roast my landing page", "rewrite my headline", "what's wrong with this page", "landing page feedback", "make the signup page convert better". Not for SEO or AI-search audits, page speed engineering on its own, or building a new page from scratch.
revnu-growth-context
Write down once who buys, what they're stuck on, what it costs, what proof you have and what you've already tried, so every growth task starts from facts instead of a questionnaire. Creates or updates .agents/revnu-growth.md from the repo, the live site and the user, and imports an existing product-marketing.md. Use when the user says "set up our marketing context", "who is our ideal customer", "write our ICP", "describe the product for marketing", "positioning doc", "what's our brand voice", "remember this about our customers", "log what we tried", "what have we learned from marketing", "we changed pricing, update the context", "update our growth notes", "summarize the business for the agent", "import my product-marketing.md", "start a growth doc", or before a first marketing, SEO, outreach or launch task when no context file exists. Works without a Revnu account.
revnu-get-listed
Get onto the third-party pages AI answers and search cite when buyers ask for the best tool in your category: "best X" roundups, directories, review sites, GitHub awesome lists, community threads and comparison pages. Finds which ones are cited, ranks them by fit and effort, and drafts each submission, PR or pitch by the target's own rules. Use when the user says "get us listed", "which directories should we submit to", "how do we get into best-of lists", "why does ChatGPT recommend competitors and not us", "get mentioned in AI answers", "submit to awesome lists", "get on G2", "where are our competitors listed", "pitch listicle authors", "find backlink opportunities", "launch directories", "get into roundups", "Product Hunt alternatives", "where should we be listed", "get cited by Perplexity". Never submits, pays or posts without a yes. Works without a Revnu account.
revnu-ai-readiness-audit
Audit whether your website gives ChatGPT, Perplexity, Claude, Gemini and Google's AI Overviews something worth quoting, and fix the pages that don't. Use when the user says or asks "is my site ready for AI search", "audit my site for AI answers", "AEO audit", "GEO audit", "why doesn't ChatGPT quote our pricing", "make our pages citable by AI", "do I need llms.txt", "does schema help with ChatGPT", "check our structured data", "is our content visible without JavaScript", "AI SEO audit", "optimize our homepage for AI answers", "LLM SEO check", "why does AI get our product wrong", "fix our site for AI Overviews". Checks fetchability and indexability, answers in the raw HTML, entity facts, schema (including JS-injected markup), headings, dates and llms.txt, then gives at most 10 prioritised fixes and edits the repo when asked. Works without a Revnu account.
proxy-troubleshooting
Diagnose residential proxy failures, with NodeMaven's gateway as the reference - 407 with correct credentials, 406, 410, 500, a connection that hangs, ERR_TUNNEL_CONNECTION_FAILED in a browser, Playwright or Puppeteer ignoring proxy credentials, a sticky session that changes IP, geo-targeting that is silently ignored, passwords with special characters, and unexpected traffic from headless Chrome. Use when a proxy connection fails, returns the wrong location, or costs more traffic than expected.