safe-resume

safe-resume is a skill for Claude Code from mayank-io/mstack. It costs 70 tokens per session (607 once invoked), scanned A, original, MIT.

A session-continuation workflow that reads a saved RESUME.md file and checks recorded Git worktrees before continuing paused work. A worktree is a separate working directory connected to a Git repository.

In plain words
What is it for?
Use it to resume work after a safe pause, especially when several repositories or worktrees were involved.
Why use it?
It removes guesswork when returning to interrupted work and prevents continuation if files or branches changed unexpectedly. It reports missing, modified, or moved worktrees instead of inventing progress.

Skill for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT} variable.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the dev plugin — 12 skills shipped together

Good fit Use it to resume work after a safe pause, especially when several repositories or worktrees were involved.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add mayank-io/mstack
Claude Code
/plugin install dev

Made for: Claude Code.

Or install dev, the plugin that ships this one along with the rest of its 12 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 safe-resume

README.md
[![agentmods](https://agentmods.dev/badge/skills/mayank-io/mstack/safe-resume/github.svg)](https://agentmods.dev/skills/mayank-io/mstack/safe-resume)
Your own site
<a href="https://agentmods.dev/skills/mayank-io/mstack/safe-resume"><img src="https://agentmods.dev/badge/skills/mayank-io/mstack/safe-resume/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 safe-resume

Your own site · 80×15
<a href="https://agentmods.dev/skills/mayank-io/mstack/safe-resume"><img src="https://agentmods.dev/badge/skills/mayank-io/mstack/safe-resume.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 70 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 607 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.
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.00070 $0.00607
Opus 5.5 $0.00028 $0.00243
Sonnet 5.5 $0.00014 $0.00121
Haiku 4.5 $0.00007 $0.00061

Measured 19d ago against content hash 13eb57c37607, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

safe-resume 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 19d 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.

plugins/dev/skills/safe-resume/SKILL.md · 28 lines

How it starts

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

Safe Resume

Continue exactly where /dev:safe-pause stopped, in the recorded order, at the recorded boundary, without asking what was happening.

PS below is python3 ${CLAUDE_PLUGIN_ROOT}/scripts/pause_state.py (run --help for the subcommands).

Procedure

  1. Locate. PS locate --session-id <id> --cwd <repo>. The id is $CLAUDE_SESSION_ID when set, else the id in this session's scratchpad path. No output and exit 1 means there is no pause state: say so in one line and continue with the normal session resume. Do not invent a state.
  2. Read the RESUME.md it prints, frontmatter and body, in full.
  3. Verify every worktree. PS verify --resume <path>. Exit 0 means every owned worktree, across every recorded repo, is present, at its recorded tip, and clean. Exit 2 means one is not: stop, repeat the lines it printed naming each worktree and why (tip-moved, dirty, missing), and do not continue. Only MK can decide what to do with a moved tip. Lines starting warning: are about a primary checkout (primary-tip-moved, primary-changed): a lander may have landed other work, or someone left files there. Report them in one line each and continue.
  4. Re-send the first message from ## First message, and only if the frontmatter records a coordinator. No coordinator: send nothing to anyone.
  5. Run the first command from ## First command, exactly as written.
  6. Mark consumed. PS mark-resumed --resume <path> so the session-start hook stops announcing it.
  7. Continue in the recorded order: in-flight branches first at their owed step, then the queue. Honour the recorded mode's boundary semantics as /dev:safe-pause defines them. Blockers stay blocked until the recorded holder clears them.

Rules

  • Never continue past a failed verify. A moved tip means someone else worked here; a dirty tree means a commit was skipped.
  • Never re-run a step RESUME.md records as passed. Only owed steps are run.
  • Never message a peer the frontmatter does not name.
  • The Peer messages logged section is the backlog of who was told PAUSED; tell each of them the session has resumed, once, in your first message to them.

Read the full file on GitHub · 28 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. 19d ago First seen · 28 lines · 70 tokens per session scan A 13eb57c37607

Subscribe to this mod's changes

safe-resume is a skill published in the GitHub repository mayank-io/mstack (6 stars, last pushed 3d ago), licensed MIT. It adds 70 tokens to every session and 607 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-10-13.

Related

Other skills, from other repositories

Dotfiles

Manage /.zshrc and a chosen set of /.config/ directories (you name them in Config.md) against a private GitHub dotfiles repo. Intents: Push (verify private remote, scan secrets), Pull (clone/diff), Sync, Restore (timestamped backup), Status, Backup (local timestamped copy). Security scan blocks .env, secrets, tokens…

danielmiessler/LifeOS · 125 tokens

conventional-commit

Rules for writing Conventional Commits messages in this project. MUST be invoked every time a commit is created.

JanDeDobbeleer/oh-my-posh · 26 tokens

python-release

Handle Python SDK release, build, bump, packaging metadata, PyPI client pin, uv.lock, nox/build workflow, and publish verification changes. Use for Python release process work or dependency pin bumps; do not use for ordinary Python feature implementation.

ComposioHQ/composio · 53 tokens

release-notes

Generate and publish concise, evidence-based notes in the body of the latest existing GitHub Release. Use only when the user explicitly invokes $release-notes or explicitly asks to update the latest existing GitHub Release body. Do not invoke for general release planning, changelog, tag, or version tasks.

kenryu42/cc-safety-net · 65 tokens

ratchet-files

Ratchet source file size so every file stays small enough for an agent to read whole: find every file over a token budget, split oversized files by concept, and set up the pre-commit ratchet that stops them from growing. Use when a commit is blocked because a file is over the size budget, when asked to find or split…

dzhng/skills · 118 tokens

git-guardrails-claude-code

A Claude Code setup that blocks selected destructive Git commands before they run. Git is a tool for tracking code changes; the blocked commands include pushing, deleting branches, discarding changes, and hard resets.

vinvcn/mattpocock-skills-zh-CN · 68 tokens