mini-claude-code-python: Instructions file for Codex

AGENTS.md

mini-claude-code-python AGENTS.md is an instructions file for Codex, OpenCode from Xiaxia1997/mini-claude-code-python. It costs 608 tokens per session, scanned A, original, MIT.

A set of contribution rules for an open-source tutorial that builds a Claude Code-style coding agent in Python chapter by chapter. It covers the project’s language, code boundaries, documentation, tests, versioning, and release records.

In plain words
What is it for?
It guides contributors working on tutorial chapters, standalone examples, automated tests, documentation, version numbers, and release tags. It also sets rules for checking official documentation and avoiding copied implementations.
Why use it?
It keeps the tutorial, example programs, tests, README, and release tags consistent as the project grows. TDD, or test-driven development, means writing or updating tests before changing the code.

Instructions file for CodexOpenCode

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

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

Reuse

Borrowing it

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

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 mini-claude-code-python AGENTS.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/xiaxia1997/mini-claude-code-python/agents-md"><img src="https://agentmods.dev/badge/instructions/xiaxia1997/mini-claude-code-python/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 608 This file is loaded in full into every session.
When invoked 608 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.00608 $0.00608
Opus 5.5 $0.00243 $0.00243
Sonnet 5.5 $0.00122 $0.00122
Haiku 4.5 $0.00061 $0.00061

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

Security

Grade A, and why

mini-claude-code-python 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 · 41 lines

What it actually says

Mini Claude Code Python 协作规则

项目目标

这个仓库是面向开源读者的逐章教程:用 Python 从小到大实现一个 Claude Code 风格的 coding agent。每章都应该同时提供:

  • 一篇可独立阅读的中文教程;
  • 一个独立可运行的 examples/chapter-XX/ 参考实现;
  • 覆盖本章关键行为的自动化测试;
  • 与 README、版本号、tag 进度一致的发布记录。

默认语言与风格

  • 项目交流必须使用中文,包括状态更新、问题确认、实施说明和最终总结。
  • 面向外部读者的教程正文默认使用中文;英文 README 只做入口与摘要,不替代中文教程。
  • 教程面向外部读者,避免出现本机用户名、私有路径、未解释的内部项目名。
  • 文档中的示例路径使用本仓库通用路径,例如 examples/chapter-08/agent.py。
  • 代码块使用 ASCII 引号和标点,除中文正文外避免不必要的 Unicode 符号。

代码来源边界

  • 不从旧参考仓库复制实现代码。
  • 可以把旧参考仓库当作章节主题、需求清单和概念参考,但本仓库的代码必须按当前项目结构重新实现。
  • 需要描述外部 API 行为时,优先用官方文档或本仓库测试验证,不凭旧教程或记忆下结论。

章节一致性要求

  • README、chapters/*.md、examples/chapter-XX/*.py、tests/*.py 必须互相对齐。
  • 教程里声称“已实现”的函数、命令、文件和行为,必须能在对应 example 或测试中找到。
  • 每章 example 应独立运行,不依赖后续章节目录。
  • 前一章没实现的能力不能在后一章写成“早已实现”;如果调整了落点,要同步修正文档。
  • 发现教程和代码不一致时,优先修正为当前仓库真实状态,再继续扩展。

测试与发布

  • 修改行为前先补或更新测试,按 TDD 做 red/green。
  • 发布前至少运行 .venv/bin/python -m pytest -q。
  • 逐章发布时,每章完成后更新 pyproject.toml 版本、README 进度和 tag 列表。
  • tag 命名沿用现有格式:v0.8-memory、v0.9-skills、v0.10-plan-mode、v0.11-sub-agent。
  • push 代码或 tag 属于外部发布动作,执行前需要单独确认。
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 · 41 lines · 608 tokens per session scan A a4a2751b6040

Subscribe to this mod's changes

mini-claude-code-python AGENTS.md is an instructions file published in the GitHub repository Xiaxia1997/mini-claude-code-python (25 stars, last pushed 3mo ago), licensed MIT. It adds 608 tokens to every session, about $0.0024 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