obsidian-wiki AGENTS.md

A guide for maintaining an Obsidian knowledge base, where notes are stored as linked Markdown files in a vault.

In plain words
What is it for?
Resolving vault configuration, targeting a specific vault, translating README changes, checking translation drift, and preserving matching headings, links, and examples.
Why use it?
It explains how to choose the right vault and keep English and Traditional Chinese documentation aligned.

Instructions file for CodexOpenCode

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/ar9av/obsidian-wiki/agents-md
Clone the repo
git clone --depth 1 https://github.com/Ar9av/obsidian-wiki

Made for: Codex, OpenCode.

Per session 3,876 This file is loaded in full into every session.
When invoked 3,876 The same file — it is already loaded in full.
Security scan B 1 finding. 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.03876 $0.03876
Opus 5 $0.01938 $0.01938
Sonnet 5 $0.00775 $0.00775
Haiku 4.5 $0.00388 $0.00388

Measured yesterday against content hash e727ac61fd49, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

obsidian-wiki AGENTS.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 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

- `session-brain` / `session-search` **retrieve** — build a topic graph over the raw sessions and find or load one. They write a sidecar at `~/.claude/session-brain/` and never touch the vault.
AGENTS.md · 177 lines

How it starts

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

Obsidian Wiki — Agent Context

A skill-based framework for building and maintaining an Obsidian knowledge base. No scripts or dependencies — everything is markdown instructions that you execute directly.

README Translation Parity

README.md and README_TW.md are one documentation surface. Keep headings, examples, links, and user-facing behavior aligned between the two translations. The check is advisory and never blocks a PR: the readme-translation-drift CI job only reports drift. Run python tools/check_readme_sync.py to list commits that changed README.md without a later README_TW.md update, along with the pending English diff — then translate and backfill those changes into README_TW.md. Reviewers assess translation quality.

Configuration

Resolve config using the Config Resolution Protocol in llm-wiki/SKILL.md:

  1. Inline vault override (@name) — if the request contains an @<name> token, resolve <global config dir>/config.<name> directly, overriding the steps below. See "Targeting a specific vault" right after this list.
  2. Walk up from CWD — look for a .env file in the current directory, then each parent, up to $HOME. Stop at the first .env that contains OBSIDIAN_VAULT_PATH.
  3. Global config — if no local .env is found, read <global config dir>/config.
  4. Prompt setup — if neither exists, tell the user to run wiki-setup.

The global config dir is XDG-style: $XDG_CONFIG_HOME/obsidian-wiki (default ~/.config/obsidian-wiki). Installs that already have a ~/.obsidian-wiki directory keep using it, so existing setups never break; new installs use the XDG path.

The resolved config sets OBSIDIAN_VAULT_PATH (where the wiki lives). It may also set OBSIDIAN_WIKI_REPO (where this repo is cloned) and other optional variables.

Targeting a specific vault

You can maintain multiple vaults (each a <global config dir>/config.<name> file managed by wiki-switch) and reach any of them from any directory:

Read the full file on GitHub · 177 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 · 177 lines · 3,876 tokens per session scan B e727ac61fd49

Subscribe to this mod's changes

obsidian-wiki AGENTS.md is an instructions file published in the GitHub repository Ar9av/obsidian-wiki (3,325 stars, last pushed today), licensed MIT. It adds 3,876 tokens to every session, about $0.0194 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-30.