claude-code-plugin-ref…
Explain plugin, skill, command, agent, and hook mechanics used here. Use when authoring or debugging plugins. Do not use for ops; use night-market-operations.
Delegates tasks to the OpenAI Codex CLI (codex exec) via delegation-core. Use when delegation-core selects Codex or OpenAI credentials are already configured.
$ npx -y skills add athola/claude-night-market --skill codex-delegation --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/codex-delegationContext preview
The summary Claude sees to decide when to auto-load this skill.
Delegates tasks to the OpenAI Codex CLI (codex exec) via delegation-core. Use when delegation-core selects Codex or OpenAI credentials are already configured.
name: codex-delegation description: Delegates tasks to the OpenAI Codex CLI (codex exec) via delegation-core. Use when delegation-core selects Codex or OpenAI credentials are already configured. alwaysApply: false category: delegation-implementation tags: - codex - openai - cli - delegation dependencies: - delegation-core tools: - codex - delegation_executor.py usage_patterns: - codex-cli-integration - headless-ci-execution complexity: intermediate model_hint: standard estimated_tokens: 550 references: - delegation-core/shared-shell-execution.md
OpenAI's Codex CLI ships as npm `@openai/codex` and installs a `codex` binary. Its headless entry point is `codex exec`, which takes the prompt as a positional argument and reuses saved CLI credentials.
model
See the login caveat below
against exposing the key as a job-level environment variable in that case
npm install -g @openai/codex
Homebrew and a curl installer are also documented upstream.
Either persist an API key or log in interactively:
printenv OPENAI_API_KEY | codex login --with-api-key
Verification runs `codex login status`, which reports one of "Logged in using an API key", "Logged in using ChatGPT", "Logged in using Agent Identity", or "Not logged in". The service uses that probe rather than checking a single variable, because either credential path is valid and only the probe sees both.
`CODEX_API_KEY` scopes a credential to a single `codex exec` run.
uv run python scripts/delegation_executor.py codex "Explain this module" \ --files src/
make -C plugins/conjure delegate-codex PROMPT='Explain this module'
codex exec "Explain the retry logic in this package"
`codex` declares the `code_execution` strength and ranks behind gemini, qwen, minimax, glm and muse in the candidate order. It declares no model ids, so `smart_delegate` leaves model selection to the CLI.
| Property | Value | |----------|-------| | Binary | `codex` | | Package | `@openai/codex` | | Headless form | `codex exec <prompt>` | | Prompt delivery | positional, stdin also supported | | Version probe | `codex --version` | | Auth probe | `codex login status` | | Structured output | `codex exec --json` |
Login caveat worth knowing before scripting this: an open issue (openai/codex#9253) reports that `codex login` fails outright on headless hosts, over SSH or in containers, unless a workspace administrator has separately enabled device-code auth. That is a single reporter's account with no maintainer confirmation, but it is the failure mode to check first when `codex exec` will not run unattended. Persisting an API key beforehand avoids it.
logged in"
and no prompt flag before it
A plugin marketplace for Claude Code. Install only the plugins you need to run git workflows, code review, spec-driven development, and autonomous agents from inside your Claude Code session.
Explain plugin, skill, command, agent, and hook mechanics used here. Use when authoring or debugging plugins. Do not use for ops; use night-market-operations.
States load-bearing decisions, invariants, and weak points. Use when judging a design change. Do not use for gating; use night-market-change-control.
Rebuild the dev environment: uv, Python tiers, pins, traps. Use when onboarding or toolchain breaks. Do not use for daily commands; use night-market-operations.
Classify, gate, and review changes. Use when landing a PR, releasing, or amending rules. Do not use for failure triage; use night-market-debugging-playbook.
Search and record project memory (Discussions, journal, ADRs). Use before re-investigating anything. Do not use for settled battles; see failure-archaeology.
Bind loop 'done' to unfakeable gates. Use to harden egregore/herald loops or promote completion_integrity. Not for QA gates; use night-market-validation-and-qa.