oh-my-knowledge: Instructions file for Codex

AGENTS.md

oh-my-knowledge AGENTS.md is an instructions file for Codex, OpenCode from lizhiyao/oh-my-knowledge. It costs 1,554 tokens per session, scanned A, original, MIT.

An agent instruction file defines how an AI should enter, modify, measure, and release work in a knowledge-management project. It covers prompts, retrieval-augmented generation (RAG), workflows, testing, and release rules.

In plain words
What is it for?
Use it to guide agent work on knowledge assets, evaluations, observations, branches, commits, pull requests, and releases.
Why use it?
It keeps changes measurable and comparable across versions while enforcing the project’s contribution and verification 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 lizhiyao/oh-my-knowledge's own configuration. It tells Codex and OpenCode how to work on oh-my-knowledge 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 oh-my-knowledge configures →

Reuse

Borrowing it

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/lizhiyao/oh-my-knowledge/agents-md"><img src="https://agentmods.dev/badge/instructions/lizhiyao/oh-my-knowledge/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,554 This file is loaded in full into every session.
When invoked 1,554 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.01554 $0.01554
Opus 5 $0.00777 $0.00777
Sonnet 5 $0.00311 $0.00311
Haiku 4.5 $0.00155 $0.00155

Measured today against content hash 14be1f35cf05, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

oh-my-knowledge 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 today.

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 · 54 lines

How it starts

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

AGENTS.md - OMK 项目约定

OMK(Observe. Measure. Know.)通过固定模型、改变知识载体,观测和测量 prompt、RAG、skill、agent、workflow 的版本差异。所有改动优先保护测量可比性、证据完整性和用户数据。

本文件是工具中立的项目入场清单。Claude Code 通过 CLAUDE.md import;不为不同工具复制维护第二份项目规则。

开工与交付

  • 涉及 commit、PR、分支或发版时,读取 CONTRIBUTING.md 的相关流程;同一任务已读且未变化时复用。
  • 修改子目录前,检查从仓库根到目标文件路径上的 AGENTS.md,最近的文件补充或覆盖上层项目约定;普通局部任务不遍历全仓规则。
  • 开工先明确需求、非目标、受影响边界和风险。用户确认方向后,在已授权的交付链内连续推进,不在实现、验证、自主 CR 等常规步骤间反复询问下一步。合并和发版分别按已有授权判断,不将合并等同于发布授权。
  • 长任务及时更新对应 Issue/PR 的已有执行清单,状态以实际完成情况为准。
  • 开发反馈优先跑受影响验证;首次 push 前默认跑一次 yarn ci,除非用户明确要求更窄验证,或改动仅限不影响生成产物、链接、打包与行为的手写文档/规则。首次 push 后事实未变化时,不为交付机械重跑本地门禁;存在远端 CI 时,以其结果补充确认。事实变化时,后续修复成批完成,并按影响范围重跑精准验证或完整门禁,不把远端 CI 当作增量反馈环。
  • clean-room 验收只在发布、打包/安装契约变化、真实用户入口变化或风险审查明确要求时执行;触发条件、被测边界与证据未变化时不重复执行。

自主 CR 与完成定义

  • 改变行为、契约、打包、文档承诺或仓库规则的改动,在首次 push/交付前自主完成一次 CR;纯机械改动快速复核,深度与风险匹配。
  • 首次自主 CR 前必须完整阅读 CODE_REVIEW.md;同一任务规则未变化时复用,不重复加载。以审查者视角只读检查最终变更、直接调用边界、契约和验证证据;发现跨模块影响时沿证据扩大范围。可使用独立 reviewer,否则做 fresh-pass 自审。
  • P0~P2 在交付前解决,P3 解决或登记 follow-up。修复后复查受影响面并重跑受影响验证;只有架构/公开行为实质变化、CI 新问题、重要 rebase 冲突或外部审查提出新高风险方向时,才重新做完整 CR。
  • Finding 的证据、优先级和格式遵守 CODE_REVIEW.md。无 finding 时明确说明,不制造猜测性问题;门禁、真实用户路径和未验证范围如实报告,不以 CI 绿色代替需求完成。
  • 用户要求审查具体 PR 时,将结论直接发布到对应 PR;用户明确要求仅本地审查时不发布,未指定或无法确定对应 PR 时不猜测发布对象。

CR 运行产物隔离

  • artifacts/cr/ 和 knowledge/cr/ 不是源码资产,不得在仓库内创建或保留,也不用 .gitignore 隐藏。纯只读审查不创建过程文件;只有实际运行会写盘的 CR 工具时,才用唯一仓库外临时目录保存全部运行产物,并显式配置输出路径,不得执行回写仓库的结果同步。
  • CR 前后检查工作树状态,确保审查工具未产生额外污染,不清理或覆盖用户原有修改。Issue/PR/CI 是持久审查记录;只有用户明确要求时才将报告作为项目资产提交。

Code Review Rules

  • 不静默改变评分口径、统计语义、prompt 字节、Schema identity 或持久化契约。必要变更显式版本化,在 PR 标题/描述标记对应 BREAKING-*、迁移及测量影响。
  • eval-core 保持宿主无关和确定性,不反向依赖 CLI、文件系统、网络、环境变量、具体执行器或 Studio。Core 只表达纯契约与确定性变换,副作用放在 eval-workflows 或对应 adapter。
  • 保留来源、时间、关联身份与原始证据;派生视图不覆盖原始证据,观测信号不冒充因果结论。
  • 测试使用显式临时根和环境隔离,覆盖失败/中断后的 cleanup 路径;生产写入只落到公开存储契约允许的位置,不擅自写用户目录或全局状态。
  • 新建或可安全改名的判别字段使用 eventKind、runtimeKind 等限定名;裸 kind 默认保留给 Artifact.kind。已发布、落盘或对外暴露的 public schema 既有 kind 不顺手改名;必要改名单独迁移并保持旧文件可读。细节见 docs/specs/terminology-spec.md §5.4。
  • 用户可见服务 URL 使用 server.start() 返回的实际地址,不硬编码端口。
  • .agents/skills/omk/ 是官方 Skill 单一来源,.claude/skills/omk 保持软链,不复制第二份;本文件不重复 Skill 用户教程。

Read the full file on GitHub · 54 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. today Changed · -22 lines · -960 tokens per session 14be1f35cf05
  2. 2d ago Changed · +42 tokens per session 51afbb11ab99
  3. 3d ago Changed · +13 lines · +515 tokens per session 17e03788f34d
  4. 5d ago Changed · -16 lines · -79 tokens per session 1e7dfde5d396
  5. 9d ago First seen · 79 lines · 2,036 tokens per session scan A 3860a1801cbc

Subscribe to this mod's changes

oh-my-knowledge AGENTS.md is an instructions file published in the GitHub repository lizhiyao/oh-my-knowledge (21 stars, last pushed today), licensed MIT. It adds 1,554 tokens to every session, about $0.0078 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

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