agentleFS
shanraisshanshanraisshan/codex-cli-best-practice/CLAUDE.md

codex-cli-best-practice

CLAUDE.md1k starsChanged 9 months agoMITView on GitHub

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. The repo demonstrates four interconnected systems: Run it: codex then prompt "Fetch the current weather for Dubai in Celsius and create the SVG weather card output using the repo." Profiles (codex --profile <name>):…

Trending

Quiet since June.thin dataabout the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 1 mentionMay 2026: 0 mentionsJun 2026: 1 mentionJul 2026: 0 mentionsAug 2026: 0 mentionsSep 2026: 0 mentionsOct 2026: 0 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the shanraisshan/codex-cli-best-practice repository that our weekly crawl found: only 2 in all, so this is a hint, not a trend. There is no adoption data for this file yet.

Who's talking about shanraisshan/codex-cli-best-practice

The biggest 2 of 2 mentions linking to the repository that our crawl found. Each line is their own headline.

The file

We split this CLAUDE.md into the rules it gives an agent

7 rules. About 0 are common, 3 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run it: codex then prompt "Fetch the current weather for Dubai in Celsius and create the SVG weather card output using the repo."

    line 32
  2. Distinctive:

    Commit 1: git add README.md → commit with README-specific message

    line 58
  3. Very specific:

    Commit 2: git add best-practice/codex-agents-md.md → commit with agents-doc-specific message

    line 59
  4. Very specific:

    Commit 3: git add .agents/skills/weather-svg-creator/SKILL.md → commit with skill-specific message

    line 60
  5. Distinctive:

    When editing best-practice guides or documentation in this repo:

    line 66
  6. Distinctive:

    Keep AGENTS.md under 150 lines (32 KiB byte cap)

    line 67
  7. Very specific:

    Use profiles for safety switching.

    line 69

≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

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

Run it: codex then prompt "Fetch the current weather for Dubai in Celsius and create the SVG weather card output using the repo."

Key Directories

  • best-practice/ — 8 comprehensive guides: config, agents-md, skills, subagents, hooks, mcp, marketplace, memory
  • orchestration-workflow/ — Weather system example with flow diagram and generated outputs
  • docs/SKILLS.md — Skills system reference
  • examples/ — Profile configs and CI/CD integration examples
  • AGENTS.md — Project guidance loaded hierarchically by Codex (cwd to git root, capped at 32 KiB)

Configuration Quick Reference

Profiles (codex --profile <name>):

ProfileModelSandboxApproval
conservativeo4-miniread-onlyuntrusted
developmento4-miniworkspace-writeon-request
trustedo3workspace-writenever
cio4-miniread-onlynever
reviewo3read-onlyon-request

Git Commit Convention

One file, one commit — do NOT bundle multiple file changes into a single commit. Each file gets its own commit with a descriptive message specific to that file's changes.

For example, if README.md, best-practice/codex-agents-md.md, and a skill file all changed:

  • Commit 1: git add README.md → commit with README-specific message
  • Commit 2: git add best-practice/codex-agents-md.md → commit with agents-doc-specific message
  • Commit 3: git add .agents/skills/weather-svg-creator/SKILL.md → commit with skill-specific message

This keeps git history clean and makes it easy to review, revert, or cherry-pick individual changes.

Content Guidelines

When editing best-practice guides or documentation in this repo:

  • Keep AGENTS.md under 150 lines (32 KiB byte cap)
  • Skill descriptions should be triggers ("when should I fire?"), not summaries
  • Use profiles for safety switching; keep behavioral rules out of AGENTS.md when config.toml is deterministic
  • Skills should stay under 150 lines with progressive disclosure (core in SKILL.md, details in references/)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.