Skip to content

sypsyp97/claude-skill-codex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Codex Skill for Claude Code

Teach Claude Code how to invoke OpenAI's Codex CLI for advanced code analysis, refactoring, and automated editing.

A Claude Code skill that enables Claude to leverage OpenAI Codex CLI's advanced reasoning models for code reviews, refactoring, security audits, architecture analysis, and automated transformations.

Demo

Overview

This filesystem-based skill automatically activates when you mention Codex-related tasks. Simply ask Claude to review or refactor your code, and it will:

  • Select optimal model (gpt-5.2 vs gpt-5.2-codex) and reasoning effort
  • Execute Codex CLI with appropriate parameters and sandbox settings
  • Handle session resume, error recovery, and multi-step workflows
  • Summarize results and suggest next steps

Prerequisites

Before installing this skill:

  • Codex CLI installed: The codex command must be available on your PATH
  • Codex configured: Valid credentials in ~/.codex/config.toml
  • Verify installation: Run codex --version to confirm setup

If you don't have Codex installed, see the Codex CLI documentation.

Installation

Clone and copy the skill to your .claude/skills directory:

Personal Installation (all projects):

# Unix/Linux/macOS
git clone --depth 1 https://github.com/sypsyp97/claude-skill-codex.git /tmp/codex-skill && \
mkdir -p ~/.claude/skills && cp -r /tmp/codex-skill/.claude/skills/codex ~/.claude/skills/codex && \
rm -rf /tmp/codex-skill

# Windows (PowerShell)
git clone --depth 1 https://github.com/sypsyp97/claude-skill-codex.git $env:TEMP\codex-skill; `
New-Item -ItemType Directory -Force -Path "$env:USERPROFILE\.claude\skills"; `
Copy-Item -Recurse -Force "$env:TEMP\codex-skill\.claude\skills\codex" "$env:USERPROFILE\.claude\skills\codex"; `
Remove-Item -Recurse -Force "$env:TEMP\codex-skill"

Project-Specific Installation:

# Unix/Linux/macOS
git clone --depth 1 https://github.com/sypsyp97/claude-skill-codex.git /tmp/codex-skill && \
mkdir -p .claude/skills && cp -r /tmp/codex-skill/.claude/skills/codex .claude/skills/codex && \
rm -rf /tmp/codex-skill

# Windows (PowerShell)
git clone --depth 1 https://github.com/sypsyp97/claude-skill-codex.git $env:TEMP\codex-skill; `
New-Item -ItemType Directory -Force -Path ".claude\skills"; `
Copy-Item -Recurse -Force "$env:TEMP\codex-skill\.claude\skills\codex" ".claude\skills\codex"; `
Remove-Item -Recurse -Force "$env:TEMP\codex-skill"

Verify: Check that ~/.claude/skills/codex/SKILL.md or .claude/skills/codex/SKILL.md exists. Claude Code will automatically discover it.

Usage

Simply mention Codex in your conversation with Claude Code:

Review my Python code for security issues using codex
Use codex to refactor this module to async/await
Analyze the architecture of this codebase with codex
Resume the last codex session and apply the suggested changes

Claude will automatically activate the skill, ask for preferences (model and reasoning effort), and execute the appropriate command.

Example:

codex exec -m gpt-5-codex \
  --config model_reasoning_effort="high" \
  --sandbox read-only \
  --full-auto \
  "Analyze this repository..." 2>/dev/null

Note: Thinking tokens (stderr) are suppressed by default. To see them for debugging, ask: "Show me the thinking tokens from codex"

Configuration Reference

Model Selection Guide

Task Type Recommended Model Reasoning Effort
Quick syntax fixes gpt-5.2 minimal
Code review gpt-5.2 medium
Refactoring gpt-5.2-codex medium
Architecture analysis gpt-5.2 high
Security audit gpt-5.2 high
Algorithm optimization gpt-5.2-codex high
Documentation generation gpt-5.2 low

Sandbox Modes

  • read-only: Analysis and documentation (default)
  • workspace-write: Code modifications and file creation
  • danger-full-access: System operations (rarely needed)

For complete details including workflows, CLI reference, error handling, and best practices, see SKILL.md.

Resources

Contributing

Contributions welcome! Fork the repository, edit .claude/skills/codex/SKILL.md, test locally, and submit a pull request.

License

See LICENSE for details.

Acknowledgments

Inspired by skills-directory/skill-codex with extensive enhancements for production use, including comprehensive CLI documentation, multi-platform support, workflow orchestration, advanced error handling, and detailed troubleshooting guides.

About

A Claude skill enables Claude Code to integrate with the OpenAI Codex CLI.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors