wiki-bot: Instructions file for Codex

AGENTS.md

wiki-bot AGENTS.md is an instructions file for Codex, OpenCode from re0wiki/wiki-bot. It costs 6,697 tokens per session, scanned A, original, MIT.

Repository instructions for a Pywikibot bot that maintains the Chinese Re:Zero Fandom Wiki, a community encyclopedia about the Re:Zero series. They explain how to sync English pages, standardize Chinese names and formatting, and record knowledge in repository documentation.

In plain words
What is it for?
Maintaining wiki content, running the Python 3.14 and uv-based project, handling documentation, and following the repository's architecture and operational rules.
Why use it?
They give the coding agent one authoritative set of project rules, reducing conflicting instructions and undocumented decisions.

Instructions file for CodexOpenCode

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

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

Reuse

Borrowing it

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

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 wiki-bot AGENTS.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/re0wiki/wiki-bot/agents-md"><img src="https://agentmods.dev/badge/instructions/re0wiki/wiki-bot/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 6,697 This file is loaded in full into every session.
When invoked 6,697 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.06697 $0.06697
Opus 5.5 $0.02679 $0.02679
Sonnet 5.5 $0.01339 $0.01339
Haiku 4.5 $0.00670 $0.00670

Measured 9d ago against content hash 5b19c49b397a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

wiki-bot 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 9d 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 · 83 lines

How it starts

The opening of the file, as written. The whole thing — 83 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AGENTS.md — wiki-bot

