init-claude-md: Instructions file for Codex

AGENTS.md

init-claude-md AGENTS.md is an instructions file for Codex, OpenCode from LetheChen/init-claude-md. It costs 868 tokens per session, scanned A, original, MIT.

Project instructions stored in an AGENTS.md file, covering session upkeep, coding principles, language preferences, file conventions, and workflow rules.

In plain words
What is it for?
Use it to maintain AGENTS.md and related TODO or reference files, and to guide how the agent communicates, edits code, branches, and commits.
Why use it?
It gives the coding agent consistent project-specific rules to follow across sessions. It also defines what project notes must be updated after changes or new decisions.

Instructions file for CodexOpenCode

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

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

Reuse

Borrowing it

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

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 init-claude-md AGENTS.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/lethechen/init-claude-md/agents-md"><img src="https://agentmods.dev/badge/instructions/lethechen/init-claude-md/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 868 This file is loaded in full into every session.
When invoked 868 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.00868 $0.00868
Opus 5.5 $0.00347 $0.00347
Sonnet 5.5 $0.00174 $0.00174
Haiku 4.5 $0.00087 $0.00087

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

Security

Grade A, and why

init-claude-md 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

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

Session Maintenance Protocol

开始时:读 TODO.md,复述当前 🔴 和 🟡 段;扫 references/ 是否与 SKILL.md 描述一致。

结束前(最后一条用户消息之后、停止前必做):

  1. 回看本次会话实际做了什么 —— 改动的文件、发现的问题、用户新增的约束
  2. 更新 TODO.md(决策表见 references/session-maintenance-protocol.md)
  3. 更新本文件的规则 —— 本次会话暴露的新约定加到对应段
  4. 刷新日期戳 > 最后更新:YYYY-MM-DD

触发条件:≥1 个仓库文件被改 · 用户新增约束 · 会话 > 10 分钟

Core rules (from Karpathy)

  1. Think Before Coding — surface assumptions, push back when warranted
  2. Simplicity First — minimum code that solves the problem
  3. Surgical Changes — touch only what you must
  4. Goal-Driven Execution — define success criteria, loop until verified

Language

  • Communication: zh(用户偏好)
  • Code comments: zh
  • Commit messages: en(Conventional Commits 必须英文)
  • Rule files: zh

Project conventions

  • 纯 Markdown skill:没有代码 / 包管理器 / 测试运行器
  • 编辑 SKILL.md 时必须同步更新 references/ 和 examples/(决策表、模板、检测矩阵三者锁步)
  • 所有文件统一用 UTF-8 no BOM(PowerShell Set-Content -Encoding UTF8 默认带 BOM,禁止用)
  • references/session-maintenance-protocol.md 是 single source of truth,根文件里的短版必须与之保持一致

Workflow

  • Branch: codex/<scope>-<slug>(solo 维护时直接用 main,feature branch 可选)
  • Commit: Conventional Commits(feat:, fix:, chore:, docs:, refactor:)
  • Solo 维护者:直接 git push origin main,commit log 即 audit trail
  • TODO.md:每次会话结束时按决策表更新

Verification

git diff --stat HEAD 确认改动符合预期;改 SKILL.md 后用 Get-Content -Encoding UTF8 检查没有 BOM。

Things to avoid

  • 不要在 skill 主体加 TypeScript / 任何编译型语言
  • 不要加 CI 依赖(这个 skill 没必要要求 Node 18+ 才能用)
  • 不要改 SKILL.md 时漏改 references/(决策表 / 模板 / 检测矩阵三者必须锁步)
  • 不要写带 BOM 的 UTF-8 文件(PowerShell 默认行为)
  • 不要从 examples/ 删文件而不补 README 的目录树
  • 不要把 description 字段里的中文触发词写错(之前是 涓? 乱码,每个 agent 看到的触发词是错的)
  • 不要用 PowerShell Get-Content | Set-Content 改 Markdown(CRLF 会丢成 LF-only、\a \b \v 会被 PS 解释成控制字符)。用 [System.IO.File]::ReadAllBytes/WriteAllBytes 字节级操作
  • 不要在 skill 里加 hook / cron / 外部触发器(软自动才是设计核心;外部触发器破坏跨 agent 兼容)
  • 不要去掉根文件顶部的 ## Session Maintenance Protocol 块(agent 失去结束前自检清单)

最后更新:2026-07-03

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. 2mo ago First seen · 54 lines · 868 tokens per session scan A d4d46f64baed

Subscribe to this mod's changes

init-claude-md AGENTS.md is an instructions file published in the GitHub repository LetheChen/init-claude-md (1 stars, last pushed 3mo ago), licensed MIT. It adds 868 tokens to every session, about $0.0035 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-31.

Related

Other instructions, from other repositories

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 · 9,715 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,461 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, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 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,680 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,750 tokens

deno copilot-instructions.md

Copilot instructions for denoland/deno, covering deno development guide for github copilot, network access, high level overview, key directories and key files to understand first.

denoland/deno · 3,077 tokens