agentleFS
eugeniughelbureugeniughelbur/obsidian-second-brain/CLAUDE.md

obsidian-second-brain

CLAUDE.md4.7k starsChanged 4 months agoMITView on GitHub

Operating instructions for Claude Code when working inside this repo. This is the source repo for obsidian-second-brain, a Claude Code skill that turns any Obsidian vault into a living AI-first second brain. The skill ships 47 slash commands across 4 layers (vault management, thinking tools, research toolkit, scheduled agents). If you are Claude operating on a user's vault, you want _CLAUDE.md inside their vault, not this file. This file is for working on the skill's source code. Source files in…

  • Commits and pushes

Trending

Less talk lately.thin dataabout the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 1 mentionMay 2026: 0 mentionsJun 2026: 2 mentionsJul 2026: 5 mentionsAug 2026: 0 mentionsSep 2026: 3 mentionsOct 2026: 1 mentionNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the eugeniughelbur/obsidian-second-brain repository that our weekly crawl found: only 12 in all, so this is a hint, not a trend. There is no adoption data for this file yet.

Who's talking about eugeniughelbur/obsidian-second-brain

The biggest 5 of 12 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 12

Talked about on GitHub and Bluesky (12 times).

On GitHub · 11

6 more on GitHub

The file

Show its rules and text

We split this CLAUDE.md into the rules it gives an agent

14 rules. About 0 are common, 3 are distinctive, and 11 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 11

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Very specific:

    If you are Claude operating on a user's vault, you want _CLAUDE.md inside their vault, not this file.

    line 7
  2. Very specific:

    Every command that writes to a user's vault MUST follow references/ai-first-rules.md.

    line 31
  3. Very specific:

    If you are editing a command file in commands/, do not rewrite the AI-first preamble out of it.

    line 40
  4. Very specific:

    Create commands/<name>.md with description: frontmatter and operating instructions.

    line 51
  5. Very specific:

    If it runs Python, add scripts/research/<name>.py (or appropriate subfolder).

    line 52
  6. Very specific:

    If the command produces a new note type, add its frontmatter schema to references/ai-first-rules.md.

    line 54
  7. Very specific:

    Update SKILL.md (Layer section + command list) and README.md (commands table).

    line 55
  8. Very specific:

    Add a CHANGELOG.md entry under "Unreleased".

    line 56
  9. Very specific:

    If you change an adapter's output layout, update the matching assertion in tests/test_smoke.py in the same commit.

    line 75
  10. Distinctive:

    Do not rewrite vault output to be "more human-friendly." The vault is for future agent, not human readers.

    line 87
  11. Very specific:

    Do not strip frontmatter or ## For future agent preambles from existing commands.

    line 88
  12. Distinctive:

    Do not add emojis to command files or vault output (unless explicitly part of a UI element like a kanban column emoji).

    line 89
  13. Very specific:

    Do not invent rates, dates, or relationships when writing project notes - mark unknowns as TBD.

    line 90
  14. Distinctive:

    Contributors: do not push to main directly - open a PR.

    line 91

≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

CLAUDE.md

Operating instructions for Claude Code when working inside this repo.

This is the source repo for obsidian-second-brain, a Claude Code skill that turns any Obsidian vault into a living AI-first second brain. The skill ships 47 slash commands across 4 layers (vault management, thinking tools, research toolkit, scheduled agents).

If you are Claude operating on a user's vault, you want _CLAUDE.md inside their vault, not this file. This file is for working on the skill's source code.

Repo layout

  • commands/ - 47 slash command definitions, one .md per command. This is the platform-neutral source. Adapters compile it for each platform.
  • references/ - shared specs that commands link to. ai-first-rules.md is the canonical vault-write spec and is non-negotiable.
  • scripts/ - Python helpers (bootstrap_vault.py, vault_health.py, the research/ toolkit), plus build.sh (the adapter orchestrator) and lib.sh.
  • adapters/ - platform translation layer. lib.sh holds shared parsing helpers. claude-code/, codex-cli/, gemini-cli/, opencode/, hermes/, pi/, agent-skills/, grok-bot/ each ship an adapter.sh.
  • dist/ - build output, one tree per platform. Gitignored. Regenerate with bash scripts/build.sh (all platforms) or bash scripts/build.sh --platform <name>.
  • hooks/ - Claude Code hooks shipped with the skill.
  • SKILL.md - full operating manual loaded by Claude when the skill activates.
  • architecture.md - how the layers fit together.
  • README.md - public-facing docs on github.com.
  • pyproject.toml - Python deps managed via uv.
  • install.sh - one-shot installer that symlinks the skill into ~/.claude/. (Legacy; for non-Claude platforms see dist/<platform>/INSTALL.md after building.)

The adapter pattern

