Codex
by @ivangdavila
Use Codex safely for repo-aware coding with explicit approvals, sandbox choices, MCP boundaries, and PR-ready verification workflows.
clawhub install codexπ About This Skill
name: Codex slug: codex version: 1.0.0 homepage: https://clawic.com/skills/codex description: Use Codex safely for repo-aware coding with explicit approvals, sandbox choices, MCP boundaries, and PR-ready verification workflows. changelog: Initial release with repo-safe execution, approval and sandbox guidance, MCP and cloud guardrails, and review-ready handoff workflows. metadata: {"clawdbot":{"emoji":"π§","requires":{"bins":["codex"],"bins.optional":["git","rg"],"env.optional":["OPENAI_API_KEY"],"config":["~/codex/","~/.codex/config.toml"]},"os":["linux","darwin","win32"],"configPaths":["~/codex/","~/.codex/config.toml"]}}
When to Use
User wants to use Codex as a real coding agent instead of a generic chat assistant: inspect a repo, make bounded edits, run review mode, resume work, use MCP safely, or hand work off with clear verification evidence.
Use this skill when the hard part is not "write code" but "make Codex behave safely and predictably" across CLI, exec, review, resume, MCP, app-server, cloud tasks, or local OSS-provider workflows.
Architecture
Memory lives in ~/codex/. If ~/codex/ does not exist, run setup.md. See memory-template.md for structure.
~/codex/
|-- memory.md # Durable activation boundaries and operating defaults
|-- repo-profiles.md # Per-repo conventions, test surface, and blast-radius notes
|-- safety.md # Sandbox, approval, and trust defaults
|-- mcp-notes.md # Approved MCP servers, scopes, and rejection reasons
-- incidents.md # Stuck sessions, failed commands, and recovery patterns
Quick Reference
Load only the smallest file needed for the current blocker.
| Topic | File |
|-------|------|
| Setup guide | setup.md |
| Memory template | memory-template.md |
| Install, login, and first-run checks | install-and-auth.md |
| Repo execution and codex exec workflows | repo-execution.md |
| Approval modes and sandbox choices | approvals-and-sandbox.md |
| MCP, app-server, cloud, and local-provider guardrails | mcp-and-cloud.md |
| Review mode and handoff patterns | review-and-handoffs.md |
| Recovery playbooks for auth, stuck sessions, and wrong-scope work | troubleshooting.md |
Requirements
binary installed and working on the target machine. or an explicit OPENAI_API_KEY flow when that mode is chosen. available when the task involves repository inspection, diff review, or commit-ready workflows., subcommand help, or official docs instead of hardcoding stale assumptions.Operating Coverage
This skill treats Codex as an operational coding surface, not as generic AI advice. It covers:
and codex review workflows, fork, and handoff-friendly session recovery and --local-provider when the user intentionally wants local executionData Storage
Keep only durable Codex operating context in ~/codex/:
exec, review, cloud, or local OSS provider
Core Rules
1. Preflight the Task Before Codex Acts
2. Choose the Operating Mode Explicitly
for bounded non-interactive execution, and codex review for review-first tasks. or fork over re-describing the entire context from scratch.3. Match Sandbox and Approval to Blast Radius
4. Read the Repo Before Editing It
5. Keep Changes Reviewable and Scoped
6. Treat Auth, MCP, and Cloud as Trust Boundaries
7. Verify Outcomes and Leave a Handoff Trail
Codex Traps
as harmless -> it still writes real files and can widen a diff quickly. for routine work -> convenience becomes unreviewable risk.External Endpoints
Only these external categories are allowed unless the user explicitly approves more:
| Endpoint | Data Sent | Purpose | |----------|-----------|---------| | https://api.openai.com | prompts, selected repository context, tool results, and execution metadata needed for Codex runs | Codex model execution, cloud tasks, login-linked agent work | | https://developers.openai.com/* | doc queries only | Verify current Codex product behavior and configuration details | | https://{user-approved-mcp-host} | request payloads required by the specific MCP server | Optional user-approved tool access beyond the local machine |
No other data is sent externally unless the user explicitly approves additional MCP servers, Git remotes, or service endpoints.
Security & Privacy
Data that leaves your machine:
Data that stays local:
and the user's local Codex session/config stateThis skill does NOT:
flows have identical riskTrust
By using this skill, Codex work may send prompts and selected repository context to OpenAI, plus any optional user-approved MCP endpoints. Only install if you trust those services with that data.
Scope
This skill ONLY:
This skill NEVER:
Related Skills
Install with clawhub install if user confirms:
agentic-engineering - Strengthen the human workflow around parallel coding agents and blast-radius thinking.
coding - Improve implementation quality once Codex is operating inside the right repo boundaries.
git - Handle branches, diffs, and non-destructive repository recovery safely.
api - Reuse structured API and request-debugging patterns when Codex integrates with services.
workflow - Turn recurring Codex tasks into repeatable, reviewable execution paths.Feedback
If useful: clawhub star codex
Stay updated: clawhub sync`