my-git: Instructions file for Codex

AGENTS.md

my-git AGENTS.md is an instructions file for Codex, OpenCode from xirong/my-git. It costs 493 tokens per session, scanned A, original, MIT.

Repository guidance for a bilingual Git and GitHub handbook, including its structure, writing rules, validation commands, and prohibited actions.

In plain words
What is it for?
Use it when editing handbook articles, adding documentation, running checks, or following the project's commit and pull-request rules.
Why use it?
It helps contributors keep Chinese and English documentation aligned and catch broken links, forbidden terms, and formatting problems after changes.

Instructions file for CodexOpenCode

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

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

About the project

My Git is a practical handbook for using Git and GitHub in individual, team, and AI-assisted software development. It helps developers and technical leads understand Git, manage changes, choose collaboration workflows, govern repositories, and review or recover code produced with AI tools.

xirong/my-git · 7,403 stars · on GitHub

Reuse

Borrowing it

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

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 my-git AGENTS.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/xirong/my-git/agents-md"><img src="https://agentmods.dev/badge/instructions/xirong/my-git/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 493 This file is loaded in full into every session.
When invoked 493 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.00493 $0.00493
Opus 5.5 $0.00197 $0.00197
Sonnet 5.5 $0.00099 $0.00099
Haiku 4.5 $0.00049 $0.00049

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

Security

Grade A, and why

my-git 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.

AGENTS.md · 43 lines

What it actually says

AGENTS.md

本仓库是面向现代工程团队与 AI 编程时代的双语 Git / GitHub 手册。欢迎用 AI 工具协助维护,约定如下。

仓库结构

  • 01-getting-started/ 到 10-company-practices/ 是正文目录,每个目录的中文文章在目录根,English 文章在 <目录名>_en/ 子目录,文件名以 _en.md 结尾
  • 00-meta/ 放维护类文档:路线图、风格规范、release notes
  • 09-resources/legacy/ 是历史归档,保持原样
  • scripts/ 放文档检查脚本

改动后必须验证

python3 scripts/check-docs.py
python3 scripts/check-links.py --no-external
git diff --check

check-docs.py 会检查本地链接和禁用词,动笔前先看脚本里的 FORBIDDEN_LITERAL 列表,避免返工。

内容规则

  • 新文章遵循 内容风格规范
  • 先讲场景和判断,再给命令,危险操作必须写清风险
  • 涉及 GitHub 功能的描述要引用官方文档链接
  • 中英文内容成对维护:改中文文章时同步更新对应的 _en.md 文件,新文章要同时创建两份并互相链接
  • 新文章要加进所在目录的 README 和相关导航入口

禁止操作

  • 不修改 09-resources/legacy/ 下的历史归档
  • 不新增 pdf、docx 等二进制文档
  • 不修改 LICENSE
  • 不执行 git commit、git push、打 tag,这些由维护者确认后执行
  • 不删除已有文章,废弃内容先和维护者确认

提交与 PR 约定

  • commit message 用 docs: ...、ci: ... 风格,一个 commit 一个意图
  • AI 工具参与的提交加 Co-authored-by trailer
  • PR 描述写明使用的 AI 工具、人工检查过的文件、跑过的检查命令
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 · 43 lines · 493 tokens per session scan A 6a784989489f

Subscribe to this mod's changes

my-git AGENTS.md is an instructions file published in the GitHub repository xirong/my-git (7,403 stars, last pushed 1mo ago), licensed MIT. It adds 493 tokens to every session, about $0.0020 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

my-git AGENTS.md compared with instructions from other repositories

my-git AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
my-git AGENTS.mdxirong/my-gitInstructions file7.4k1mo agoMITA493Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode