barry-cache: Instructions file for Claude Code

CLAUDE.md

barry-cache CLAUDE.md is an instructions file for Claude Code from AlexanderIstomin/barry-cache. It costs 1,228 tokens per session, scanned A, a copy of barry-cache AGENTS.md, Apache-2.0.

Repository instructions for Barry Cache, a tool that stores project facts in source-backed context files so coding agents can retrieve them later.

In plain words
What is it for?
Starting work with a task-specific context pack, searching saved project facts, loading a selected context route, and expanding omitted facts when needed.
Why use it?
They help an agent find relevant project context without loading every stored fact at once. This reduces repeated searching and keeps retrieved information tied to source files.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions Claude Code; mentions AGENTS.md.

This is AlexanderIstomin/barry-cache's own configuration. It tells Claude Code how to work on barry-cache itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything barry-cache configures →

Reuse

Borrowing it

Nothing to install: this file belongs to AlexanderIstomin/barry-cache. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/AlexanderIstomin/barry-cache/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/AlexanderIstomin/barry-cache

Made for: Claude Code.

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 barry-cache CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/alexanderistomin/barry-cache/claude-md/github.svg)](https://agentmods.dev/instructions/alexanderistomin/barry-cache/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/alexanderistomin/barry-cache/claude-md"><img src="https://agentmods.dev/badge/instructions/alexanderistomin/barry-cache/claude-md/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 barry-cache CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/alexanderistomin/barry-cache/claude-md"><img src="https://agentmods.dev/badge/instructions/alexanderistomin/barry-cache/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,228 This file is loaded in full into every session.
When invoked 1,228 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod 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.01228 $0.01228
Opus 5.5 $0.00491 $0.00491
Sonnet 5.5 $0.00246 $0.00246
Haiku 4.5 $0.00123 $0.00123

Measured 2mo ago against content hash 8f6d0301b44a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

barry-cache 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 2mo 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.

Origin

This is a copy

100% identical to barry-cache AGENTS.md — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

CLAUDE.md · 80 lines

How it starts

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

Barry Cache

Barry Cache remembers this repo through source-backed context files.

Use the repo package script so Barry Cache runs from the local npm dependency without relying on shell PATH. If the dependency is missing, run bun install first. Use npx barry-cache <command> only when package scripts are unavailable.

Repeated retrieval commands use the disposable parsed index in .context-cache/context-index.json when source context files have not changed.

Start task context with:

bun run barry -- resume --task "<task>"

Use focused retrieval during work:

bun run barry -- route --task "<task>"
bun run barry -- search --query "<query>"
bun run barry -- load --route "<route>"

load and resume return a relevance-ranked budgeted slice by default (~2000 tokens per pack), not the whole pack. Trust the slice — the result lists any dropped fact ids and an expand_hint. If a needed fact is missing, restore just that id with --expand <id>; use --expand all only when you genuinely need the full pack, or --budget <N> to resize.

Workspace context is optional. When docs/context/workspaces.json exists and you know relevant files or directories, include them so Barry can choose the right workspace:

bun run barry -- resume --task "<task>" --paths "path-a,path-b"
bun run barry -- workspace infer --task "<task>" --paths "path-a,path-b"

Use the workspace Barry selects. If Barry reports workspace_decision.status: "ambiguous", do not guess — ask the user or rerun with --workspace <slug>.

When context files change, run:

bun run barry -- validate

Before handing off substantial work, record factual evidence:

bun run barry -- finalize --status success --summary "<summary>" --files "path-a,path-b"

When user validation shows previous work is broken, record the contradiction before or while fixing it:

bun run barry -- failure record --summary "<what failed>" --expected "<expected behavior>" --actual "<observed behavior>" --challenges "<handoff-or-fact-id>"

Memory policy:

  • Private vs. canonical memory: your agent's own private memory — the local store only you can read (for Claude Code, MEMORY.md and its files; other agents have their own) — is invisible to every other agent. Use it only for cross-session personal context — user preferences, how to work with this user, and external references.
  • Any decision, fact, or constraint another agent would need goes to Barry, never a private memory: an ADR, a docs/context/features/*/FACTS.jsonl fact, or a finalize/failure record. If you are about to write a project-type private memory, that is the signal to route it to Barry instead.
  • feedback-type guidance splits on who it serves: keep it private only when it is about working with this user personally (explanation depth, tone, review style). Guidance that states a rule every agent on this repo should follow (e.g. "always run bun run barry -- validate before finalize") is a policy, not a preference — route it to Barry as an ADR/AGENTS.md policy or a decision fact.
  • Finalize writes operational memory only.
  • Failure records write operational validation memory only and should challenge stale handoffs or facts instead of rewriting history.
  • Do not claim Barry canonical memory is updated unless docs/context/ changed.
  • If a task adds durable implementation behavior, add or update source-backed facts in docs/context/features/*/FACTS.jsonl and run bun run barry -- validate.
  • Direct FACTS.jsonl edits remain supported; use bun run barry -- fact draft --route "<route>" --prefix "<PREFIX>" ... when a schema-checked JSONL draft or explicit --write append is safer.
  • fact draft is an authoring guardrail, not broad canonical CRUD; review the resulting diff and run bun run barry -- validate.
  • Use ISO 8601 timestamps in fact updated_at values when saving new facts, so same-day feature order is preserved in review timelines.
  • Use collision-resistant fact IDs like REV-20260526T160512Z-a8f3; dense review UI may display them as REV-a8f3.

Read the full file on GitHub · 80 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. 2mo ago First seen · 80 lines · 1,228 tokens per session scan A 8f6d0301b44a

Subscribe to this mod's changes

barry-cache CLAUDE.md is an instructions file published in the GitHub repository AlexanderIstomin/barry-cache (5 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 1,228 tokens to every session, about $0.0049 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to barry-cache AGENTS.md, differing in 0 lines, and is treated as a copy.

Related

barry-cache CLAUDE.md compared with instructions from other repositories

barry-cache CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
barry-cache CLAUDE.mdAlexanderIstomin/barry-cacheInstructions file54mo agoApache-2.0A1,228Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode