by Nunezchef
Agent Zero skill that routes coding tasks through Codex CLI in the terminal
# Add to your Claude Code skills
git clone https://github.com/Nunezchef/codex-coding-skillFor coding work, Codex CLI is the primary execution engine.
When the user asks for any coding task, do not treat it as a normal prose-only task first. Use code_execution_tool to drive codex in the terminal, keep the interaction going until Codex finishes or blocks, then report the result.
Use this skill for all coding tasks, including:
Do not use this skill for non-coding conversation, pure brainstorming, translation, or simple factual questions that do not require code changes or code inspection.
For coding tasks:
code_execution_tool to run codex.Do not start writing the code directly outside Codex unless:
Before invoking Codex, collect the minimum context needed to avoid a weak prompt:
If the task references an existing codebase, inspect the repository enough to give Codex concrete instructions.
Make Agent Zero use Codex CLI as a real terminal-first coding engine.
This repository packages a focused SKILL.md that teaches Agent Zero to route coding work through Codex in the terminal, keep the session interactive, and verify results instead of relying on a weak one-shot prompt.
This skill is especially useful if you run Agent Zero locally.
On smaller or resource-constrained machines, using a large local model for every coding task can get slow quickly. A more practical pattern is to let Agent Zero stay in the orchestrator role while Codex CLI handles the heavier coding work in the terminal.
That keeps the workflow more usable on local hardware:
code_execution_tool to run codexNo comments yet. Be the first to share your thoughts!
Your prompt to Codex should include:
Good prompts are specific and operational.
Example:
In /a0/usr/workdir, add a FastAPI endpoint at /health in the existing app.
Modify the current files instead of creating a new server.
Keep the existing style and dependencies.
After editing, run the relevant tests or a quick import check.
Summarize the files changed and any follow-up issues.
code_execution_toolUse code_execution_tool with a terminal command like:
{
"tool_name": "code_execution_tool",
"tool_args": {
"runtime": "terminal",
"code": "cd /a0/usr/workdir && codex \"In this repository, ...\""
}
}
Always prefer:
cd into the target repo firstAfter starting Codex, do not assume one command is enough.
Read the terminal output and continue the workflow:
Treat Codex as an interactive coding session, not a single fire-and-forget command.
When Codex prompts in the terminal, answer the prompt directly and keep the session moving.
Common interactive cases:
Respond with concise, operational answers.
Examples:
Yes, proceed with the edits.
Limit the changes to src/api and tests/api only.
Do not add dependencies. Reuse the existing libraries already in the repo.
Run the targeted test file only, not the full suite.
If Codex asks a question that changes scope, safety, or requirements, pause and ask the user instead of guessing.
If Codex gets stuck in a broad or vague prompt loop, stop the current pass and re-run Codex with a narrower, clearer prompt.
After Codex changes code:
Do not report success just because Codex printed a plausible message.
In [REPO_PATH], implement the following feature:
[EXACT FEATURE]
Constraints:
- [CONSTRAINT 1]
- [CONSTRAINT 2]
Use the existing code patterns in this repository.
Modify existing files where appropriate.
Run relevant verification after the change.
Return a concise summary of changed files and any remaining issues.
In [REPO_PATH], debug and fix this problem:
[ERROR OR FAILURE]
Focus on the root cause, not a workaround.
Inspect the relevant code and make the minimum necessary fix.
Run the most relevant verification command after fixing it.
Summarize the root cause, the fix, and the verification result.
In [REPO_PATH], refactor [TARGET AREA].
Preserve behavior.
Reduce complexity or duplication without changing external behavior.
Avoid unrelated edits.
Run relevant checks after the refactor.
Summarize what changed and any risks to review.
In [REPO_PATH], review [FILES OR CHANGE AREA].
Focus on bugs, regressions, security risks, missing tests, and maintainability issues.
Do not rewrite the code unless explicitly asked.
Return concrete findings with file references when possible.
If Codex does not complete the task:
If Codex is unavailable or repeatedly fails:
This skill is intended for Agent Zero users who have:
code_execution_toolIf you are not using Agent Zero, you can still adapt the skill, but the examples and tool names in this repository are written for Agent Zero specifically.
SKILL.md — the skill itselfREADME.md — usage and installation guideLICENSE — MIT licenseCopy this repository's SKILL.md into your Agent Zero user skills directory.
Example:
mkdir -p /a0/usr/skills/codex-coding
cp SKILL.md /a0/usr/skills/codex-coding/SKILL.md
If your Agent Zero environment uses a different skills path, copy it into the equivalent user skill directory for that installation.
Activate the skill when the user asks for any coding task:
The skill teaches the agent to:
codex through code_execution_tool#...