agentleFS
atgreenatgreen/hackinator/skills/consulting-codex/SKILL.md

consulting-codex

Skill1 starsChanged 3 months agoMITView on GitHub

Use when stuck on a tricky problem, second-guessing a design decision, or wanting an independent model to cross-check or try to break your work — "ask codex", "second opinion", "am I missing something", "another set of eyes", "is this right

  • Reads credentials

1 other project uses 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. About 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Core principle: When a problem is genuinely hard, a second, independent model is worth more than another lap of your own reasoning.

    line 10
  2. Very specific:

    Run read-only, high reasoning, under a timeout.

    line 51
  3. Very specific:

    Add --json to codex exec to stream reasoning traces if you want to see how it got there.

    line 76

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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

Consulting Codex

Overview

Core principle: When a problem is genuinely hard, a second, independent model is worth more than another lap of your own reasoning. Codex (OpenAI's CLI) is a peer you can consult — for a fresh answer, an adversarial gut-check, or an outside diff review. Consult it, weigh what it says, and decide for yourself. You are asking a colleague, not obeying an oracle.

This runs both ways: a Codex session stuck on something can consult you the same way, by shelling out to claude -p "<prompt>". The pattern is symmetric; the mechanics below are the Claude→Codex direction.

When to Consult (and When Not To)

Consult when:

  • You're genuinely stuck — the root cause eludes you after an honest attempt, not on first friction.
  • A design decision has real trade-offs and you want an independent voice before committing.
  • You're about to ship something risky and want an adversary to try to break it first.
  • You suspect you're missing something — a second reading catches what your first one rationalized past.

Don't consult when:

  • You can look it up or read the code yourself — that's faster and doesn't burn an external call.
  • It's routine work — consulting on every step is latency and noise, not diligence.
  • You're using it to avoid thinking. Consult after forming your own view, so you can judge the answer.

Codex calls are slow and external — treat each like a heavy job on the host budget: timeboxed, one focused question at a time, not a loop you spam. (See dispatching-subagents for the budget mindset.)

First: Is It Available?

command -v codex || echo "codex CLI not installed"

Auth is via codex login (or $CODEX_API_KEY / $OPENAI_API_KEY). If it's missing or unauthenticated, tell the user how to enable it rather than silently skipping the consult.

Craft the Prompt — Codex Starts Blank

Codex does not see your session. Same discipline as briefing a subagent (see dispatching-subagents): paste the code, the diff, the error, the constraints — everything needed to understand the problem — then ask a sharp question and name the output you want (a verdict, the flaw, a recommendation with reasoning).

The Three Modes

Run read-only, high reasoning, under a timeout. -s read-only keeps Codex from editing your tree.

Consult — get an outside answer

timeout 330 codex exec -s read-only -c 'model_reasoning_effort="high"' \
  "Here is the problem. <paste context: code, error, what you've tried>.
   Question: <the sharp question>. Give your reasoning, then a clear recommendation." < /dev/null

Challenge — adversarial gut-check

timeout 330 codex exec -s read-only -c 'model_reasoning_effort="high"' \
  "Try to BREAK this. <paste the code/design>. Find the strongest failure case,
   the edge that isn't handled, or the assumption that doesn't hold. Be specific." < /dev/null

Review — independent diff review

timeout 330 codex review                 # reviews the current repo diff
timeout 330 codex review "<focus>"       # e.g. "focus on the concurrency in the writer"

Add --json to codex exec to stream reasoning traces if you want to see how it got there. Use -C <dir> to point it at a specific repo root.

After It Answers

  1. Show the user Codex's answer — don't bury or silently absorb it. The outside voice has value as an outside voice.
  2. Judge it against your own understanding. Codex is confidently wrong sometimes. Agreement is evidence; it isn't proof. Where you and Codex disagree, that gap is the interesting part — dig into it.
  3. Decide and say why. "Codex flagged X; I checked and it's real, fixing it" or "Codex suggested Y; I'm not taking it because Z." You own the call.

Common Mistakes

  • Consulting instead of thinking. Form your own view first, or you can't evaluate the reply.
  • Under-briefing. A vague prompt to a blank-slate model gets a vague answer. Paste the real context.
  • Obeying the oracle. Blindly applying Codex's suggestion is how a confident wrong answer becomes your bug.
  • Spamming it. One focused consult beats ten reflexive ones — and respects the runtime/host budget.

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.