codex-cli-best-practice is a collection of configurations and reusable components for Codex CLI, an agentic coding command-line environment. It organizes commands, subagents, skills, plugins, settings, and hooks to support repeatable coding-agent workflows. The catalogue entries are the project's own Codex extensions and instructions.
Borrowing it
Nothing to install: this file belongs to shanraisshan/codex-cli-best-practice. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/shanraisshan/codex-cli-best-practice/main/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/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.
<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="Reviewed on agentmods" width="80" 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.5 | $0.00390 | $0.00390 |
| Sonnet 5.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 1mo 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.
- 1mo 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 (1,018 stars, last pushed 4mo ago), licensed MIT. It adds 975 tokens to every session, about $0.0039 per session on Opus 5.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
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
vscode copilot-instructions.md
Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).
deno copilot-instructions.md
Copilot instructions for denoland/deno, covering deno development guide for github copilot, network access, high level overview, key directories and key files to understand first.