backup

backup is a command for Claude Code from Pattyboi101/indiestack. It costs 0 tokens per session (389 once invoked), scanned A, original, MIT.

A command for creating a local backup of a production SQLite database hosted on Fly.io, checking that the copy works, and retaining only the five newest backups.

In plain words
What is it for?
Use it to download the production database, check its size and basic table counts, report how many backups remain, and optionally log the activity to a configured hub.
Why use it?
It gives you a repeatable way to copy the live database and verify the result before older local copies are removed.

Command for Claude Code

Part of the indiestack plugin — 4 skills, 6 commands, 1 hook, 1 MCP server shipped together

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/pattyboi101/indiestack/backup
Clone the repo
git clone --depth 1 https://github.com/Pattyboi101/indiestack

Made for: Claude Code.

Or install indiestack, the plugin that ships this one along with the rest of its 4 skills, 6 commands, 1 hook, 1 MCP server.

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 backup

README.md
[![agentmods](https://agentmods.dev/badge/commands/pattyboi101/indiestack/backup.svg)](https://agentmods.dev/commands/pattyboi101/indiestack/backup)
Your own site
<a href="https://agentmods.dev/commands/pattyboi101/indiestack/backup"><img src="https://agentmods.dev/badge/commands/pattyboi101/indiestack/backup.svg" alt="Measured on agentmods" height="20"></a>
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 389 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00389
Opus 5 $0.00000 $0.00195
Sonnet 5 $0.00000 $0.00078
Haiku 4.5 $0.00000 $0.00039

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

Security

Grade A, and why

backup scanned grade A with 1 finding 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 4d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -s -X POST -H "X-Hub-Secret: $HUB_SECRET" -H "Content-Type: application/json" \
.claude/commands/backup.md · 52 lines

What it actually says

Backup Production Database

Working directory: ~/indiestack

1. Create backup directory

mkdir -p ~/indiestack/backups

2. Download database from Fly

cd ~/indiestack && ~/.fly/bin/flyctl ssh console -C "cat /data/indiestack.db" > backups/indiestack-$(date +%Y%m%d-%H%M%S).db

3. Verify backup

LATEST=$(ls -t ~/indiestack/backups/*.db | head -1)
SIZE=$(du -h "$LATEST" | cut -f1)
echo "Backup: $LATEST ($SIZE)"
sqlite3 "$LATEST" "SELECT COUNT(*) || ' tools' FROM tools; SELECT COUNT(*) || ' makers' FROM makers; SELECT COUNT(*) || ' categories' FROM categories;"

If the file is 0 bytes or sqlite3 fails, the backup is bad — alert the user.

4. Clean old backups (keep last 5)

cd ~/indiestack/backups && ls -t *.db | tail -n +6 | xargs rm -f 2>/dev/null

5. Report

Tell the user:

  • Backup filename and size
  • Tool/maker/category counts as sanity check
  • Number of backups stored locally
  • Reminder: these are local-only backups

6. Log to hub (best effort)

Skip if HUB_URL is not set.

curl -s -X POST -H "X-Hub-Secret: $HUB_SECRET" -H "Content-Type: application/json" \
  "$HUB_URL/activity" -d '{"actor":"patrick","action":"backed up database","detail":"SIZE"}'

Replace SIZE with the backup file size.

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. 4d ago First seen · 52 lines · 0 tokens per session scan A f1785bc788f3

Subscribe to this mod's changes

backup is a command published in the GitHub repository Pattyboi101/indiestack (4 stars, last pushed 3mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 389 tokens. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.