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/shanraisshan/codex-cli-best-practice/agents-mdgit clone --depth 1 https://github.com/shanraisshan/codex-cli-best-practiceWhat 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.00969 | $0.00969 |
| Opus 5 | $0.00485 | $0.00485 |
| Sonnet 5 | $0.00194 | $0.00194 |
| Haiku 4.5 | $0.00097 | $0.00097 |
Grade B, and why
codex-cli-best-practice AGENTS.md scanned grade B with 1 finding 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.
Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
1. **Config** (`.codex/config.toml`) — TOML-based layered config with 5 profiles (conservative, development, trusted, ci, review), MCP server registration, and agent definitions. Project-level overrides user-level (`~/.c Copies of this mod
1 near-identical copy found in the catalogue:
- codex-cli-best-practice CLAUDE.md — 97% identical, 4 lines differ
How it starts
The opening of the file, as written. The whole thing — 71 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md
This file provides guidance to Codex CLI when working with code in this repository.
What This Is
A best practices reference repository for Codex CLI (v0.121.0+) and Claude Code, demonstrating the Agent → Skill orchestration pattern through a weather data system example. This is a documentation and configuration reference, not a traditional application codebase.
Maintained by Shayan Raees (@shanraisshan). Companion repos: claude-code-best-practice, codex-cli-hooks, claude-code-hooks.
Architecture
The repo demonstrates four interconnected systems:
-
Config (
.codex/config.toml) — TOML-based layered config with 5 profiles (conservative, development, trusted, ci, review), MCP server registration, and agent definitions. Project-level overrides user-level (~/.codex/config.toml); CLI flags override both. -
Agents (
.codex/agents/*.toml) — Registered under[agents.<name>]in config.toml with dedicated role files. The weather-agent fetches temperature from Open-Meteo API and delegates rendering to a skill. -
Skills (
.agents/skills/<name>/SKILL.md) — Reusable instruction packages with YAML frontmatter (name,description). Discovered progressively from cwd up to/etc/codex/skills. Invoked via/skills,$skill-name, or auto-triggered by description match. -
Hooks — Event-driven Python scripts. Claude Code has 27 hooks (
.claude/settings.json→.claude/hooks/scripts/hooks.py); Codex CLI has 5 (.codex/hooks.json). Hooks play audio feedback per event with cross-platform support (macOS/Linux/Windows).
Orchestration Flow
User Prompt → weather-agent (fetches temp from Open-Meteo)
→ /weather-svg-creator skill (renders SVG card)
→ orchestration-workflow/weather.svg
→ orchestration-workflow/output.md
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 · 71 lines · 969 tokens per session scan B 2830ba313026
codex-cli-best-practice AGENTS.md is an instructions file published in the GitHub repository shanraisshan/codex-cli-best-practice (978 stars, last pushed 2mo ago), licensed MIT. It adds 969 tokens to every session, about $0.0048 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other instructions, from other repositories
claude-code-best-practice CLAUDE.md
Claude Code instructions for shanraisshan/claude-code-best-practice, covering claude.md, repository overview, key components, weather system (example workflow) and skill definition structure.
claude-code-hooks CLAUDE.md
Instructions for shanraisshan/claude-code-hooks, covering claude code hooks, project structure, critical: hook count consistency, agent hooks and workflows.
codex-cli-hooks CLAUDE.md
Claude Code instructions for shanraisshan/codex-cli-hooks, covering claude.md / agents.md, what this repo is, common commands, run a single test and manually invoke a hook (what codex does internally).
codex-cli-hooks AGENTS.md
AGENTS.md instructions for shanraisshan/codex-cli-hooks, a project described as: codex cli hooks - adding voice on each hook.
claude-code-tresor CLAUDE.md
Instructions for alirezarezvani/claude-code-tresor, covering claude.md - development guide, 🎯 repository purpose, 🏗️ architecture, 🛠️ common development commands and building & testing.
turbo-flow CLAUDE.md
Claude Code instructions for marcuspat/turbo-flow, covering claude.md — turbo flow, what this repo is, key files and conventions.