Borrowing it
Nothing to install: this file belongs to st1page/agent-knowledge-framework. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/st1page/agent-knowledge-framework/main/AGENTS.mdgit clone --depth 1 https://github.com/st1page/agent-knowledge-frameworkWrote 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.
[](https://agentmods.dev/instructions/st1page/agent-knowledge-framework/agents-md)<a href="https://agentmods.dev/instructions/st1page/agent-knowledge-framework/agents-md"><img src="https://agentmods.dev/badge/instructions/st1page/agent-knowledge-framework/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.
<a href="https://agentmods.dev/instructions/st1page/agent-knowledge-framework/agents-md"><img src="https://agentmods.dev/badge/instructions/st1page/agent-knowledge-framework/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.01462 | $0.01462 |
| Opus 5.5 | $0.00585 | $0.00585 |
| Sonnet 5.5 | $0.00292 | $0.00292 |
| Haiku 4.5 | $0.00146 | $0.00146 |
Grade A, and why
agent-knowledge-framework 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 2mo 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.
How it starts
The opening of the file, as written. The whole thing — 111 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Agent Notes
每个 agent 在开始任何任务前,必须先通读本文件和角色 AGENTS.md,再开始动手。
仓库结构
agent-knowledge-framework/
├── base/ # 通用知识(所有角色共享)
│ ├── experience/ # 不属于特定角色的经验
│ ├── principles/ # 通用原则和规范
│ ├── skills/ # 通用技能(每个技能目录主入口为 SKILL.md)
│ └── insights/ # 通用洞察(跨角色的规律性认知)
└── roles/ # 各角色目录
├── cli-tool-dev/ # CLI/TUI 工具开发
├── maintainer/ # 知识仓库维护
└── <role>/
├── AGENTS.md # 角色描述 + 知识索引(始终加载)
├── principles/ # 角色专有原则
├── skills/ # 角色专有技能
├── insights/ # 角色专有洞察
└── experience/ # 角色经验复盘
知识加载与沉淀
- 常驻 context:
AGENTS.md(本文件)+roles/<role>/AGENTS.md - 按需加载(分层):角色/目录
AGENTS.md索引 → skill/principle/insight → experience(按source或 "Escalate to experience if" 升级) - 症状/高风险直达:出现特定报错或做迁移/发布/权限操作时,可直接用关键词检索 experience
- Context 压缩后:如果你不确定索引内容或协作规则细节,说明 context 已被压缩,立即重新
Read本文件 + 角色AGENTS.md
详细的加载策略(常驻 vs 按需判断标准、experience 唤醒、摘要写法)见 base/principles/knowledge-loading.md。
完成重要工作后(PR review 修复、跨层 bug 修复、首次跑通流程、踩坑),agent 应主动沉淀经验。知识分类(experience/skill/principle/insight)、存放位置判断、提炼流程和反模式,见 base/knowledge-sedimentation.md。
多 Agent 协作规则
本仓库假定多个 coding agent 可能同时修改,所有写操作必须遵守以下规则。
Agent 工作中涉及两类仓库,规则同样适用:
- Agent 目录(本仓库):存放角色知识、经验、技能文档
- 工作目录(实际代码仓库)
1. 所有写操作必须在 worktree 中进行,禁止直接 push main
始终创建 worktree,不要在主工作目录中 git checkout 或 git checkout -b 切分支。只读操作可以在 main 上进行。
常见违规模式(禁止):
git checkout -b <branch>然后直接在主工作目录编辑——这不是 worktree,只是切了分支- "先写完再搬到 worktree"——一旦开始编辑就很难搬,必须一开始就在 worktree 里
正确流程:
git fetch origin
git worktree add .claude/worktrees/<topic> -b <agent>/<topic> origin/main
cd .claude/worktrees/<topic>
# ... 编辑、commit ...
git push -u origin <agent>/<topic>
关键:永远基于 origin/main 创建 worktree,不要基于本地 main(可能过时)。详见 base/principles/git-worktree.md。
检查点:执行任何
git checkout -b或文件编辑前,先问自己"我现在在 worktree 里吗?"。如果pwd不包含.claude/worktrees/,停下来,先创建 worktree。
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.
- 2mo ago First seen · 111 lines · 1,462 tokens per session scan A 8be5a7363b56
agent-knowledge-framework AGENTS.md is an instructions file published in the GitHub repository st1page/agent-knowledge-framework (42 stars, last pushed 8mo ago), licensed Apache-2.0. It adds 1,462 tokens to every session, about $0.0058 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.
agent-knowledge-framework AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| agent-knowledge-framework AGENTS.mdst1page/agent-knowledge-framework | Instructions file | 42 | 8mo ago | Apache-2.0 | A | 1,462 | Codex, OpenCode |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | today | MIT | A | 7,461 | Codex, OpenCode |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | yesterday | MIT | A | 4,680 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 5,516 | GitHub Copilot |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 3,093 | GitHub Copilot |
| deepseek-harness AGENTS.mddeepseek-ai/deepseek-harness | Instructions file | 274k | 2d ago | MIT | A | 4,313 | Codex, OpenCode |