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/tespera/alluvium/claude-mdgit clone --depth 1 https://github.com/Tespera/alluviumWrote 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/tespera/alluvium/claude-md)<a href="https://agentmods.dev/instructions/tespera/alluvium/claude-md"><img src="https://agentmods.dev/badge/instructions/tespera/alluvium/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.02410 | $0.02410 |
| Opus 5 | $0.01205 | $0.01205 |
| Sonnet 5 | $0.00482 | $0.00482 |
| Haiku 4.5 | $0.00241 | $0.00241 |
Grade B, and why
alluvium CLAUDE.md scanned grade B with 1 finding 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.
Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
- ❌ 让用户手编辑 `~/.claude/settings.json` 注入 hook(**用 `.claude-plugin/plugin.json`**) How it starts
The opening of the file, as written. The whole thing — 162 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Alluvium · 项目宪法
你(AI)每次进入这个仓库,先读这份文件,再读 docs/LLM_WIKI_DOCTRINE.md。 后者是产品圣经(Karpathy LLM Wiki 模式的忠实落地原则),是判断"实现是否对路"的最终标尺。 任何与本文件或圣经冲突的实现都是错的——遇到分歧请向用户提问,不要自行决定推翻这里的约定。
一句话
Alluvium 是一个 Claude Code session 自动归档器:每次 Claude Code 会话结束后,被动地把对话蒸馏成"精华笔记",按 Karpathy 的 LLM Wiki 模式合并进用户的 Obsidian vault。
卖点(README slogan)
You don't save your sessions. Your sessions save themselves.
跟同赛道 8 个 obsidian 类项目(claudesidian / claudian / claude-obsidian / obsidian-second-brain 等)的核心差异:
- 别人是主动唤起(slash command / 侧边栏 / MCP 按需调用);Alluvium 是被动归档(hook 触发,用户无感)。
- 别人多数存原始对话或简单摘要;Alluvium 蒸馏后合并到 topic 页,不留 session 日志。
- 别人多数是 Obsidian 插件或 Claude 内嵌助手;Alluvium 是外部 Rust 二进制 + Claude Code Plugin。
如果 AI 在写"侧边栏"、"slash command"、"per-session note 文件"这类东西,停下来重读本文——多半跑偏了。
知识组织模型(核心,详见 docs/KNOWLEDGE_MODEL.md)
vault 内三层:
<vault>/Alluvium/
├── raw/sessions/ # 不可变原档:每次 session 一份 transcript 副本
├── wiki/
│ ├── index.md # 主题分类 hub
│ ├── log.md # append-only 时间线(一行一 session)
│ ├── overview.md
│ ├── concepts/ # 概念、模式、技术(topic 页)
│ ├── entities/ # 项目、工具、人、库(topic 页)
│ └── sources/ # 单 session 摘要(可选层)
└── CLAUDE.md # vault 内的 schema 文件(注意:这个 CLAUDE.md ≠ 仓库根的这份)
核心原则:知识沉淀到 topic 页(concepts/ 和 entities/),session 不直接变成笔记。session 的最终去处是 raw/sessions/ 作为不可变原档,知识被抽出后向上汇总进 wiki。
Hook 架构(4 个,详见 docs/HOOKS.md)
SessionStart → 写 `<cache>`/sessions/<id>/resolved.json
PreCompact → 快照当前 transcript 防 compact 后丢
Stop → spawn detached 子进程,hook 立即返回(不卡 Claude Code)
SessionEnd → 清理临时文件
PreCompact 不能省——长 session 中途 compaction 会丢原始细节。 detached spawn 不能省——蒸馏要 5-30 秒,hook 必须 100ms 内返回。
硬约束(不可违反)
- 用户是纯 VibeCoder,不写也不读代码。任何代码层选项都要翻译成"对用户可见的影响"才呈现。
- prompt / config / 中间产物必须是外部文件(toml / yaml / md / json),用户能直接编辑、能用 Obsidian 打开看。
- 测试是用户的眼睛——功能正确性靠
cargo test通过/失败回答。测试名要表达用户可见的断言(参考tests/e2e_*.rs命名)。 - 单二进制分发——
cargo build --release出来的二进制独立运行,不依赖 Python / Node 等环境。 - 保留用户手改——用户可能在 Obsidian 里手动改过任何 wiki 页。merge 时只能覆盖 Alluvium 上次写的部分,必须 diff。
- 自我引用屏蔽——cwd 在 Alluvium 自己开发目录的 session 不归档(避免递归)。
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 · 162 lines · 2,410 tokens per session scan B 5ce72d3cdd09
alluvium CLAUDE.md is an instructions file published in the GitHub repository Tespera/alluvium (1 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 2,410 tokens to every session, about $0.0120 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other instructions, from other repositories
pi-llm-wiki AGENTS.md
AGENTS.md instructions for zosmaai/pi-llm-wiki, covering agents.md, project, tech stack, file layout and conventions.
obsidian-llm-wiki CLAUDE.md
Claude Code instructions for green-dalii/obsidian-llm-wiki, a project described as: Karpathy's LLM Wiki implementation plugin for Obsidian - turns notes and PDFs into a linked, LLM-powered knowledge base with entity pages, concept pages, graph-powered Q&A, and local-first privacy.
obsidian-llm-wiki AGENTS.md
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.
wenlan CLAUDE.md
Claude Code instructions for 7xuanlu/wenlan, a project described as: Wenlan is a knowledge base for the AI-native age. Your AI agents capture what they learn, Wenlan keeps it current and distills it into source-cited wiki pages you can trust.
memex-plugin CLAUDE.md
Instructions for linxule/memex-plugin, covering memex - personal knowledge base, quick start, check vault status, search for something (rrf scoring is default) and search recent docs only (7d, 2w, 3m).
llm-brain CLAUDE.md
Instructions for kimsanguine/llm-brain, covering llm-brain — claude code 운영 지침, 가드레일 (절대 위반 금지), 프라이버시 경계 (agent memory os), 명령어 and ingest.