knowledge-mgmt: Instructions file for Codex

AGENTS.md

knowledge-mgmt AGENTS.md is an instructions file for Codex, OpenCode from owenliang60-ship-it/knowledge-mgmt. It costs 2,109 tokens per session, scanned A, original, MIT.

A project instruction file for managing an Obsidian vault, a folder of linked Markdown notes. It defines the vault’s schema and says when to use the Obsidian command line or connected tools.

In plain words
What is it for?
Use it to create, read, append, move and search notes while following the vault schema and its preferred Obsidian tools.
Why use it?
It helps an AI assistant follow the vault’s structure and write notes safely without ignoring its naming, linking or permission rules.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions CLAUDE.md; mentions Claude Code; mentions AGENTS.md.

This is owenliang60-ship-it/knowledge-mgmt's own configuration. It tells Codex and OpenCode how to work on knowledge-mgmt 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 knowledge-mgmt configures →

Reuse

Borrowing it

Nothing to install: this file belongs to owenliang60-ship-it/knowledge-mgmt. 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/owenliang60-ship-it/knowledge-mgmt/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/owenliang60-ship-it/knowledge-mgmt

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 knowledge-mgmt AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/owenliang60-ship-it/knowledge-mgmt/agents-md.svg)](https://agentmods.dev/instructions/owenliang60-ship-it/knowledge-mgmt/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/owenliang60-ship-it/knowledge-mgmt/agents-md"><img src="https://agentmods.dev/badge/instructions/owenliang60-ship-it/knowledge-mgmt/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 2,109 This file is loaded in full into every session.
When invoked 2,109 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.02109 $0.02109
Opus 5 $0.01055 $0.01055
Sonnet 5 $0.00422 $0.00422
Haiku 4.5 $0.00211 $0.00211

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

Security

Grade A, and why

knowledge-mgmt 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 7d 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 · 154 lines

How it starts

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

AGENTS.md — Rules for AI Agents Operating the Vault

Install: 把本文件复制到你的 Obsidian vault 根目录。

对齐 Karpathy LLM Wiki: 这是 gist 里提到的 schema/agent rules layer —— 对 Claude Code 就是 CLAUDE.md,对 Codex 就是 AGENTS.md。这份文件对两者都有效。

Scope: 本文件约束 AI agent(Claude Code / Codex / 其他)操作 vault 时的行为。适用的 agent 范围由用户自己指定(例如你可以在 CLAUDE.md 里写 "本 vault 的规则见 AGENTS.md")。

与 SCHEMA.md 的关系: SCHEMA.md 定义什么是什么(Card 类型、标签体系、权限矩阵),AGENTS.md 定义 agent 怎么操作(CLI 命令、铁律、写入纪律)。两者互补,缺一不可。


Schema 优先

操作 vault 前先读取 vault 根目录的 SCHEMA.mdobsidian read path="SCHEMA.md"),了解当前三层架构、权限矩阵和写入规则。


工具:Obsidian CLI(默认)+ MCP(回退)

默认使用 CLI(通过 Bash 工具调用 obsidian 命令)。仅当 Obsidian 应用未运行且 CLI 报 connection refused 时,回退使用 MCP(mcp__obsidian__*)。

架构:CLI 是 IPC 遥控器,通过 socket 与运行中的 Obsidian GUI 通信。v1.12.4 起官方内置,100+ 命令。优势:移动文件自动更新 wikilinks、访问 backlinks/插件/同步状态。

CLI 能力速查

操作 CLI 命令 MCP 回退
创建笔记 obsidian create path="..." content="..." write_note
追加内容 obsidian append path="..." content="..." write_note (mode=append)
前插内容 obsidian prepend path="..." content="..." write_note (mode=prepend)
读取笔记 obsidian read path="..." read_note
搜索 obsidian search query="..." search_notes
带上下文搜索 obsidian search:context query="..." search_notes
设置属性 obsidian property:set path="..." name="..." value="..." type=list update_frontmatter
读取属性 obsidian property:read path="..." name="..." get_frontmatter
标签列表 obsidian tags path="..." manage_tags
移动/重命名 obsidian move path="..." to="..." move_note
反向链接 obsidian backlinks path="..." (MCP 无此功能)
目录浏览 obsidian files folder="..." / obsidian folders list_directory
Vault 统计 obsidian vault get_vault_stats
删除笔记 obsidian delete path="..." delete_note

批量读取

CLI 无原生批量读取命令,使用 for 循环:

for card in $(obsidian search query="type/atomic"); do
  obsidian read path="$card"
done

Read the full file on GitHub · 154 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. 7d ago First seen · 154 lines · 2,109 tokens per session scan A fe5fd26ebcab

Subscribe to this mod's changes

knowledge-mgmt AGENTS.md is an instructions file published in the GitHub repository owenliang60-ship-it/knowledge-mgmt (37 stars, last pushed 4mo ago), licensed MIT. It adds 2,109 tokens to every session, about $0.0105 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

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,182 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

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

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

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

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens