TwhWiki: Instructions file for Codex

AGENTS.md

TwhWiki AGENTS.md is an instructions file for Codex, OpenCode from lihaozheCharlie/TwhWiki. It costs 1,061 tokens per session, scanned A, original, MIT.

A set of operating rules for TwhWiki, a personal knowledge wiki that separates original notes from edited wiki content. It defines how agents read, route, update, and review that information.

In plain words
What is it for?
Use it when querying the wiki, importing new sources, updating approved knowledge sections, changing rules, or running quality checks.
Why use it?
It prevents unauthorized edits and directs each request to the right workflow, such as querying, importing, or updating people and life records.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions AGENTS.md.

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

Reuse

Borrowing it

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

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 TwhWiki AGENTS.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/lihaozhecharlie/twhwiki/agents-md"><img src="https://agentmods.dev/badge/instructions/lihaozhecharlie/twhwiki/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,061 This file is loaded in full into every session.
When invoked 1,061 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.01061 $0.01061
Opus 5 $0.00531 $0.00531
Sonnet 5 $0.00212 $0.00212
Haiku 4.5 $0.00106 $0.00106

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

Security

Grade A, and why

TwhWiki 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 10d 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 · 79 lines

How it starts

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

TwhWiki 智能体工作协议

本仓库把 原始知识库/ 视为证据层,把 wiki/ 视为经过整理、可修订的综合层。

读取顺序

  1. 先读本文件,判断请求是只读消费、获授权构建、规则调整还是体系维护。
  2. 再读 wiki/AGENTS.md,了解 Wiki 结构和当前约定。
  3. 按下方唯一路由表读取相关 SKILL.md;只加载被选中 Skill 要求的参考文件。
  4. AGENTS.md 是唯一运行入口,skills/ 是唯一 Skill 内容源。

授权边界

  • 查询、分析、审查、诊断、解释和问题报告默认只读。
  • 只有用户明确要求修改、摄取、重跑、重建或修复时,才能写入 Wiki 或调整规则。
  • 识别到值得沉淀的信号,本身不构成写入授权。
  • 不改写原始笔记正文;任务明确需要时,只能追加 Wiki 管道区块或元数据。

唯一路由表

请求类型 必读流程
查询、综合、导航或引用现有 Wiki skills/consume/query/SKILL.md
“跑一下 Wiki”、新增日记、多来源更新、对话或其他来源摄取 skills/build/wiki-build/SKILL.md
获授权更新个人主线、人生阶段、事件决策、反复循环、思维模型或金句 skills/build/life-review/SKILL.md
获授权更新人物、别名、关系功能或人物关系图谱 skills/build/people/SKILL.md
获授权更新现实系统、城市、组织、项目或地点 skills/build/life-experience/SKILL.md
获授权更新当前状态和趋势证据 skills/build/state-tracking/SKILL.md
明确要求近况回信、朋友式回应,或摄取流程要求生成回信 skills/build/companion-reflection/SKILL.md
明确要求修改分类、模板、抽取规则或 Skill 行为 skills/build/knowledge-adjustment/SKILL.md
Wiki 或 Skill 修改后的质量检查 skills/common/quality-gate/SKILL.md
Skill 体系分析、设计、路由、职责图或验证器调整 skills/common/skill-system/SKILL.md
明确要求使用人物视角、比较多种视角,或领域 Skill 需要解释性推理 skills/common/reasoning-lenses/SKILL.md
获授权维护期间的耐久信号分类,或信号路由诊断 skills/common/signal-detector/SKILL.md

路由消歧

  • 直接问题无论涉及人物、阶段还是系统,都先走只读查询流程。
  • 事实查询只走查询流程;解释性查询可以同时使用共享推理视角。
  • 宽泛构建或任何来源摄取先走统一构建流程,并填写 skills/build/wiki-build/impact-matrix.md 的每一行。
  • 模板、分类、抽取或 Skill 规则变更先走知识调整流程,再只重跑确实受影响的内容。
  • 有实质修改后必须串联质量门;只读检查不得自动变成修复。

始终执行的信号扫描

快速识别新想法、原句、人物、地点、项目、新来源和规则变更,但未经明确授权不得写入。只有在维护或调试信号路由时,才读取 skills/common/signal-detector/SKILL.md

核心规则

  • Wiki 判断必须能追溯到原始笔记、获授权对话或既有综合页。
  • 推断必须标为“推断”或“待查”。
  • 按主要对象归档,不使用泛化暂存页代替领域页面。
  • 用户原话本身构成洞见时,保留准确措辞。
  • 模板没有证据支持的章节可以省略,不能生成占位内容。

修改后的验证

Markdown 修改后运行:

python3 tools/update_obsidian_tags.py
python3 tools/update_obsidian_tags.py
python3 tools/validate_wiki_links.py

第二次标签运行必须报告 updated=0,链接验证必须报告 missing=0 ambiguous=0

修改 Skill、路由规则或维护工具后还要运行:

python3 tools/validate_skill_system.py

Read the full file on GitHub · 79 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. 10d ago First seen · 79 lines · 1,061 tokens per session scan A efce2d5b0522

Subscribe to this mod's changes

TwhWiki AGENTS.md is an instructions file published in the GitHub repository lihaozheCharlie/TwhWiki (24 stars, last pushed 5d ago), licensed MIT. It adds 1,061 tokens to every session, about $0.0053 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

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

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