agentleFS
virgoC0dervirgoC0der/awesome-claude-code/skills/codex/SKILL.md

codex

Skill1 starsChanged 3 months agoMITView on GitHub

Execute Codex CLI for code analysis, refactoring, and automated code changes. Use when you need to delegate complex code tasks to Codex AI with file references (@syntax) and structured output.

79 other projects use a version of this, 1 of them edited.

Adopted by

Most recently taken up by

Used with

Projects with it also use minecraft-modpack-server, pokemon-player and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • braxtonROSE4Skill

    minecraft-modpack-server

    Set up a modded Minecraft server from a CurseForge/Modrinth server pack zip. Covers NeoForge/Forge install, Java version, JVM tuning, firewall, LAN config, backups, and launch scripts.

    Also in 5 projects that use this

  • braxtonROSE4Skill

    pokemon-player

    Play Pokemon games autonomously via headless emulation. Starts a game server, reads structured game state from RAM, makes strategic decisions, and sends button inputs — all from the terminal.

    Also in 5 projects that use this

  • kevinnftSkill

    touchdesigner-mcp

    Control a running TouchDesigner instance via twozero MCP — create operators, set parameters, wire connections, execute Python, build real-time visuals. 36 native tools.

    Also in 7 projects that use this

  • john-data-chenSkill

    teams-meeting-pipeline

    Operate the Teams meeting summary pipeline via Hermes CLI — summarize meetings, inspect pipeline status, replay jobs, manage Microsoft Graph subscriptions.

    Also in 8 projects that use this

  • ayudaySkill

    setup-deploy

    Configure deployment settings for /land-and-deploy. Detects your deploy platform (Fly.io, Render, Vercel, Netlify, Heroku, GitHub Actions, custom), production URL, health check endpoints, and deploy status commands. Writes the configuration to CLAUDE.md so all future deploys are automatic. Use when: "setup deploy", "configure deployment", "set up land-and-deploy", "how do I deploy with gstack", "add deploy config".

    Also in 9 projects that use this

  • bergsideSkill

    sketch

    A friendly, hand-drawn sketch interface inspired by pencil illustrations on warm cream paper. Soft teal brand accents, hand-written display headings, rounded pill controls.

    Also in 9 projects that use this

  • +6 more from braxtonROSE4

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 2 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 66 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

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

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

    Bash tool: Always set timeout: 7200000 parameter for double protection

    line 44
  2. Distinctive:

    When calling via Bash tool, always include the timeout parameter:

    line 71
  3. Very specific:

    Recommended: Use uv run for automatic Python environment management (requires uv installed)

    line 130
  4. Distinctive:

    Every execution returns a session ID for resuming conversations

    line 138

“Common” is measured: kept by at least 6 in 10 of the 66 edited versions of this file we could read. “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
SKILL.md

Codex CLI Integration

Overview

Execute Codex CLI commands and parse structured JSON responses. Supports file references via @ syntax, multiple models, and sandbox controls.

When to Use

  • Complex code analysis requiring deep understanding
  • Large-scale refactoring across multiple files
  • Automated code generation with safety controls
  • Tasks requiring specialized reasoning models (gpt-5.1, gpt-5.1-codex)

Usage

推荐方式(使用 uv run,自动管理 Python 环境):

uv run ~/.claude/skills/codex/scripts/codex.py "<task>" [model] [working_dir]

备选方式(直接执行或使用 Python):

~/.claude/skills/codex/scripts/codex.py "<task>" [model] [working_dir]
# 或
python3 ~/.claude/skills/codex/scripts/codex.py "<task>" [model] [working_dir]

恢复会话:

uv run ~/.claude/skills/codex/scripts/codex.py resume <session_id> "<task>" [model] [working_dir]

Timeout Control

  • Built-in: Script enforces 2-hour timeout by default
  • Override: Set CODEX_TIMEOUT environment variable (in milliseconds, e.g., CODEX_TIMEOUT=3600000 for 1 hour)
  • Behavior: On timeout, sends SIGTERM, then SIGKILL after 5s if process doesn't exit
  • Exit code: Returns 124 on timeout (consistent with GNU timeout)
  • Bash tool: Always set timeout: 7200000 parameter for double protection

Parameters

  • task (required): Task description, supports @file references
  • model (optional): Model to use (default: gpt-5.1-codex)
    • gpt-5.1-codex: Default, optimized for code
    • gpt-5.1: Fast general purpose
  • working_dir (optional): Working directory (default: current)

Return Format

Extracts agent_message from Codex JSON stream and appends session ID:

Agent response text here...

---
SESSION_ID: 019a7247-ac9d-71f3-89e2-a823dbd8fd14

Error format (stderr):

ERROR: Error message

Invocation Pattern

When calling via Bash tool, always include the timeout parameter:

Bash tool parameters:
- command: uv run ~/.claude/skills/codex/scripts/codex.py "<task>" [model] [working_dir]
- timeout: 7200000
- description: <brief description of the task>

Alternatives:

# Direct execution (simplest)
- command: ~/.claude/skills/codex/scripts/codex.py "<task>" [model] [working_dir]

# Using python3
- command: python3 ~/.claude/skills/codex/scripts/codex.py "<task>" [model] [working_dir]

Examples

Basic code analysis:

# Recommended: via uv run (auto-manages Python environment)
uv run ~/.claude/skills/codex/scripts/codex.py "explain @src/main.ts"
# timeout: 7200000

# Alternative: direct execution
~/.claude/skills/codex/scripts/codex.py "explain @src/main.ts"

Refactoring with specific model:

uv run ~/.claude/skills/codex/scripts/codex.py "refactor @src/utils for performance" "gpt-5.1-codex"
# timeout: 7200000

Multi-file analysis:

uv run ~/.claude/skills/codex/scripts/codex.py "analyze @. and find security issues" "gpt-5.1-codex" "/path/to/project"
# timeout: 7200000

Resume previous session:

# First session
uv run ~/.claude/skills/codex/scripts/codex.py "add comments to @utils.js" "gpt-5.1-codex"
# Output includes: SESSION_ID: 019a7247-ac9d-71f3-89e2-a823dbd8fd14

# Continue the conversation
uv run ~/.claude/skills/codex/scripts/codex.py resume 019a7247-ac9d-71f3-89e2-a823dbd8fd14 "now add type hints"
# timeout: 7200000

Using python3 directly (alternative):

python3 ~/.claude/skills/codex/scripts/codex.py "your task here"

Notes

  • Recommended: Use uv run for automatic Python environment management (requires uv installed)
  • Alternative: Direct execution ./codex.py (uses system Python via shebang)
  • Python implementation using standard library (zero dependencies)
  • Cross-platform compatible (Windows/macOS/Linux)
  • PEP 723 compliant (inline script metadata)
  • Runs with --dangerously-bypass-approvals-and-sandbox for automation (new sessions only)
  • Uses --skip-git-repo-check to work in any directory
  • Streams progress, returns only final agent message
  • Every execution returns a session ID for resuming conversations
  • Requires Codex CLI installed and authenticated

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.