consult-gpt

consult-gpt is a command for Claude Code from askwigconsulting/cohort. It costs 38 tokens per session (1,559 once invoked), scanned C, original, MIT.

A command that asks ChatGPT, through the OpenAI Codex command-line tool, for an independent opinion on a difficult problem. It is read-only and advisory, so a human still decides what to do.

In plain words
What is it for?
Use it to cross-check a hard technical decision or diagnosis, especially when an independent review could reveal a missed issue.
Why use it?
It provides a second perspective on design choices, bugs, or plans without executing the advice blindly. It also checks whether the command-line tool is available before using it.

Command for Claude Code

Written for Claude Code: a Claude Code command (commands/*.md). Also seen: reads ~/.codex paths; runs codex exec; mentions Codex.

Good fit Use it to cross-check a hard technical decision or diagnosis, especially when an independent review could reveal a missed issue.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/askwigconsulting/cohort/consult-gpt
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/askwigconsulting/cohort

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for consult-gpt

README.md
[![agentmods](https://agentmods.dev/badge/commands/askwigconsulting/cohort/consult-gpt/github.svg)](https://agentmods.dev/commands/askwigconsulting/cohort/consult-gpt)
Your own site
<a href="https://agentmods.dev/commands/askwigconsulting/cohort/consult-gpt"><img src="https://agentmods.dev/badge/commands/askwigconsulting/cohort/consult-gpt/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for consult-gpt

Your own site · 80×15
<a href="https://agentmods.dev/commands/askwigconsulting/cohort/consult-gpt"><img src="https://agentmods.dev/badge/commands/askwigconsulting/cohort/consult-gpt.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 38 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,559 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00038 $0.01559
Opus 5.5 $0.00015 $0.00624
Sonnet 5.5 $0.00008 $0.00312
Haiku 4.5 $0.00004 $0.00156

Measured 2mo ago against content hash 6ff39457bb7f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

consult-gpt scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Harvests environment variableshighData exfiltration

Enumerating or grepping the environment for keys collects credentials unrelated to what the mod says it does.

with `printenv OPENAI_API_KEY | codex login --with-api-key`, or export it and the
canonical/commands/consult-gpt.md · 125 lines

How it starts

The opening of the file, as written. The whole thing — 125 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Bring a second model into the room. /consult-gpt asks ChatGPT (through the OpenAI Codex CLI running in a read-only sandbox) for an independent opinion on a hard problem — a design choice, a tricky bug, a plan worth cross-examining. ChatGPT joins the office on the office's terms: advisory only. It recommends; Claude weighs; the human decides.

The consult is a Cohort command, not a raw CLI call: you run cohort engine consult gpt --prompt-file <f> and never codex exec yourself. The command is where the controls live — the per-repo egress marker, the secret scan and the size cap run in code on the assembled prompt before codex starts, and the sandbox pin, the closed stdin and the timeout are set by the code, not remembered by you.

1. Preflight — degrade gracefully

The command checks for the CLI itself; check auth once per session:

codex login status

Two auth paths, both honoured by the command:

  • codex login — the interactive ChatGPT sign-in, saved under ~/.codex. The default for a person at a terminal.
  • OPENAI_API_KEY — for unattended runs (CI, /crew, /ratchet): store it once with printenv OPENAI_API_KEY | codex login --with-api-key, or export it and the command passes it (and CODEX_HOME) through to codex. Prefer the key for anything unattended: a saved browser sign-in can expire mid-loop; a key does not.

If the CLI is missing or not signed in, the command exits 2 with the recovery steps (npm install -g --prefix ~/.local @openai/codex, then one of the auth paths above) — do not fail hard: say the consult is unavailable, repeat those steps, answer from your own analysis, and clearly label the answer as single-model.

Setup missing and model unavailable are different failures. If the CLI is set up but the flagship model itself is unavailable — usage limits reached, model errors that survive one retry — do not silently proceed and do not downgrade to a cheaper GPT. Ask the user how to proceed: wait and retry when the model is available again, or have Fable handle it single-model (labeled as such). The user picks; on "wait", agree a concrete retry point rather than blocking indefinitely.

Read the full file on GitHub · 125 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago Changed · +31 lines scan A → C 6ff39457bb7f
  2. 3mo ago First seen · 94 lines · 38 tokens per session scan A 21f618556605

Subscribe to this mod's changes

consult-gpt is a command published in the GitHub repository askwigconsulting/cohort (2 stars, last pushed 1mo ago), licensed MIT. It adds 38 tokens to every session and 1,559 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it C with 1 finding (harvests environment variables). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

consult-gpt compared with commands from other repositories

consult-gpt next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
consult-gptaskwigconsulting/cohortCommand21mo agoMITC38Claude Code
checklistgithub/spec-kitCommand154ktodayMITA13Claude Code
clarifygithub/spec-kitCommand154ktodayMITA27Claude Code
specifygithub/spec-kitCommand154ktodayMITA13Claude Code
analyzegithub/spec-kitCommand154ktodayMITA26Claude Code
convergegithub/spec-kitCommand154ktodayMITA35Claude Code
implementgithub/spec-kitCommand154ktodayMITA14Claude Code