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.
npx agentmods add instructions/zircote/subcog/claude-mdgit clone --depth 1 https://github.com/zircote/subcogWrote 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/zircote/subcog/claude-md)<a href="https://agentmods.dev/instructions/zircote/subcog/claude-md"><img src="https://agentmods.dev/badge/instructions/zircote/subcog/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 | $0.00501 | $0.00501 |
| Opus 5 | $0.00251 | $0.00251 |
| Sonnet 5 | $0.00100 | $0.00100 |
| Haiku 4.5 | $0.00050 | $0.00050 |
Grade A, and why
subcog 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 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.
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.
What it actually says
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Project Overview
Subcog is a persistent memory system for AI coding assistants, written in Rust. It captures decisions, learnings, and context from coding sessions and surfaces them when relevant.
Key Capabilities
- Single-binary distribution (<100MB, <10ms cold start)
- Three-layer storage architecture: Persistence (SQLite), Index (FTS5), Vector (usearch HNSW)
- MCP server integration for AI agent interoperability
- Claude Code hooks for seamless IDE integration
- Semantic search with hybrid vector + BM25 ranking (RRF fusion)
Build Commands
Use the Makefile for all common operations. Run make help for the full list.
# Primary development workflow
make ci # Run ALL CI gates before committing (format, lint, test, doc, deny, msrv, bench)
make dev # Full check + install to ~/.cargo/bin
make quick # Build + install (skip tests)
Code Style
- Edition: 2024
- MSRV: 1.88
- Line length: 100 characters
- Linting: clippy with pedantic + nursery lints
Strict Requirements
- No panics in library code: Use
Resulttypes.unwrap,expect,panic!are denied by clippy. - Use
thiserrorfor custom error types with#[error(...)]attributes. - Prefer
const fnwhere possible (clippy enforces this for simple methods). - Prefer borrowing over ownership:
&stroverString,&[T]overVec<T>. - Document public items with
///including# Errorsand# Examplessections.
Mnemonic
This project uses mnemonic for persistent memory.
- Search before implementing:
rg -i "{topic}" ~/.claude/mnemonic/ ./.claude/mnemonic/ --glob "*.memory.md" - Capture decisions, learnings, patterns via
/mnemonic:capture {namespace} - See
~/.claude/CLAUDE.mdfor full protocol
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.
- 4d ago First seen · 53 lines · 501 tokens per session scan A d71b00ee9e0c
subcog CLAUDE.md is an instructions file published in the GitHub repository zircote/subcog (28 stars, last pushed 1mo ago), licensed MIT. It adds 501 tokens to every session, about $0.0025 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-30.
Other instructions, from other repositories
ClawMem AGENTS.md
Instructions for yoloshii/ClawMem, covering clawmem — agent quick reference, inference at a glance, install, or step by step and memory retrieval (90/10 rule).
ariadne AGENTS.md
Instructions for mclaut/ariadne, covering agents.md — ariadne, what this is, build / test / lint, architecture and runtime layout (not the repo).
mnemon-memory-mcp CLAUDE.md
Claude Code instructions for nikitacometa/mnemon-memory-mcp, covering mnemon-mcp, commands, tech stack, architecture and database.
ariadne CLAUDE.md
Instructions for mclaut/ariadne, covering claude.md — ariadne, what this is, build / test / lint, architecture and runtime layout (not the repo).
llm-wiki-memory AGENTS.md
Instructions for ctxr-dev/llm-wiki-memory, covering agents.md, development discipline (.agents/), layout, tests and conventions.
dense-mem AGENTS.md
Instructions for markhuangai/dense-mem, covering dense-mem repository guidance, project context, architecture decision records, current stack and target architecture.