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.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.svg" alt="Measured on agentmods" 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 $0.00614 $0.00614
Sonnet 5 $0.00246 $0.00246
Haiku 4.5 $0.00123 $0.00123

Measured 8d ago against content hash 8f6d0301b44a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, 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 8d 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. 8d 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 2mo ago), licensed Apache-2.0. It adds 1,228 tokens to every session, about $0.0061 per session on Opus 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

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.

vercel/next.js · 7,296 tokens

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.

openai/codex · 5,153 tokens

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

microsoft/vscode · 6,785 tokens

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

microsoft/vscode · 5,001 tokens

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.

langchain-ai/langchain · 4,469 tokens

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.

github/spec-kit · 7,104 tokens