llm-brain: Instructions file for Claude Code

CLAUDE.md

llm-brain CLAUDE.md is an instructions file for Claude Code from kimsanguine/llm-brain. It costs 3,289 tokens per session, scanned A, original, MIT.

A set of Claude Code instructions for llm-brain, a system that turns source files into a searchable wiki and answers questions from it.

In plain words
What is it for?
Use it to ingest URLs, PDFs, or text, update the wiki, answer questions from the wiki, and manage related commands and records.
Why use it?
It keeps generated knowledge tied to source files and sets privacy and editing boundaries for stored information.

Instructions file for Claude Code

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

This is kimsanguine/llm-brain's own configuration. It tells Claude Code how to work on llm-brain 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 llm-brain configures →

Reuse

Borrowing it

Nothing to install: this file belongs to kimsanguine/llm-brain. 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/kimsanguine/llm-brain/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/kimsanguine/llm-brain

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 llm-brain CLAUDE.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/kimsanguine/llm-brain/claude-md"><img src="https://agentmods.dev/badge/instructions/kimsanguine/llm-brain/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 3,289 This file is loaded in full into every session.
When invoked 3,289 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 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.1 $0.03289 $0.03289
Opus 5.5 $0.01316 $0.01316
Sonnet 5.5 $0.00658 $0.00658
Haiku 4.5 $0.00329 $0.00329

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

Security

Grade A, and why

llm-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 1mo 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 · 173 lines

How it starts

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

llm-brain — Claude Code 운영 지침

Claude는 이 시스템의 컴파일러다. raw/ 소스를 읽어 wiki/를 생성·갱신하고, 사용자 질문에 wiki 기반으로 답한다.

가드레일 (절대 위반 금지)

  1. raw/ 출처 없이 wiki/ 신규 생성·사실 수정 금지
  2. query 응답 중 wiki/ 편집 금지
  3. 학습 데이터만으로 wiki/ 작성 금지 — 반드시 raw/ 근거 필요
  4. raw/ 파일 수정 금지 — 읽기 전용

프라이버시 경계 (Agent Memory OS)

  • episodes/ — 운영 맥락(user_goal·inputs·outputs verbatim)을 담는 append-only 원장. ingest·express·query·curate 4 경로가 자동 기록(fail-soft). gitignored (스키마 예시 1개만 examples/에 커밋) — one-way door 누출 방지.
  • index.md — wiki 목차(gitignored wiki/의 파생물). business/ 민감 제목 노출 방지로 gitignored·git 추적 제외(결정 2026-06-28; 과거 public 커밋 history scrub은 별도 사람 판단).
  • procedures/ — git-tracked이되 OKF export 제외(schema/okf_export.yaml의 exclude_paths).
  • wiki/memory_health_report.md — okf META_FILES에 등재돼 공개 OKF 번들에서 봉인(미포함).

명령어

플러그인(commands/)으로 제공된다. 설치 시 커맨드는 /llm-brain:ingest처럼 네임스페이스가 붙는다 — 아래 /ingest·/okf 등은 /llm-brain: 접두로 읽는다. 자연어("ingest 해줘", "okf 해줘")로도 호출된다.

ingest

"ingest 해줘"
"/ingest https://url [--resonance high|medium|low]"
"/ingest ~/path/to/file.pdf [--resonance high]"
"/ingest '텍스트 내용' [--resonance medium]"

scripts/ingest.py 실행 → schema/ingest.md 규칙 적용 → wiki/ 생성·갱신 → index.md 업데이트

에피소드 자동기록: raw 저장 직후 episodes/YYYY-MM.jsonl에 1줄 append (status pending_wiki_compilation, fail-soft — 실패해도 ingest 경로 불간섭).

curate

"curate --distill"     # distill_level 점진 압축
"curate --lifecycle"   # TTL 초과 페이지 archive 후보
"curate --all"         # 전체 실행 (audit + distill + lifecycle)

scripts/curate.py 실행 → schema/curate.md 규칙 적용

export-graph (wikilink 그래프 export)

uv run python scripts/export_graph.py

[[wikilink]] 파싱 → wiki/graph.json 생성 (D3 force-graph 형식). mini-graph는 wiki_app /api/page/{slug}/graph 엔드포인트로 조회.

okf (wiki → OKF v0.1 호환 번들 export)

"okf 해줘"                     # /llm-brain:okf — 먼저 dry-run 검토 후 okf/ 번들 생성
"/llm-brain:okf --dry-run"      # export 대상·제외·통계만 (파일 미작성, 보안 검토용)
"/llm-brain:okf --strip-internal"  # 외부 공유본 (x-llmbrain-* 제거)

okf 커맨드(commands/okf.md)가 scripts/okf_export.py를 실행해 wiki/를 OKF v0.1(Google Open Knowledge Format) 호환 번들 okf/로 투영한다 (동료·외부 에이전트·habix 제품이 번역 없이 소비). frontmatter는 OKF 예약 6필드로 매핑, 내부 필드는 x-llmbrain-*로 보존, [[wikilink]]는 /-절대경로 마크다운 링크로 변환. 변환 규칙: schema/okf.md.

Read the full file on GitHub · 173 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. 1mo ago First seen · 173 lines · 3,289 tokens per session scan A 23be1a70ac53

Subscribe to this mod's changes

llm-brain CLAUDE.md is an instructions file published in the GitHub repository kimsanguine/llm-brain (10 stars, last pushed 21d ago), licensed MIT. It adds 3,289 tokens to every session, about $0.0132 per session on Opus 5.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.

Related

Other instructions, from other repositories

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 · 9,649 tokens

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,384 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, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 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,680 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,731 tokens

deno copilot-instructions.md

Copilot instructions for denoland/deno, covering deno development guide for github copilot, network access, high level overview, key directories and key files to understand first.

denoland/deno · 3,077 tokens