agentleFS
arielfikruarielfikru/kuli/skills/codex/SKILL.md

codex

Skill0 starsChanged 6 months agoMITView on GitHub

Delegate coding tasks to OpenAI Codex (codex exec) via the ask-codex CLI. Two modes — read-only (code review, "how does X work", second opinions; safe, no writes) and --apply (agentic: edits files + runs commands in a sandbox). Use when you want a strong code-reasoning second opinion, or to hand off a well-scoped coding task. Trigger when the user says "pakai codex", "tanya codex", "/codex", or when a coding subtask is worth offloading. Claude stays the orchestrator and reviews every diff. NOT for non-code prose (use deepseek) or image/video (use gemini).

  • Reads credentials

135 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use ios-sync, compare-screenshots and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • Saqlain-811Skill

    ios-sync

    Regenerate the iOS debug bridge against the latest upstream gstack templates. (gstack)

    Also in 6 projects that use this

  • transitive-bullshitSkill

    compare-screenshots

    Compare screenshots against the intended design, distinguishing approved references from historical baselines. Use for iterative implementation matching, before/after visual review, objective image telemetry, or checking a lone capture for flat, empty, or badly framed content.

    Also in 5 projects that use this

  • dzhngSkill

    implement-spec-with-codex

    Run [implement-spec](../implement-spec/SKILL.md) with Codex doing the implementation passes while you orchestrate, integrate, and review. Use when the user asks to implement a spec with Codex, or to run implement-spec with Codex as the implementer.

    Also in 4 projects that use this

  • Saqlain-811Skill

    ios-clean

    Remove the DebugBridge SPM package and all #if DEBUG wiring from an iOS app. (gstack)

    Also in 5 projects that use this

  • john-data-chenSkill

    touchdesigner-mcp

    Control a running TouchDesigner instance via twozero MCP — create operators, set parameters, wire connections, execute Python, build real-time visuals. 36 native tools.

    Also in 7 projects that use this

  • math-incSkill

    minecraft-modpack-server

    Set up a modded Minecraft server from a CurseForge/Modrinth server pack zip. Covers NeoForge/Forge install, Java version, JVM tuning, firewall, LAN config, backups, and launch scripts.

    Also in 5 projects that use this

  • +1 more from Saqlain-811
  • Other versions135 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 135

    1. NousResearch/hermes-agent★ 262ksame name
    2. garrytan/gstack★ 141ksame name
    3. dzhng/jevgrep★ 3.2ksame name
    4. ispc/ispc★ 3ksame name
    5. bergside/awesome-design-skills★ 2.9ksame name
    6. dataplat/dbatools★ 2.9ksame name
    7. Lilac-Labs/gini-agent★ 1.9ksame name
    8. Open-Curiosity/gini-agent★ 1.9ksame name
    9. dzhng/skills★ 1.5ksame name
    10. clice-io/clice★ 1.4ksame name

    125 more not listed

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository5 other files it gives its agents.

The file

Files
SKILL.md

Codex delegation — the agentic coding intern

Claude = orchestrator/brain. Codex = the coding intern: strong at reading a repo and reasoning about code, and (in --apply mode) at editing files itself. You scope the work, hand it the task, then review its output — and its diff — before keeping anything. Codex is the one intern that can mutate the filesystem, so the review gate matters most here.

Two modes, picked by intent:

ModeFlagSandboxUse for
read-only(default)read-onlycode review, "how does X work", second opinion, audits — no writes
agentic--applyworkspace-writeimplementing a scoped change, refactor, fix — edits files

The intern protocol

  1. Brief — state the task precisely. Unlike deepseek/gemini, codex does read the repo itself — point it with --cd DIR (default cwd). Add context docs with -f FILE (prepended to the prompt) and images with -i.
  2. Assign — default read-only for questions; --apply only when you want edits. Pick model with -m / CODEX_MODEL env.
  3. Review (mandatory gate) — read the answer; for --apply, review the git diff before keeping it. Codex hallucinates and overreaches.
  4. Integrate — use the validated result; say codex produced the draft/diff you reviewed.