Re:Zero Fandom Wiki(https://rezero.fandom.com/zh)的维护机器人,基于 Pywikibot。 主要工作:把英文站内容同步到中文站,并对中文站做译名/格式规范化。

知识归处(docs/ vs project skill vs profile skill)

  • 与本仓库/wiki 绑定的知识只写进本仓库、随 git 提交——这是唯一权威来源。两个落点:
    • docs/:数据/记录/被代码消费的文档(模板盘点、Module 审查、429 考据、翻译管线、todo 等);
    • .agents/skills/:流程型知识(project-local skills,Hermes 按 description 索引触发、按需加载)。
  • 项目 skill 的维护:用文件工具编辑 + git 提交,不用 skill_manage(其 create 写进 profile 目录);curator 不会改项目 skill。新 clone 后 Hermes 需在本仓库跑一次 hermes skills trust 才加载(banner 会提示)。
  • profile skill(~/.hermes/skills/)禁止存仓库知识:它在仓库之外、不随代码走,曾漂移出相互矛盾的副本。任务收尾时的知识落盘是主 agent(有文件工具)的职责;回合结束后的后台 skill review(只有 memory/skill 工具的 fork agent)对本仓库知识应直接放弃('Nothing to save')。
  • 判断标准是「知识从哪里来、在哪里验证」,不是「理论上能不能用在别处」:源自本仓库实践的 pywikibot / Fandom / Cloudflare 限流 / 模板审计等知识,即使看似通用,也算本仓库知识。
  • profile skill 只用于跨仓库/跨资源的流程(例如译名核验横跨 OCR 语料库与 gh issue)。新建前检查内容不与 docs/、.agents/skills/ 重复。
  • 文档记录原则:规则、原因、不变量进文档;仓库自身的变更事件(何时改了什么、谁改的)归 git log,不写编年史——文档里出现「2026-xx-xx 改了某文件」类句子即腐化信号。两类例外保留日期:对外部系统的实测观测(Fandom/Cloudflare 行为,日期=时效元数据)、wiki 侧决策与状态(wiki 没有决策日志,这里是唯一记录处)。

环境

  • Python >=3.14(pyproject.toml;当前解释器选择见 .python-version),uv 管理,有 uv.lock。
  • 安装:uv sync(default-groups = "all")。pywikibot 的全部可选依赖以 extras 形式声明在 dev 组(pywikibot[html,http,...]),覆盖其 requirements.txt,随 submodule 更新自动跟随。
  • 运行脚本:uv run python <script>(仓库根目录)。uv 按 cwd 的 pyproject.toml 定位项目 .venv,天然绕过 PATH 上 Hermes 自身 venv 的裸 python(3.11、无项目依赖),且每次运行顺带校验环境与 uv.lock 同步(开销可忽略,--no-sync 可跳过)。
  • pywikibot 是 git submodule(fork:github.com/re0wiki/pywikibot,upstream 是 wikimedia/pywikibot)。克隆要 --recurse-submodules(否则 uv sync 会因路径缺失失败)。fork 上的 re0wiki 定制补丁 rebase 上游时必须逐条保留——清单与流程的唯一权威是 pywikibot-update skill。更新 submodule 后提交信息写 chore: update pywikibot。
  • pywikibot 通过 [tool.uv.sources] 以 editable 方式从 submodule 路径装入 venv({ path = "pwb", editable = true }),submodule gitlink 是唯一版本锁,无需再同步 uv.lock 里的 commit。pyproject.toml 里的 [tool.ty.environment] extra-paths = ["./pwb"] 是必须的:ty 无法静态解析 PEP 660 editable finder,删掉会导致全项目 unresolved-import。
  • Lint:ruff check / ruff format(PATH 里没有 ruff 时用 uv run ruff ...,ty 同理;pyproject.toml 里 extend-exclude 了 pwb 子模块、logs/ 与 *.md(保留手工对齐的代码块注释),不要给它们 lint;src/oneoff/ 归档脚本纳入正常检查,归档前需先过 lint/format/ty)。类型检查用 ty(src.exclude 排除 pwb 与 logs/,正常应为 0 诊断)。Windows 上 ruff 无法检查可执行位,shebang 文件的 EXE001 只在 Linux(CI)触发——新增带 shebang 的脚本记得 git update-index --chmod=+x。
  • 离线单测:pytest tests/(不触 wiki;覆盖译名表一致性、watchdog 纯函数;PYWIKIBOT_DIR 由 tests/conftest.py 设置)。临时探索脚本写成 .py 放 scratch/(gitignored)、从仓库根目录跑(uv run python scratch/_foo.py);docs 只写结论不引用其路径。从子目录跑则 pywikibot 找不到 user-config.py(cwd 不参与配置发现时按用户目录找)。Wiki 侧改动验证方式仍是 -s/--simulate 干跑 + 上 wiki 查编辑结果。
  • Secrets:user-password.py(BotPasswords,gitignored,勿读勿提交)。

Read the full file on GitHub · 83 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. 9d ago Changed · +20 tokens per session 5b19c49b397a
  2. 13d ago Changed · +1 lines · +187 tokens per session 20aede85a18b
  3. 15d ago Changed · +13 tokens per session 7761cba049ef
  4. 1mo ago Changed · +228 tokens per session 94b104316884
  5. 1mo ago Changed · +169 tokens per session ac7546f61b83
  6. 1mo ago Changed · -20 tokens per session 6c2842c583c8
  7. 1mo ago Changed · -38 lines · -5,833 tokens per session b6655cd620eb
  8. 1mo ago Changed · +285 tokens per session 6b5eed224141
  9. 1mo ago Changed · +2 lines · +395 tokens per session a4267f2c9a9c
  10. 1mo ago First seen · 118 lines · 11,253 tokens per session scan A 73cd3e203bd8

Subscribe to this mod's changes

wiki-bot AGENTS.md is an instructions file published in the GitHub repository re0wiki/wiki-bot (5 stars, last pushed 3d ago), licensed MIT. It adds 6,697 tokens to every session, about $0.0268 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

wiki-bot AGENTS.md compared with instructions from other repositories

wiki-bot AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
wiki-bot AGENTS.mdre0wiki/wiki-botInstructions file53d agoMITA6,697Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,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