Borrowing it
Nothing to install: this file belongs to zyeri/claude-snapshot. 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/zyeri/claude-snapshot/main/CLAUDE.mdgit clone --depth 1 https://github.com/zyeri/claude-snapshotWrote 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/instructions/zyeri/claude-snapshot/claude-md)<a href="https://agentmods.dev/instructions/zyeri/claude-snapshot/claude-md"><img src="https://agentmods.dev/badge/instructions/zyeri/claude-snapshot/claude-md.svg" alt="Measured on agentmods" 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.03894 | $0.03894 |
| Opus 5 | $0.01947 | $0.01947 |
| Sonnet 5 | $0.00779 | $0.00779 |
| Haiku 4.5 | $0.00389 | $0.00389 |
Grade A, and why
claude-snapshot CLAUDE.md 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 6d 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 — 221 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
What this repository is
The repo root is a Claude Code skill (claude-snapshot): portable, secret-free backup /
restore / compare of a full Claude Code configuration across OSes. The two scripts are
runtime-dependency-free Node ESM with no build step - users install via the plugin and run
them directly; nothing is compiled or npm installed on their side. The package.json and
node_modules are dev-only tooling (Biome, markdownlint, TypeScript for @ts-check); they
never ship to users and the scripts never import them. There is no unit-test framework -
verification is done by running the scripts against sandboxes (below).
On the author's machine ~/.claude/skills/claude-snapshot is a junction/symlink to this repo:
edits here are live immediately in every Claude Code session. Treat script changes as
production changes and verify before considering them done.
Hard invariants (violating these is a bug, not a style issue)
- Shareability - no username, home path, hostname, or secret may appear anywhere in skill
source. Everything machine-specific is discovered at runtime (
os.homedir(),CLAUDE_CONFIG_DIR,process.execPath,process.platform/arch) and tokenized in bundles. Before committing:grep -ri "<username>\|C:\\\\Users\|/Users/" --include="*.md" --include="*.mjs" .must return nothing. - No secrets in bundles - three layers in
collect.mjs:SECRET_KEY_RE(JSON key names),SECRET_VALUE_RE(JSON whole-value vendor formats; generic prefixes anchored, high-entropy vendor prefixes unanchored - aBearer github_pat_...header once slipped past an anchored regex), andSECRET_TEXT_PATTERNS+redactText()(full-text pass over every collected text file - hooks/memory/markdown, not just JSON; length-qualified so documentation quoting a bare prefix never self-matches). No entropy heuristic by design (git SHAs false-positive). Every redaction is recorded (names/labels only) inEXCLUDED.md. - Restore never writes blind - dry-run by default, snapshot-before-write on
--apply, conflicts always reported and never auto-resolved (existing values win). Idempotency is a contract: applying the same bundle twice must report all-skip, zero writes. - The bundle is untrusted input on restore/extract/compare (it may come from another party or
a bare-machine bootstrap). Every manifest field (
bundlePath,target,merge) and file body is attacker-controllable. Defenses that MUST hold when touchingapply.mjs:- Path containment.
safeJoin(extract) rejects../absolute/drive escapes and re-checksisWithin(dest).targetPathresolves + confines every restore target toALLOWED_TARGET_ROOTS(theCLAUDE_HOMEsubtree plus exact files~/.claude.json,~/CLAUDE.md); out-of-bounds ->rejected, never written. Anything comparing/keying paths uses the tokenizedtarget, not the cosmeticbundlePath. - Symlink-safe writes.
safeWriteFilerefuses a symlink at the final component (wxon create closes the TOCTOU on the create path). Known residual: the existing-file overwrite branch still follows a symlink swapped in by a concurrent local process - out of the bundle threat model, documented, not chased. - Prototype-pollution filter.
PROTO_KEYSdrops__proto__/constructor/prototypeat every level ofdeepMergeanddetokenizeJson. - Corrupt bundles are rejected up front, not mid-write. Before any planning or write, a
container whose
manifest.filesis missing/not-an-array, or that lists a file with no matching (or non-string-content) record infiles, exits with a clean error. An attacker-crafted manifest must not crashreadBundlewith a rawTypeErrorafter partial work. - Executable config is surfaced, not silently applied. Restoring hooks/skills/MCP is the tool's
job (can't be blocked), so instead every exec-bearing change is flagged in
report.securityWarnings:flagExecKeysfor JSONhooks/statusLine/commandkey additions, an MCP-add warning, and one consolidated summary of new files dropped into exec dirs (hooks/skills/commands/agents/ output-styles). Consolidation is deliberate - per-file warnings on a normal restore (dozens of legit files) are noise that masks a genuinely unexpected drop.
- Path containment.
- Mode names are
backup/restore/compare- never mix naming pairs (no "export").
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.
- 6d ago First seen · 221 lines · 3,894 tokens per session scan A 142981429c98
claude-snapshot CLAUDE.md is an instructions file published in the GitHub repository zyeri/claude-snapshot (1 stars, last pushed 1mo ago), licensed MIT. It adds 3,894 tokens to every session, about $0.0195 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 instructions, from other repositories
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
spec-kit AGENTS.md
AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.