snapshot

A command for saving and restoring snapshots of Git worktrees, which are separate working directories for branches.

In plain words
What is it for?
Use it to create named snapshots, include stashed uncommitted changes, snapshot all worktrees, list snapshots, restore one, or delete one.
Why use it?
It gives you a recorded state to return to before experiments, milestones, or other risky changes.

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/mirinodev/maestro/snapshot
Clone the repo
git clone --depth 1 https://github.com/mirinodev/maestro
Per session 0 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,318 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.00000 $0.02318
Opus 5 $0.00000 $0.01159
Sonnet 5 $0.00000 $0.00464
Haiku 4.5 $0.00000 $0.00232

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

Security

Grade A, and why

snapshot 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.

docs/commands/snapshot.md · 370 lines

How it starts

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

🔸 snapshot

Command to save and restore the current state of orchestra members (Git worktrees) as snapshots. You can create backups before experimental changes or at important work milestones.

Overview

mst snapshot [options]
mst snap [options]  # alias

Usage Examples

Basic Usage

# Create snapshot of current orchestra member
mst snapshot

# Create snapshot with message
mst snapshot -m "State before feature implementation"

# Save changes to stash and create snapshot
mst snapshot --stash

# Create snapshots of all orchestra members
mst snapshot --all

Snapshot Management

# Display snapshot list
mst snapshot --list

# Display list in JSON format
mst snapshot --list --json

# Restore snapshot
mst snapshot --restore snapshot-20250120-103045

# Delete snapshot
mst snapshot --delete snapshot-20250120-103045

Options

Option Short Description Default
--message <msg> -m Snapshot description none
--stash -s Stash uncommitted changes false
--all -a Snapshot all orchestra members false
--list -l Display snapshot list false
--restore <id> -r Restore snapshot none
--delete <id> -d Delete snapshot none
--json -j Output in JSON format false
--force -f Execute without confirmation false

Snapshot Contents

Snapshots save the following information:

  • Git state (branch, HEAD, tracking info)
  • Commit history (latest 10 commits)
  • Staged files
  • Modified files
  • Untracked files
  • Worktree metadata
  • Stash (when using --stash option)

Snapshot File Format

{
  "id": "snapshot-20250120-103045",
  "worktree": "feature/auth",
  "timestamp": "2025-01-20T10:30:45Z",
  "message": "State before feature implementation",
  "git": {
    "branch": "feature/auth",
    "head": "abc123def456",
    "tracking": "origin/feature/auth",
    "ahead": 2,
    "behind": 0
  },
  "changes": {
    "staged": ["src/auth.js", "src/login.js"],
    "modified": ["README.md"],
    "untracked": ["test.log"]
  },
  "commits": [
    {
      "hash": "abc123def456",
      "message": "feat: add login functionality",
      "author": "[email protected]",
      "date": "2025-01-20T09:00:00Z"
    }
  ],
  "stash": {
    "ref": "stash@{0}",
    "message": "WIP on feature/auth: abc123d feat: add login"
  }
}

Read the full file on GitHub · 370 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 · 370 lines · 0 tokens per session scan A 2b361d278f8a

Subscribe to this mod's changes

snapshot is a command published in the GitHub repository mirinodev/maestro (9 stars, last pushed 11mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,318 tokens. 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-31.