agentleFS
legibetlegibet/agent-skills/skills/codex-cli/SKILL.md

codex-cli

Skill0 starsChanged 57 days agoMITView on GitHub

Use Codex CLI as an independent agent for delegated work, code review, or continued discussion in an existing session.

15 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 0 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 14 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use gpt-6.1-sol with high reasoning effort by default:

    line 12
  2. Very specific:

    Use gpt-6.1-sol with high effort for most delegated tasks.

    line 35
  3. Very specific:

    Use codex exec --help, codex exec resume --help, and codex exec review --help for the command surface installed on the machine.

    line 76

“Common” is measured: kept by at least 6 in 10 of the 14 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Codex CLI

Codex runs non-interactively through codex exec. A new run starts a separate Codex session in the selected working directory, streams progress to stderr, and prints its final response to stdout. Redirect stderr to /tmp/codex.err so the turn log stays out of the caller context. A run is done when the process exits; stdout is the reply. If the command fails, read /tmp/codex.err.

Run a task

Use gpt-6.1-sol with high reasoning effort by default:

codex -a never \
  -C <working-directory> \
  -m gpt-6.1-sol \
  -c model_reasoning_effort=high \
  exec --skip-git-repo-check "<request>" \
  </dev/null 2>/tmp/codex.err

-a never is a global flag and therefore appears before exec. It keeps an unattended run from waiting for interactive approval; failed operations return to Codex instead.

--skip-git-repo-check lifts Codex's trusted-directory check; without it an unattended run fails before doing any work.

</dev/null> keeps piped stdin from being appended to the prompt. For a long request, write it to a file and pass - < file in place of the quoted prompt and </dev/null — inline quoting breaks on quotes and newlines.

Model and reasoning

Available models, in ascending capability and cost: gpt-6-luna, gpt-6.1-sol. Set the model explicitly with -m on every run.

Reasoning effort accepts medium, high, xhigh, or max (not low). Higher effort gives the model more room to deliberate and generally increases latency. Set it explicitly with -c model_reasoning_effort=<level>.

Use gpt-6.1-sol with high effort for most delegated tasks. Use gpt-6-luna with xhigh or max for simple but tedious tasks to improve reliability at low cost.

Continue a session

resume --last continues the most recent session in that working directory. A thread ID continues a specific one. The thread id is on the session id: line in /tmp/codex.err. Keep model and effort unless the caller picks different values.

codex -a never \
  -C <working-directory> \
  -m gpt-6.1-sol \
  -c model_reasoning_effort=high \
  exec resume --skip-git-repo-check --last "<follow-up>" \
  </dev/null 2>/tmp/codex.err
codex -a never \
  -C <working-directory> \
  -m gpt-6.1-sol \
  -c model_reasoning_effort=high \
  exec resume --skip-git-repo-check <thread-id> "<follow-up>" \
  </dev/null 2>/tmp/codex.err

Review code

Pass either one scope flag or a prompt. --help lists both; the CLI still rejects that combination (exit 2).

codex -a never \
  -C <working-directory> \
  -m gpt-6.1-sol \
  -c model_reasoning_effort=high \
  exec review --skip-git-repo-check --uncommitted \
  </dev/null 2>/tmp/codex.err

Other shapes: review --base <branch>, review --commit <sha>, review "<instructions>".

Command reference

Use codex exec --help, codex exec resume --help, and codex exec review --help for the command surface installed on the machine.

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.