Safety rules for --apply (it edits files)

--apply mutates the working tree. Treat it like any irreversible action:

  • Run it in a throwaway git worktree, never the live tree or main branch. e.g. git worktree add ../wt-codex then ask-codex --apply --cd ../wt-codex "...". Inspect the diff, cherry-pick what's good, delete the worktree.
  • Review the diff before merging — never merge codex's work blind. Same rule as a junior dev's PR.
  • Never push or commit codex's changes without the user's OK.
  • The wrapper deliberately does not expose danger-full-access or the approval/sandbox bypass — don't try to route around it.
  • --consistency is rejected with --apply (would run N parallel mutations).

Tool

ask-codex (at ~/.claude/bin/ask-codex). Wraps codex exec. Stdlib Python.

# read-only: ask about the repo (safe, no writes)
ask-codex "what does the auth middleware do, and any races?"
ask-codex -f spec.md "does src/ implement everything in this spec?"
ask-codex --cd apps/api "review the episode upload flow for bugs"

# read-only with self-consistency vote (short verifiable answers)
ask-codex -c 3 "does this repo use optimistic locking anywhere? yes/no on last line"

# AGENTIC: let codex edit files — do this in a throwaway worktree
git worktree add ../wt-codex HEAD
ask-codex --apply --cd ../wt-codex "add input validation to the season router"
# then: review the diff in ../wt-codex, keep what's good, remove the worktree

# raw JSONL event stream (debugging)
ask-codex --json "explain main.ts"

Flags: --apply (agentic write mode; default read-only), --cd/-C DIR (working root), -f FILE (prepend file to prompt), -i IMAGE (repeatable), -m MODEL / env CODEX_MODEL, -c/--consistency N (read-only only; sample N, majority-vote — best for short/factual answers), --timeout SEC (default 600, env CODEX_TIMEOUT; raise for big agentic runs), --json (raw codex JSONL), -q (no stats). Read-only mode runs --ephemeral --skip-git-repo-check so it works anywhere without littering sessions.

Run the harness on a non-OpenAI model (--or-model)

Codex's agentic harness can drive any OpenRouter model instead of native GPT-5.5 — so you get codex's tool-use/sandbox/worktree machinery on a cheap model, with no ChatGPT login (uses OPENROUTER_API_KEY, Responses API).

ask-codex --or-model deepseek/deepseek-v4-pro --apply -C ../wt "implement X"
ask-codex --or-model anthropic/claude-opus-4 "review this repo"   # read-only

This is the engine behind ask-deepseek --agentic and ask-or --agentic. Use it when ChatGPT quota is out or you want a specific/cheaper brain in the harness. Caveats: token-heavy (codex system prompt + tool schema); tool-use reliability varies by model (use a -pro/frontier slug for --apply, not a tiny one).

Batch fan-out (read-only only)

ask-codex-batch fans out many read-only questions in parallel (no --apply — batching file mutations would race on one tree).

printf 'audit auth\naudit db layer\naudit routers\n' | ask-codex-batch --cd apps/api -j 3
ask-codex-batch -d '---' --json < questions.txt > out.json

Batch flags: -C/--cd DIR, -d DELIM, -j N (workers, def 4), -m MODEL, --timeout SEC, --json.

When to delegate to Codex

  • Code review / second opinion on a diff, function, or module
  • "How does X work / where is Y handled" across a real repo (codex reads it)
  • Scoped implementation in a worktree you'll review (--apply)
  • Auditing for a specific bug class (races, injection, missing validation)

When NOT to delegate

  • Non-code prose, summaries, research → DeepSeek (/deepseek), cheaper.
  • Image/video/visual reads → Gemini (/gemini).
  • The final correctness call and the merge decision → Claude, never blind.
  • Anything you'd not let a junior dev merge unreviewed.

Notes

  • Auth: codex login (ChatGPT) or OPENAI_API_KEY. A 401 token_invalidated means re-run codex login.
  • Related: [[reference-deepseek-delegation]] (text intern), the gemini skill (vision intern) — same senior/intern review discipline across all three KULI interns.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.