Source files in commands/ use Claude Code's slash-command shape. The Claude Code adapter is an identity copy. The other adapters translate per platform: codex-cli, hermes, agent-skills, and grok-bot emit native skills (one SKILL.md per command; agent-skills is a single spec-compliant .agents/skills/ tree that Codex, OpenCode, and Google Antigravity all read, with a shared obsidian-core engine skill; grok-bot emits Grok Bot / Sand skills that use the user-obsidian-second-brain MCP server for vault I/O), pi emits a Pi package (.pi/prompts/ + .pi/skills/), and gemini-cli / opencode emit a dispatcher file (GEMINI.md / AGENTS.md) with an auto-generated routing table built from each command's description: frontmatter, plus the command bodies under .gemini/ / .opencode/. Tool-name references like Read tool are rewritten to neutral wording (read files) so the instructions still make sense outside Claude Code.

When adding a new command, only edit commands/<name>.md. The adapters pick it up automatically on the next build. Optional frontmatter fields: exclude: [<platform>] to opt out per platform.

The AI-first rule (non-negotiable)

Every command that writes to a user's vault MUST follow references/ai-first-rules.md. Vault notes are designed for future agent retrieval, not human reading. This means:

  • A ## For future agent preamble at the top of every note
  • Rich frontmatter: type, date, tags, ai-first: true, plus type-specific fields
  • [[wikilinks]] for every person, project, idea, decision referenced
  • External claims carry recency markers like (as of 2026-04, source.com)
  • Source URLs preserved verbatim inline
  • Confidence levels where applicable (stated | high | medium | speculation)

If you are editing a command file in commands/, do not rewrite the AI-first preamble out of it. Do not "humanize" vault output. Do not drop frontmatter to make notes look cleaner.

Conventions

  • Markdown: sentence-case headers (## What it does, not ## What It Does). No emojis in command files. No substitution Unicode in source files, docs, or commits: em-dashes (—), en-dashes (–), curly/smart quotes, and Unicode math substitutions (≥ ≤ ≠) are banned. Allowed: box-drawing chars (─ U+2500-257F), arrows (→ ←), currency symbols (€ £ ¥), and Nerd Font / private-use codepoints - all carry semantic meaning rather than substituting for ASCII. Enforced by hooks/validate-ai-first.sh check 5 on vault writes.
  • Python: ruff, target py310. CI runs ruff check .; the gated rule set is pinned in pyproject.toml under [tool.ruff.lint] and is currently F (pyflakes), I (import sorting), and PTH (prefer pathlib over os.path), with a comment there listing what is excluded and why. Read the select list rather than this sentence when it matters - it is the source of truth, and this sentence has drifted behind it before. line-length = 100 is the formatting convention, not a build-breaking rule - there are 203 existing violations, so gating it means fixing that backlog first, not adding a noqa sweep.
  • Commits: imperative mood (Add, Fix, Update). Co-author Claude when pair-programmed.
  • Frontmatter: YAML, double-quoted strings when in doubt, lowercase tag values.

Adding a new command

  1. Create commands/<name>.md with description: frontmatter and operating instructions.
  2. If it runs Python, add scripts/research/<name>.py (or appropriate subfolder).
  3. Apply the AI-first rule to every vault write. Reference references/ai-first-rules.md from the command body so future agent has the spec inline.
  4. If the command produces a new note type, add its frontmatter schema to references/ai-first-rules.md.
  5. Update SKILL.md (Layer section + command list) and README.md (commands table).
  6. Add a CHANGELOG.md entry under "Unreleased".

Testing locally

Symlink the local checkout into Claude Code so slash commands run from this repo:

ln -s "$(pwd)" ~/.claude/skills/obsidian-second-brain
ln -s commands/* ~/.claude/commands/

Then restart Claude Code and run the command against a test vault. Command behavior itself is still verified manually: run the command, inspect the resulting vault notes, confirm AI-first compliance.

There is a smoke-test suite (tests/test_smoke.py) that guards the build pipeline (adapter output paths, vault_health JSON, OKF export, and similar). CI runs it on every push. Run it locally before pushing any change to adapters/, scripts/, or commands/:

uv run pytest -q

If you change an adapter's output layout, update the matching assertion in tests/test_smoke.py in the same commit.

Release process

  1. PRs land on main only when CI is green and the AI-first rule is upheld.
  2. Move "Unreleased" entries in CHANGELOG.md under a new version header with the release date.
  3. Bump version in pyproject.toml, CITATION.cff, .claude-plugin/plugin.json, and .claude-plugin/marketplace.json (metadata + plugin entry; tests/test_plugin_manifest.py fails CI if these drift from pyproject).
  4. Tag and push: git tag v0.X.0 && git push origin v0.X.0.
  5. Cut a GitHub Release with notes copied from the CHANGELOG entry.

What not to do

  • Do not rewrite vault output to be "more human-friendly." The vault is for future agent, not human readers.
  • Do not strip frontmatter or ## For future agent preambles from existing commands.
  • Do not add emojis to command files or vault output (unless explicitly part of a UI element like a kanban column emoji).
  • Do not invent rates, dates, or relationships when writing project notes - mark unknowns as TBD.
  • Contributors: do not push to main directly - open a PR.
  • Maintainer (Eugeniu) and Claude assisting him: may push to main directly when working solo. PRs are optional, not mandatory.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.