llm-brain CLAUDE.md

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

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/kimsanguine/llm-brain/claude-md
Clone the repo
git clone --depth 1 https://github.com/kimsanguine/llm-brain
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. 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.03289 $0.03289
Opus 5 $0.01644 $0.01644
Sonnet 5 $0.00658 $0.00658
Haiku 4.5 $0.00329 $0.00329

Measured yesterday against content hash 23be1a70ac53, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 yesterday.

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.yamlexclude_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. yesterday 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 17d ago), licensed MIT. It adds 3,289 tokens to every session, about $0.0164 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-31.

Related

Other instructions, from other repositories

cmds-llm-wiki AGENTS.md

Schema and harness document for the CMDS LLM Wiki vault. Defines the 3-layer architecture (Raw Sources / Wiki / Schema), ingest-query-lint operations, file conventions, and frontmatter standards. This is the single source of truth for LLM behavior in this vault.

johnfkoo951/cmds-llm-wiki · 14,302 tokens

cmds-llm-wiki CLAUDE.md

Schema and harness document for the CMDS LLM Wiki vault. Defines the 3-layer architecture (Raw Sources / Wiki / Schema), ingest-query-lint operations, file conventions, and frontmatter standards. This is the single source of truth for LLM behavior in this vault.

johnfkoo951/cmds-llm-wiki · 13,893 tokens

claude-obsidian GEMINI.md

Gemini CLI instructions for AgriciDaniel/claude-obsidian: Read AGENTS.md as the canonical host-neutral contract. Skills live in skills/ /SKILL.md and the portable core lives in claudeobsidian/.

AgriciDaniel/claude-obsidian · 219 tokens

claude-obsidian AGENTS.md

AGENTS.md instructions for AgriciDaniel/claude-obsidian, covering claude-obsidian: agent instructions, product and vault boundaries, bootstrap, canonical skills and mutation protocol.

AgriciDaniel/claude-obsidian · 1,123 tokens

claude-obsidian copilot-instructions.md

Copilot instructions for AgriciDaniel/claude-obsidian: Read AGENTS.md before proposing changes. The repository is an Agent Skills package, Claude Code adapter, standard-library Python core, and deterministic vault template—not the default live user vault.

AgriciDaniel/claude-obsidian · 186 tokens

obsidian-llm-wiki AGENTS.md

Instructions for green-dalii/obsidian-llm-wiki, covering llm wiki plugin project development standards, 🛡️ six-gate quality closure, gate 1: five-gate automated, gate 2: no side effects and gate 3: no breaking changes.

green-dalii/obsidian-llm-wiki · 7,700 tokens