codex-cli-best-practice CLAUDE.md

codex-cli-best-practice CLAUDE.md is an instructions file for Claude Code, Codex from shanraisshan/codex-cli-best-practice. It costs 975 tokens per session, scanned B, a copy of codex-cli-best-practice AGENTS.md, MIT.

A repository guide for Claude Code, an AI coding assistant, showing how configuration, agents, and reusable skills work together. It uses a weather-data example and serves as documentation rather than a normal application.

In plain words
What is it for?
Use it to understand CLAUDE.md guidance, layered configuration, agent definitions, skill packages, and the main directories in a Claude Code setup.
Why use it?
It gives Claude Code consistent instructions about the repository’s structure, settings, and task-handling flow. This reduces guesswork when an agent reads or changes the project.

Instructions file for Claude CodeCodex

Written for Codex and Claude Code: reads ~/.codex or $CODEX_HOME, but also the file is CLAUDE.md. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions subagents.

Install

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.

agentmods
npx agentmods add instructions/shanraisshan/codex-cli-best-practice/claude-md
Clone the repo
git clone --depth 1 https://github.com/shanraisshan/codex-cli-best-practice

Made for: Claude Code, Codex.

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 codex-cli-best-practice CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/shanraisshan/codex-cli-best-practice/claude-md.svg)](https://agentmods.dev/instructions/shanraisshan/codex-cli-best-practice/claude-md)
Your own site
<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>
Per session 975 This file is loaded in full into every session.
When invoked 975 The same file — it is already loaded in full.
Security scan B 1 finding. Scan, not verified.
Origin 97% copy Near-identical to another mod 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.00975 $0.00975
Opus 5 $0.00487 $0.00487
Sonnet 5 $0.00195 $0.00195
Haiku 4.5 $0.00097 $0.00097

Measured 6d ago against content hash 0d67cbe43804, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

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
Origin

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.

CLAUDE.md · 71 lines

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:

  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 (~/.codex/config.toml); CLI flags override both.

  2. 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.

  3. 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.

  4. 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

Read the full file on GitHub · 71 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. 6d ago First seen · 71 lines · 975 tokens per session scan B 0d67cbe43804

Subscribe to this mod's changes

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.