source-reading-methodology: Instructions file for Codex

AGENTS.md

source-reading-methodology AGENTS.md is an instructions file for Codex, OpenCode from itshen/source-reading-methodology. It costs 539 tokens per session, scanned A, original, MIT.

A set of instructions for using and maintaining a source-reading methodology: a process for studying large open-source codebases and writing explanations that can be traced back to exact source lines.

In plain words
What is it for?
Use it to read a module, write an architecture analysis, or create a technical book or course from source code. It also guides updates to the methodology repository and checks published material.
Why use it?
It reduces unsupported claims, copied-code mistakes, and unclear research scope when an AI explains a codebase. It also keeps the methodology and its supporting files consistent when the repository changes.

Instructions file for CodexOpenCode

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

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

Reuse

Borrowing it

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

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 source-reading-methodology AGENTS.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/itshen/source-reading-methodology/agents-md"><img src="https://agentmods.dev/badge/instructions/itshen/source-reading-methodology/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 539 This file is loaded in full into every session.
When invoked 539 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.00539 $0.00539
Opus 5.5 $0.00216 $0.00216
Sonnet 5.5 $0.00108 $0.00108
Haiku 4.5 $0.00054 $0.00054

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

Security

Grade A, and why

source-reading-methodology 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 1mo 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 · 25 lines

What it actually says

给 AI 的入口

这个仓库是一套源码精读方法论:带 AI 精读大型开源仓库,产出每句话都能回溯到源码具体行的书稿、课程或技术文档。

要用这套方法论干活

动手之前先完整读 SKILL.md。 它是唯一入口,一份文件讲完整套流程:四阶段工作流、零幻觉铁律、引用格式、文风约束、机器校验、并行生产。需要细节时再去读 templates/、PITFALLS.md 和 book/README.md,不要凭印象补。

一条不可妥协:每一个技术论断都可回溯到源码的具体行。 代码块必须与源文件逐字节一致,行号动笔前用读文件工具实读核实,中间跳过内容要写显式省略标记,查不到就写明「未找到对应实现,检索关键词为 X、Y」。编一个看起来合理的,整份产出的可信度就是零。

接到任务先问清产出形态和规模再动手。读懂一个模块、写一篇架构分析、做一门几十节的课,该走的阶段数完全不同,四阶段全流程很重,小任务不需要。

要改这个仓库本身

  • 方法论正文改 METHODOLOGY.md,改完确认 SKILL.md 里的对应段落没跟它矛盾。两份都是入口,漂移了后来的人会按错的那份做
  • 新踩的坑加进 PITFALLS.md,写清现象、原因、怎么防。不写抽象教训
  • 动过 book/ 的主题或 sample/chapters/,重建样张并确认产物正常:
python3 book/build_book.py --config sample/book.config.json   # 产物在 docs/,提交后 Pages 自动发布
python3 book/shot_book.py docs -c ch-02.html                  # 截图校对,同时报告页面 JS 报错
  • 面向读者的正文交付前跑 python3 templates/style_scan.py <路径>,句式禁忌必须清零。不要用同义替换绕过正则,禁的是那种表达方式,不是那几个字
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. 1mo ago First seen · 25 lines · 539 tokens per session scan A 3ce4d045aaa2

Subscribe to this mod's changes

source-reading-methodology AGENTS.md is an instructions file published in the GitHub repository itshen/source-reading-methodology (139 stars, last pushed 2mo ago), licensed MIT. It adds 539 tokens to every session, about $0.0022 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