obsidian-ai-second-brain: Instructions file for Claude Code

CLAUDE.md

obsidian-ai-second-brain CLAUDE.md is an instructions file for Claude Code from helloianneo/obsidian-ai-second-brain. It costs 1,215 tokens per session, scanned A, original, MIT.

An instruction guide for using an Obsidian vault as a personal, AI-managed knowledge wiki. It defines folders for original materials, processed notes, images, an index, and an activity log.

In plain words
What is it for?
Use it to add PDFs, videos, spreadsheets, images, and notes to an Obsidian wiki; merge related ideas; update indexes and cross-references; and answer questions from saved knowledge.
Why use it?
It gives the AI clear rules for storing new material, updating related notes, answering questions from the wiki, and recording changes. This helps keep source files unchanged and the knowledge base organized.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md.

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

Reuse

Borrowing it

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/helloianneo/obsidian-ai-second-brain/claude-md"><img src="https://agentmods.dev/badge/instructions/helloianneo/obsidian-ai-second-brain/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,215 This file is loaded in full into every session.
When invoked 1,215 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.01215 $0.01215
Opus 5 $0.00607 $0.00607
Sonnet 5 $0.00243 $0.00243
Haiku 4.5 $0.00121 $0.00121

Measured 10d ago against content hash f0d6d6c8c4fc, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

obsidian-ai-second-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 10d 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 · 91 lines

How it starts

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

Personal LLM Wiki

AI 知识管理员的工作手册。把这个文件放在你的 Obsidian vault 根目录。

目录职责

  • raw/ — 原始素材,不可变。AI 只读,永不修改。按主题分子目录,允许多级嵌套。PDF/视频/xlsx/图片保持原文件名。
  • wiki/ — AI 维护的消化笔记。允许多级子目录。每篇文章 md 格式,命名自由(描述性即可)。
  • assets/ — 配图资源。

两个特殊文件(必须维护)

  • wiki/index.md — 全局索引。每篇 wiki 文章一行,按主题分组,带链接 + 一句话摘要 + Updated 日期。
  • wiki/log.md — Append-only 操作日志,记录每次 ingest / query archive / lint。

三个触发行为

触发 1:Ingest(录入素材)

触发词: "加到 wiki"、"ingest 这个"、"把这个收进来"、给 AI 一份新素材并暗示要保存。

动作:

  1. 把素材存进 raw/<最合适的主题>/。主题不存在就新建。文件名保持原样(PDF/视频/图片)或起描述性名(md 笔记)。
  2. 编译成 wiki/<对应主题>/<文章>.md
    • 和现有文章是同一核心论点 → 合并进去,更新 Sources 和受影响的小节
    • 全新概念 → 新建文章,按概念命名,不按 raw 文件名
    • 跨多个主题 → 落在最相关的主题下,在文章末尾加"See Also"交叉引用
  3. 检查事实冲突:新素材和已有内容矛盾时,在文章里标注分歧和来源归属。
  4. 级联更新:扫同主题下其他受影响文章,更新它们的 Updated 日期。
  5. 更新 wiki/index.md:给每篇改动过的文章补/改条目。
  6. 追加 wiki/log.md
    ## [YYYY-MM-DD] ingest | <主文章标题>
    - Updated: <级联更新的文章标题>
    

触发 2:Query(查询)

触发词: "我知道啥关于 X"、"wiki 里有没有 Y"、"根据我的 wiki 总结一下 Z"、"对比 A 和 B"。

动作:

  1. 先读 wiki/index.md 定位相关文章。
  2. 读文章合成答案。优先引用 wiki 内容,其次才用 AI 自己的训练知识。
  3. 引用时用 markdown 链接:[文章标题](wiki/主题/文章.md)
  4. 默认只在对话里答,不写文件

例外——用户说"存下来"/"归档到 wiki":

  1. 把答案作为新文章写进最相关的 wiki/<主题>/
  2. 不合并进已有文章(归档内容是合成答案,不是素材)。
  3. 更新 index.md,摘要前缀加 [Archived]
  4. log.md 追加:
    ## [YYYY-MM-DD] query | Archived: <页面标题>
    

触发 3:Lint(体检)

触发词: "lint wiki"、"体检"、"wiki 有啥问题"。

确定性检查(尽量自动修):

  • wiki/index.md ↔ 实际文件一致性:文件存在但索引缺 → 补条目;索引指向死文件 → 标 [MISSING]
  • wiki 内部 markdown 链接失效:同名文件在别处 → 改路径;找不到 → 报告
  • See Also 链接:同主题明显缺的交叉引用 → 补;链接已删文件 → 删

启发式检查(只报告,不自动改):

  • 跨文章事实矛盾
  • 新素材让旧论点过时
  • 源头分歧没标注
  • 孤岛页面(没人引用)
  • 跨主题该链没链的概念
  • 反复被提及但没独立页面的概念

完成后追加 log.md:

## [YYYY-MM-DD] lint | <N> issues found, <M> auto-fixed

约定

  • 所有 wiki 内部链接用相对当前文件的路径
  • 对话里引用 wiki 文章用相对 vault 根的路径(例如 wiki/主题/xxx.md)。
  • 日期用今天的日期。Updated 反映文章内容最后变动的时间,不是文件系统时间戳。
  • raw 绝对不能改。如果发现 raw 里有错,在 wiki 文章里标注"source contains error"而不是改 raw。

Read the full file on GitHub · 91 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. 10d ago First seen · 91 lines · 1,215 tokens per session scan A f0d6d6c8c4fc

Subscribe to this mod's changes

obsidian-ai-second-brain CLAUDE.md is an instructions file published in the GitHub repository helloianneo/obsidian-ai-second-brain (252 stars, last pushed 4mo ago), licensed MIT. It adds 1,215 tokens to every session, about $0.0061 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.

Related

Other instructions, from other repositories

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,296 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,153 tokens

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 · 6,785 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, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 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,469 tokens

deepseek-harness AGENTS.md

AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.

deepseek-ai/deepseek-harness · 3,735 tokens