Dragon-Brain CLAUDE.md

Dragon-Brain CLAUDE.md is an instructions file for coding agents from iikarus/Dragon-Brain. It costs 6,132 tokens per session, scanned A, original, MIT.

A set of Claude Code instructions for Dragon Brain, a persistent memory layer for software projects. It defines how the coding assistant should use the memory system and apply project guardrails.

In plain words
What is it for?
Use it to configure Claude Code for Dragon Brain projects, including memory handling, audit history, and the project's required working conventions.
Why use it?
It gives Claude Code project-specific context and rules instead of relying only on the current conversation or source files.

Instructions file

Install

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.

agentmods
npx agentmods add instructions/iikarus/dragon-brain/claude-md
Clone the repo
git clone --depth 1 https://github.com/iikarus/Dragon-Brain

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 Dragon-Brain CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/iikarus/dragon-brain/claude-md.svg)](https://agentmods.dev/instructions/iikarus/dragon-brain/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/iikarus/dragon-brain/claude-md"><img src="https://agentmods.dev/badge/instructions/iikarus/dragon-brain/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 6,132 This file is loaded in full into every session.
When invoked 6,132 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found 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 $0.06132 $0.06132
Opus 5 $0.03066 $0.03066
Sonnet 5 $0.01226 $0.01226
Haiku 4.5 $0.00613 $0.00613

Measured 5d ago against content hash 0284bfbe5398, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

Dragon-Brain 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 5d 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.

CLAUDE.md · 416 lines

How it starts

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

Dragon Brain — CLAUDE.md

Drop this file into your project root or reference it from your Claude Code config to teach Claude how to use its persistent memory layer.

The Harness

Assertive pushback is non-negotiable. See global ~/.claude/CLAUDE.md § The Harness — 6 guardrails against yes-man behavior. Do NOT hedge-then-agree. Say NO first, make Tabish argue his case. Devil's advocate on every decision. Name the opportunity cost.

Audit Remediation (April–May 2026, Complete 2026-05-09)

4-phase adversarial audit found 83 contract violations across 37 source files. Fixes shipped in 10 batches B1–B10, all landed. Final state: violations 64 → 13 (~80% eliminated), remainder are documented legitimate fallback paths under quarterly review.

B10 — Async-Native Repository Migration (completed in 8 sub-batches B10.A through B10.epic-finalize):

  • AsyncMemoryRepository wrapper (asyncio.to_thread over FalkorDB sync client; ~75 call sites migrated across CrudMixin, SearchChannels, TemporalMixin, ValidationMixin, AnalysisMixin)
  • Cross-store compensation in crud.py for create/update/delete entity — Qdrant upsert failure rolls back FalkorDB write to prevent split-brain orphans
  • Integration test harness via testcontainers-python at tests/integration/test_db_kill_scenarios.py — 5 tests using real container.kill() to assert SearchError on infra outage
  • 1230 unit tests pass under -W error, zero RuntimeWarning leakage
  • B10.5 (native async via falkordb.asyncio.FalkorDB) deferred as future epic — current asyncio.to_thread wrapper is a correct intermediate state; FalkorDB v1.4.0 ships native async support, future epic will swap the wrapper out
  • B10.F entity-level lock granularity deliberately deferred to a future epic — project-level locks remain in place, appropriate for current scale

The lie this audit closed

Before B1: search() wrapped its entire pipeline in except Exception: return []. The MCP search_memory tool transformed that into "No results found." — a confident string lie indistinguishable from "I genuinely have no memories on this topic." Every degraded memory query was Claude operating on missing context without knowing it. For two months, Dragon Brain was potentially lying to Claude on every infrastructure failure.

Read the full file on GitHub · 416 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. 5d ago First seen · 416 lines · 6,132 tokens per session scan A 0284bfbe5398

Subscribe to this mod's changes

Dragon-Brain CLAUDE.md is an instructions file published in the GitHub repository iikarus/Dragon-Brain (50 stars, last pushed 13d ago), licensed MIT. It adds 6,132 tokens to every session, about $0.0307 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.