Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add instructions/code-yeongyu/codex-rules/agents-mdgit clone --depth 1 https://github.com/code-yeongyu/codex-rulesWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00377 | $0.00377 |
| Opus 5 | $0.00188 | $0.00188 |
| Sonnet 5 | $0.00075 | $0.00075 |
| Haiku 4.5 | $0.00038 | $0.00038 |
Grade A, and why
codex-rules 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 yesterday.
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.
What it actually says
Repository Conventions
Conventions for human contributors and AI agents working on this repository.
Style
- Terse technical prose. No emojis in commits, issues, PR comments, or code.
- TypeScript strict mode. No
any, no@ts-ignore, no@ts-expect-error, no enums. - ESM modules with
.jssuffix in runtime import paths. - Tabs for indentation. Double quotes for strings.
- Tests use vitest with
#given .. #when .. #thendescriptions or plain// given / // when / // thenbody comments.
Commands
npm install- install dependencies.npm test- run vitest once.npm run typecheck- strict TypeScript check.npm run check- type check, biome, and build.npm pack --dry-run- release package smoke test.node dist/cli.js hook session-start < fixture.json- smoke-test static rule injection.node dist/cli.js hook post-tool-use < fixture.json- smoke-test dynamic rule injection.
Constraints
- No Bun APIs. Runtime is Node only because Codex launches plugin hooks with Node.
- Keep
SessionStart,UserPromptSubmit, andPostToolUsehook behavior covered by tests. - Keep Codex file path extraction for reads, edits,
apply_patch, and shell-style tools covered by tests. - Hook output must use the stable Codex hook JSON contract.
- Do not couple this package back to pi, omo, or senpi internal source paths.
Don'ts
- No
git add -Aorgit add .. Stage only the files you changed. - No
git commit --no-verify. No force pushes. No history rewriting on shared branches.
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.
- yesterday First seen · 35 lines · 377 tokens per session scan A d087dbf607e7
codex-rules AGENTS.md is an instructions file published in the GitHub repository code-yeongyu/codex-rules (11 stars, last pushed 4d ago), licensed MIT. It adds 377 tokens to every session, about $0.0019 per session on Opus 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.
Other instructions, from other repositories
pi-rules AGENTS.md
Instructions for code-yeongyu/pi-rules, covering agents.md, code style, test conventions, architecture and when adding a new rule source.
pi-rules review.instructions.md
Instructions for code-yeongyu/pi-rules: Reviewers MUST check tests pass before approving.
pi-rules copilot-instructions.md
Instructions for code-yeongyu/pi-rules: Always include error messages with context.
codexhub AGENTS.md
Instructions for zpf2234/codexhub, covering codexhub contributor guide and project expectations.
klaudiush CLAUDE.md
Instructions for smykla-skalski/klaudiush, covering claude.md, project overview, commands, completion (shell completion scripts) and doctor (diagnose setup and configuration).
scopeglass AGENTS.md
Instructions for zackabrah/scopeglass, covering scopeglass contributor instructions, project, commands, conventions and boundaries.