Skill metadata
Reference: full SKILL.md
The following is the complete skill definition that Mibyan loads when this skill is triggered. This is what the agent sees as instructions when the skill is active.
Codex CLI
Delegate coding tasks to Codex via the Mibyan terminal. Codex is OpenAI’s autonomous coding agent CLI.When to use
- Building features
- Refactoring
- PR reviews
- Batch issue fixing
Prerequisites
- Codex installed:
npm install -g @openai/codex - OpenAI auth configured: either
OPENAI_API_KEYor Codex OAuth credentials from the Codex CLI login flow - Must run inside a git repository — Codex refuses to run outside one
- Use
pty=truein terminal calls — Codex is an interactive terminal app
model.provider: openai-codex uses Mibyan-managed Codex
OAuth from ~/.mibyan/auth.json after mibyan auth add openai-codex. For the
standalone Codex CLI, a valid CLI OAuth session may live under
~/.codex/auth.json; do not treat a missing OPENAI_API_KEY alone as proof
that Codex auth is missing.
One-Shot Tasks
Background Mode (Long Tasks)
Key Flags
Deprecated:--full-autostill works but the live CLI warns to use--sandbox workspace-writeinstead.
Mibyan Gateway Caveat
When invoking the Codex CLI from a Mibyan gateway/service context (for example, Telegram-driven agent sessions), Codexworkspace-write sandboxing may fail even
when the same command works in the user’s interactive shell. A typical symptom is
bubblewrap/user-namespace errors such as setting up uid map: Permission denied
or loopback: Failed RTM_NEWADDR: Operation not permitted.
In that context, prefer:
workdir, clean git
status before launch, narrow task prompts, git diff review, targeted tests, and
human/agent confirmation before committing broad changes.
PR Reviews
Clone to a temp directory for safe review:Parallel Issue Fixing with Worktrees
Batch PR Reviews
Rules
- Always use
pty=true— Codex is an interactive terminal app and hangs without a PTY - Git repo required — Codex won’t run outside a git directory. Use
mktemp -d && git initfor scratch - Use
execfor one-shots —codex exec "prompt"runs and exits cleanly --sandbox workspace-writefor building — auto-approves changes within the sandbox (--full-autois deprecated for this)- Background for long tasks — use
background=trueand monitor withprocesstool - Don’t interfere — monitor with
poll/log, be patient with long-running tasks - Parallel is fine — run multiple Codex processes at once for batch work

