Agent skill
codex
Execute Codex CLI for code generation, analysis, web search and web fetch. Two capabilities - (1) Code Generation with deep reasoning, (2) Web Search & Fetch for online research.
Install this agent skill to your Project
npx add-skill https://github.com/acking-you/myclaude-skills/tree/main/skills/codex
SKILL.md
Codex CLI Integration
Two specialized capabilities for different use cases.
Capability 1: Code Generation
Deep code analysis and generation with maximum reasoning power.
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
Default Configuration
- Model:
gpt-5.2-codex - Reasoning:
xhigh(maximum thinking depth)
Command Pattern
codex e -m gpt-5.2-codex -c model_reasoning_effort=xhigh \
--dangerously-bypass-approvals-and-sandbox \
--skip-git-repo-check \
-C <workdir> \
"<task>"
Parameters
<task>(required): Task description, supports@filereferences-m <model>: Override model (e.g.,gpt-5.1-codex,gpt-5)-c model_reasoning_effort=<level>: Override reasoning (low/medium/high/xhigh)-C <workdir>: Working directory (default: current)
Examples
Basic code analysis:
codex e -m gpt-5.2-codex -c model_reasoning_effort=xhigh \
--dangerously-bypass-approvals-and-sandbox \
--skip-git-repo-check \
"explain @src/main.ts"
Refactoring with custom model:
codex e -m gpt-5.1-codex -c model_reasoning_effort=high \
--dangerously-bypass-approvals-and-sandbox \
--skip-git-repo-check \
"refactor @src/utils for performance"
Multi-file analysis:
codex e -m gpt-5.2-codex -c model_reasoning_effort=xhigh \
--dangerously-bypass-approvals-and-sandbox \
--skip-git-repo-check \
-C /path/to/project \
"analyze @. and find security issues"
Capability 2: Web Search & Fetch
Online research with web search and page content fetching.
When to Use
- Online research and documentation lookup
- Fetch and summarize specific web pages (GitHub repos, docs, articles)
- Current information retrieval
- API documentation search
- Technology comparison and recommendations
Default Configuration
- Model:
gpt-5.1-codex - Reasoning:
high - Web search: enabled
Command Pattern
codex e -m gpt-5.1-codex -c model_reasoning_effort=high \
--enable web_search_request \
--dangerously-bypass-approvals-and-sandbox \
--skip-git-repo-check \
"<task>"
Parameters
<task>(required): Search query or research task-m <model>: Override model-c model_reasoning_effort=<level>: Override reasoning (low/medium/high/xhigh)--enable web_search_request: Enable web search (required for this capability)
Alternative: Config File
Add to ~/.codex/config.toml:
[features]
web_search_request = true
Examples
Fetch GitHub repo:
codex e -m gpt-5.1-codex -c model_reasoning_effort=high \
--enable web_search_request \
--dangerously-bypass-approvals-and-sandbox \
--skip-git-repo-check \
"Fetch and summarize https://github.com/user/repo"
Documentation search:
codex e -m gpt-5.1-codex -c model_reasoning_effort=high \
--enable web_search_request \
--dangerously-bypass-approvals-and-sandbox \
--skip-git-repo-check \
"find the latest React 19 hooks documentation"
Technology research:
codex e -m gpt-5.1-codex -c model_reasoning_effort=high \
--enable web_search_request \
--dangerously-bypass-approvals-and-sandbox \
--skip-git-repo-check \
"compare Vite vs Webpack for React projects in 2024"
Session Resume
Both capabilities support session resumption for multi-turn conversations.
Resume Command
codex e resume <session_id> "<follow-up task>"
Example
# First session (code generation)
codex e -m gpt-5.2-codex -c model_reasoning_effort=xhigh \
--dangerously-bypass-approvals-and-sandbox \
--skip-git-repo-check \
"add comments to @utils.js"
# Output includes: thread_id in JSON output
# Continue the conversation
codex e resume <session_id> "now add type hints"
Notes
- Requires Codex CLI installed and authenticated
@filesyntax references files relative to working directory@.references entire working directory- JSON output available with
--jsonflag for programmatic use - All commands use
--dangerously-bypass-approvals-and-sandboxfor automation - Use
--skip-git-repo-checkto work in any directory
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
github-wrapped
Generate a verifiable GitHub Wrapped year-in-review as a single-file HTML (raw gh API JSON saved, Python-built dataset embedded), with a Bilibili-style narrative, smooth transitions, and mobile-friendly paged mode. Requires gh CLI to be authenticated.
codex-session-history
Search Codex local session history stored in SQLite and session_index.jsonl. Use this skill when the user wants to list, search, filter, or inspect locally saved Codex sessions by session id, provider, time range, preview text, thread name, or archived status.
tech-impl-doc
Write precise technical implementation docs (developer or user) with clear structure, accurate flows, render-safe Mermaid diagrams, and audience-appropriate detail; avoid boilerplate; include a meaningful Code Index for developer docs.
gemini-image
Generate images using AI when user wants to create pictures, draw, paint, or generate artwork. Supports text-to-image and image-to-image generation.
excalidraw
Generate hand-drawn style diagrams (architecture, flowcharts, system design) as .excalidraw.json files. Use when user wants diagrams, mentions Excalidraw, or needs Mermaid-to-visual conversion.
research
Structured web research with multi-source validation. Output reports with complete citation links. Focus on key results, verify information quality.
Didn't find tool you were looking for?