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/claude-mdgit clone --depth 1 https://github.com/shanraisshan/codex-cli-best-practiceWrote 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.
[](https://agentmods.dev/instructions/shanraisshan/codex-cli-best-practice/claude-md)<a href="https://agentmods.dev/instructions/shanraisshan/codex-cli-best-practice/claude-md"><img src="https://agentmods.dev/badge/instructions/shanraisshan/codex-cli-best-practice/claude-md.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00975 | $0.00975 |
| Opus 5 | $0.00487 | $0.00487 |
| Sonnet 5 | $0.00195 | $0.00195 |
| Haiku 4.5 | $0.00097 | $0.00097 |
Grade B, and why
codex-cli-best-practice CLAUDE.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 6d 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.
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 This is a copy
97% identical to codex-cli-best-practice AGENTS.md — 4 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
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.
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) 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.
- 6d ago First seen · 71 lines · 975 tokens per session scan B 0d67cbe43804
codex-cli-best-practice CLAUDE.md is an instructions file published in the GitHub repository shanraisshan/codex-cli-best-practice (980 stars, last pushed 3mo ago), licensed MIT. It adds 975 tokens to every session, about $0.0049 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). It is 97% identical to codex-cli-best-practice AGENTS.md, differing in 4 lines, and is treated as a copy.
Other instructions, from other repositories
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.
moai-adk CLAUDE.md
Claude Code instructions for modu-ai/moai-adk, covering moai execution directive, 0. standing contract (imported), 1. core identity, hard rules (mandatory) and 2. request processing pipeline.
shanraisshan CLAUDE.md
Claude Code instructions for shanraisshan/shanraisshan, covering claude.md, what this repo is, key files, badge formatting rules and reddit views (badges at >= 50k).
agentfactory CLAUDE.md
Claude Code instructions for stempeck/agentfactory, covering agentfactory, build commands, dependencies, project structure and cli commands.