vault-cortex: Instructions file for Codex

AGENTS.md

vault-cortex AGENTS.md is an instructions file for Codex, OpenCode from aliasunder/vault-cortex. It costs 21,334 tokens per session, scanned A, original, MIT.

Repository instructions for AI coding agents working on vault-cortex, a remote server that lets AI applications access an Obsidian note vault over the internet. They explain the project’s containers, deployment setup, note operations, search system, and memory features.

In plain words
What is it for?
Use them when developing vault-cortex, including its note create/read/update/delete operations, keyword and vector search, Obsidian synchronization, containers, or cloud infrastructure.
Why use it?
They give an agent the project’s architecture and conventions before it changes code, reducing the risk of breaking the server, authentication, synchronization, or deployment.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: reads .claude/ paths; mentions Claude Code; mentions AGENTS.md.

This is aliasunder/vault-cortex's own configuration. It tells Codex and OpenCode how to work on vault-cortex 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 vault-cortex configures →

Reuse

Borrowing it

Nothing to install: this file belongs to aliasunder/vault-cortex. 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/aliasunder/vault-cortex/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/aliasunder/vault-cortex

Made for: Codex, OpenCode.

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 vault-cortex AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/aliasunder/vault-cortex/agents-md/github.svg)](https://agentmods.dev/instructions/aliasunder/vault-cortex/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/aliasunder/vault-cortex/agents-md"><img src="https://agentmods.dev/badge/instructions/aliasunder/vault-cortex/agents-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 vault-cortex AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/aliasunder/vault-cortex/agents-md"><img src="https://agentmods.dev/badge/instructions/aliasunder/vault-cortex/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 21,334 This file is loaded in full into every session.
When invoked 21,334 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.21334 $0.21334
Opus 5.5 $0.08534 $0.08534
Sonnet 5.5 $0.04267 $0.04267
Haiku 4.5 $0.02133 $0.02133

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

Security

Grade A, and why

vault-cortex AGENTS.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 3d 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.

AGENTS.md · 1,459 lines

How it starts

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

AGENTS.md

Project conventions for AI-assisted development on vault-cortex — for Claude Code and other AI agents.

What this project is

Remote MCP server exposing an Obsidian vault over HTTPS. One two-target Dockerfile builds the ghcr.io/aliasunder/vault-cortex image: the local target (:latest, the default stage) is tini + the MCP server alone; the remote target (:remote) adds s6-overlay supervising both obsidian-sync (bidirectional Obsidian Sync via the obsidian-headless npm CLI) and the MCP server in a single container — s6 service definitions live in rootfs/, and the init chain registers the initial Sync device under the DEVICE_NAME env var, or the container hostname when unset. Both processes run as UID 1000 (PUID/PGID-adjustable). Production runs the :remote image on Lightsail as a single Compose service, fronted by API Gateway: OAuth endpoints and /healthz pass straight through, and every other route goes through a Lambda authorizer that validates the static token or JWT. IaC via SST v4.

The server provides vault CRUD, hybrid search (FTS5 keyword and sqlite-vec vector results fused by Reciprocal Rank Fusion, then reranked by a cross-encoder; the vector and rerank stages are optional via EMBEDDING_ENABLED and RERANK_MODE; see ARCHITECTURE.md → Hybrid Search), and an optional memory layer (dated-entry notes in the vault's About Me/ folder by default, set by MEMORY_DIR). The Docker image uses Debian slim (node:24-trixie-slim) because onnxruntime-node requires glibc, and specifically trixie because better-sqlite3 v13's bundled linux-arm64 prebuild needs glibc >= 2.38 (bookworm's 2.36 crash-loops arm64 images).

All solutions must be portable — they can't rely on one-off manual fixes, hardcoded paths, or user-specific configuration. If it works only on the author's machine, it's not done.

Design for the Obsidian user. The end user is always an Obsidian user, so anything that mirrors an Obsidian concept — backlinks, outgoing links, orphans, the graph, tags, properties, daily notes — must match what Obsidian itself does. At minimum, recognize every form Obsidian recognizes; behavior that is a strict subset of Obsidian's is a bug, not a limitation. For link resolution specifically, that means all of Obsidian's link styles ([[wikilink]], [[wikilink|alias]], [[wikilink#heading]], ![[embed]], [md](path.md), ![alt](image.png)), links in frontmatter properties (e.g. related:), and all three "New link format" modes — shortest path, path from vault folder, and path from current file (including relative ../ paths).

Read the full file on GitHub · 1,459 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. 3d ago Changed · +5 lines · +3 tokens per session 9c503dbad48b
  2. 6d ago Changed · +2 lines · +13 tokens per session 0f81326d7c01
  3. 7d ago Changed · +10 lines · +149 tokens per session f1c4f8f39680
  4. 8d ago Changed · +21 lines · +297 tokens per session d27d4ea58d5d
  5. 10d ago Changed · +2 lines · +38 tokens per session 7abd3dae0e92
  6. 17d ago Changed · +12 lines · +158 tokens per session fd74f5d32806
  7. 18d ago Changed · +5 lines · +90 tokens per session e493f8d3a5ae
  8. 20d ago Changed · +8 lines · +139 tokens per session 7f58f64442e8
  9. 22d ago Changed · +5 lines · +165 tokens per session d706926ccbee
  10. 23d ago First seen · 1,389 lines · 20,282 tokens per session scan A 9a60e459485e

Subscribe to this mod's changes

vault-cortex AGENTS.md is an instructions file published in the GitHub repository aliasunder/vault-cortex (32 stars, last pushed today), licensed MIT. It adds 21,334 tokens to every session, about $0.0853 per session on Opus 5.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

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 · 9,715 tokens

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,461 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, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 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,680 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,750 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 · 4,261 tokens