skills/codex-sdk/SKILL.md
Architect-level guidance, workflows, and scripts for building agentic coding systems with OpenAI Codex. Use for Codex SDK (@openai/codex-sdk) threads + streaming JSONL events; Codex CLI automation (codex exec, output schema, JSONL, resume); MCP server usage (codex mcp-server) and dynamic tool integration; multi-agent orchestration with OpenAI Agents SDK (handoffs, gating, tracing); durable state, caching, and memory using SQLite; safe-by-default sandbox/approval patterns and execpolicy rules.
npx skillsauth add bjornmelin/dev-skills codex-sdkInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Build reliable, auditable, multi-step coding workflows that scale from a single run to multi-agent orchestration.
For multi-hour work, keep intent durable across compaction/restarts using an ExecPlan:
references/execplans.md.agent/PLANS.md (use scripts/init_agent_workspace.py to bootstrap a repo)assets/templates/execplan.md (or generate a file with scripts/new_execplan.py)codex exec (references/codex-cli-exec.md)@openai/codex-sdk (references/codex-sdk-typescript.md)codex mcp-server and orchestrate via OpenAI Agents SDK (references/mcp-and-agents-sdk.md)references/state-memory-sqlite.md)SQLite is the simplest reliable substrate for:
codex exec --json event as an immutable audit logthreadId so runs can resume deterministicallypython3 scripts/codex_jsonl_to_sqlite.py --db codex-runs.sqlite --initcodex exec --json "<prompt>" | python3 scripts/codex_jsonl_to_sqlite.py --db codex-runs.sqlite --run-label "ci-autofix"python3 scripts/codex_sqlite_report.py --db codex-runs.sqlite --latestUse:
Details: references/mcp-and-agents-sdk.md
Prefer:
sandbox: read-only, approval-policy: neversandbox: workspace-write, approval-policy: on-request / on-failureexecpolicy rules (references/safety-and-execpolicy.md)references/codex-sdk-typescript.md – SDK patterns (threads, streaming, schemas)references/codex-cli-exec.md – CLI patterns (JSONL, schema files, resume)references/mcp-and-agents-sdk.md – Codex as MCP server + multi-agent orchestrationreferences/agents-sdk-consistent-workflows.md – gated handoffs + traces with Codex MCP + Agents SDKreferences/execplans.md – ExecPlans for long-running work across compactionreferences/state-memory-sqlite.md – SQLite schema + memory/caching patternsreferences/safety-and-execpolicy.md – sandboxing, approvals, prompt-injection defensesreferences/codex-config-knobs.md – config keys and feature flags that matterreferences/orchestration-patterns.md – planner/executor/verifier and orchestrator/worker patternsreferences/rag-and-memory.md – SQLite-first shared memory and RAG guidancereferences/context-personalization.md – state + memory notes personalization patterns (Agents SDK)scripts/codex_jsonl_to_sqlite.py – ingest Codex JSONL into SQLitescripts/codex_sqlite_report.py – summarize runs from SQLitescripts/init_agent_workspace.py – create .agent/AGENTS.md + .agent/PLANS.md from templatesscripts/new_execplan.py – generate execplans/execplan-*.md from the ExecPlan templateassets/templates/ – copy/paste templates (ExecPlan, prompts, schemas)assets/templates/agents-sdk/ – Agents SDK starter snippets (MCP stdio, sessions, personalization)development
Pre-PR multi-model review, parallel opus and codex exec adversarial lanes, then adversarial verification of merged findings. Read-only. Use before shipping nontrivial diffs.
tools
Independent gpt-5.6 diff review via the Codex CLI, normal or steerable adversarial with JSON findings. Use before shipping nontrivial changes.
development
Delegate implementation, investigation, or bulk work to gpt-5.6 codex via pinned codex exec. Use for clear-spec builds, migrations, debugging, or any task MODELS.md routes to codex.
development
Adversarial pre-mortem: imagine the plan failed, work backwards to surface risky assumptions + irreversible bets, then harden them. Proactively offer it (after the current request; confirm first) before a hard-to-reverse or one-way-door call (API, schema, framework, a hire), an all-upside plan, or unvalidated assumptions. Also on request.