Borrowing it
Nothing to install: this file belongs to philipyaz/cos. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/philipyaz/cos/main/.claude/skills/backup-recovery/SKILL.mdgit clone --depth 1 https://github.com/philipyaz/cosWrote 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/philipyaz/cos/backup-recovery)<a href="https://agentmods.dev/skills/philipyaz/cos/backup-recovery"><img src="https://agentmods.dev/badge/skills/philipyaz/cos/backup-recovery/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.
<a href="https://agentmods.dev/skills/philipyaz/cos/backup-recovery"><img src="https://agentmods.dev/badge/skills/philipyaz/cos/backup-recovery.svg" alt="Reviewed on agentmods" width="80" 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.00134 | $0.04996 |
| Opus 5 | $0.00067 | $0.02498 |
| Sonnet 5 | $0.00027 | $0.00999 |
| Haiku 4.5 | $0.00013 | $0.00500 |
Grade A, and why
backup-recovery 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 10d 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 — 332 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Backup & Recovery
The board (board/data/), guard (guard/data/), config (config/), and vault
(vault/<VAULT_NAME> — the active vault from config/cos.env) are
real, live data. The local rolling snapshots
in board/data/backups/ are crash-safety only — count-pruned, same-disk, deletable. This
skill operates the durable layer: daily AES-256-GCM-encrypted snapshots in a private
GitHub repo (backup/), where git history is immutable, off-site, and versioned.
Implementation lives in backup/ (see backup/README.md). This skill is the operator
runbook. Golden rule: never run a bulk or destructive operation on live data without a
fresh, VERIFIED backup first (Backup now below). The data-loss incident that motivated
this skill happened because live data was edited and the only backups were local + count-pruned.
0. Concepts (read once)
- Recovery key — one high-entropy passphrase; the ONLY way to decrypt. Stored in the
macOS login Keychain (
securityitemcos-backup-key) AND an offline copy in your password manager. Never in any repo, never logged. Lose it → backups are unrecoverable. - Backup repo — a PRIVATE GitHub repo (local clone at
$BACKUP_REPO). Holdssnapshots/cos-backup-<ts>.enc+ per-device manifestsmanifests/<deviceId>.json(one per producing machine — the deviceId isCOS_DEVICE_IDfromconfig/cos.env, else a sanitized hostname; a legacy singleMANIFEST.jsonfrom before the split is still READ, never written). Private and encrypted = a repo leak exposes nothing. Its location is config-driven:config/cos.env BACKUP_REPO(the loader exports it as$BACKUP_REPO), defaulting to~/.cos-backupswhen unset. This config value is the EXPECTED repo;backup.mjsrefuses to run against any other effective path (see §6 Relocating + the fail-closed guard). Multiple machines may produce into ONE archive: each run converges with the remote first (fetch + rebase), and a machine's FIRST run must decrypt-verify the newest existing snapshot with its local key (producer admission) — a wrong key is refused before it can split the archive. - Scope —
backup/config.mjs SCOPE: board data, guard data, config, the vault. The vault entry is resolved fromconfig/cos.env VAULT_NAME(vault/<VAULT_NAME>, the same active vaultsetup-vaultrecords), so a renamed/relocated vault is always captured — never silently dropped. If the configured vault dir is missing at backup time,backup.mjslogs a loudWARN(visible in the/backupslog tails) rather than omitting it quietly. Falls back tovault/my-personal-thoughts-vaultwhenVAULT_NAMEis unset (a slug guard rejects any name with a path separator). - Three triggers, one floor — the launchd 03:30 agent is the GUARANTEED DAILY
FLOOR. While the board is running it ADDS two more triggers of the SAME
backup/backup.mjs: an opportunistic top-up (fires non-blocking from hot read routes when the newest snapshot is >12h old) and the "Back up now" button on the board's/backupssurface. All three callers are serialized by a single-flight lock insidebackup.mjs(see §3 + §6) and share the same exit codes. - Board
/backupssurface — a READ-ONLY health UI (board sidebar → Review → Backups; the Backups item sits next to Security/Trash/Activity, it is NOT nested under Security). The new at-a-glance health check: a healthy/warning/error verdict, last-run time/size/store-count, push-state, snapshot history, log tails, the repo-path provenance, and a Setup & Diagnostics readiness card. Look here FIRST; the CLI below is the headless fallback. See §4.
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.
- 10d ago First seen · 332 lines · 134 tokens per session scan A f0dc301398be
backup-recovery is a skill published in the GitHub repository philipyaz/cos (4 stars, last pushed today), licensed MIT. It adds 134 tokens to every session and 4,996 once invoked, about $0.0007 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-31.
Other skills, from other repositories
wiki-lint
Health-check a wiki vault. Finds orphan pages (no inbound links), dead wikilinks (point to non-existent pages), missing frontmatter fields, stale claims, empty sections, and pages absent from catalog.md. Produces a structured report with severity tiers and proposes concrete fixes — but does not auto-apply them unless…
opencode-plugin-idioms
Event hook payload shapes, session lifecycle timing, toast/TUI-route render boundaries, and child-session tagging conventions for OpenCode server (@opencode-ai/plugin) and TUI (@opencode-ai/plugin/tui) plugins, grounded in the vendored OpenCode source at references/opencode.
meta-sync-template
Interactive flow to propagate the reference (.template) vault's plugins, snippets, and root docs to one or more configured vaults. Reads the active router config, lists every vault with online status, flags vaults missing obsidian-local-rest-api upfront, lets the user pick all or a subset, and optionally re-clones…
save
File the current Claude conversation (or a specific insight from it) as a structured wiki note. Auto-detects the right type (decision, answer, session-log, technique, ADR), writes appropriate frontmatter, places the file in the correct wiki folder, and updates catalog.md, journal.md, hot.md. Use when the user says…
wiki-export
Export a vault's wiki either as a single portable file (llms.txt or llms-full.txt per the llmstxt.org standard) or as an OKF knowledge bundle (Google's Open Knowledge Format v0.1 — a shareable directory of markdown files any AI agent can consume). Use when the user says "export my wiki", "make an llms.txt", "share my…
wiki-boundary
Rank the "frontier" pages of a wiki — the crossroads many pages link to that stay thin inside — so you can decide where research would pay off most. Use when the user says "what should I write about next", "where are the gaps", "which pages need work", "find the thin hub pages", "boundary pages", "/wiki-boundary"…