Claude-skill-registry codex-sdk
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/codex-sdk" ~/.claude/skills/majiayu000-claude-skill-registry-codex-sdk && rm -rf "$T"
manifest:
skills/data/codex-sdk/SKILL.mdsource content
Codex SDK + Codex CLI (master skill)
Build reliable, auditable, multi-step coding workflows that scale from a single run to multi-agent orchestration.
ExecPlans (durable planning)
For multi-hour work, keep intent durable across compaction/restarts using an ExecPlan:
- Contract:
references/execplans.md - Template + rules:
(use.agent/PLANS.md
to bootstrap a repo)scripts/init_agent_workspace.py - ExecPlan skeleton:
(or generate a file withassets/templates/execplan.md
)scripts/new_execplan.py
Workflow decision tree
- Need a scriptable one-shot in CI or cron? → use
(codex exec
)references/codex-cli-exec.md - Need a server-side app controlling Codex programmatically? → use
(@openai/codex-sdk
)references/codex-sdk-typescript.md - Need multi-agent orchestration or dynamic tools? → run
and orchestrate via OpenAI Agents SDK (codex mcp-server
)references/mcp-and-agents-sdk.md - Need durability across runs (memory, caching, resumable state)? → persist run metadata and event logs in SQLite (
)references/state-memory-sqlite.md
Default workflow (safe + production-friendly)
- Inventory inputs (repo root, diffs, failing commands, constraints).
- Choose sandbox + approvals (least privilege; default to read-only).
- Plan in explicit steps (short, verifiable; include stop conditions).
- Use structured outputs (JSON Schema) and validate before acting.
- Record an audit trail (JSONL events → SQLite).
- Verify (re-run tests/lint/format; stop).
Durable state and “memory” (SQLite)
SQLite is the simplest reliable substrate for:
- recording every
event as an immutable audit logcodex exec --json - indexing runs by repo, branch, and purpose
- storing
so runs can resume deterministicallythreadId - caching expensive analysis artifacts (diff summaries, inventories, dependency graphs)
Use the bundled scripts
- Initialize a DB:
python3 scripts/codex_jsonl_to_sqlite.py --db codex-runs.sqlite --init
- Ingest a JSONL run:
codex exec --json "<prompt>" | python3 scripts/codex_jsonl_to_sqlite.py --db codex-runs.sqlite --run-label "ci-autofix"
- Summarize runs:
python3 scripts/codex_sqlite_report.py --db codex-runs.sqlite --latest
Multi-agent orchestration (recommended shape)
Use:
- a single orchestrator responsible for gating and artifact checks
- multiple scoped worker agents with strict deliverables
- structured outputs at boundaries (handoff payloads, review findings, test results)
- traces/telemetry to debug and tune
Details:
references/mcp-and-agents-sdk.md
Safety and policy
Prefer:
- analysis-only:
,sandbox: read-onlyapproval-policy: never - controlled edits:
,sandbox: workspace-write
/approval-policy: on-requeston-failure - block risky commands with
rules (execpolicy
)references/safety-and-execpolicy.md
Resources
references/
– SDK patterns (threads, streaming, schemas)references/codex-sdk-typescript.md
– CLI patterns (JSONL, schema files, resume)references/codex-cli-exec.md
– Codex as MCP server + multi-agent orchestrationreferences/mcp-and-agents-sdk.md
– gated handoffs + traces with Codex MCP + Agents SDKreferences/agents-sdk-consistent-workflows.md
– ExecPlans for long-running work across compactionreferences/execplans.md
– SQLite schema + memory/caching patternsreferences/state-memory-sqlite.md
– sandboxing, approvals, prompt-injection defensesreferences/safety-and-execpolicy.md
– config keys and feature flags that matterreferences/codex-config-knobs.md
– planner/executor/verifier and orchestrator/worker patternsreferences/orchestration-patterns.md
– SQLite-first shared memory and RAG guidancereferences/rag-and-memory.md
– state + memory notes personalization patterns (Agents SDK)references/context-personalization.md
scripts/
– ingest Codex JSONL into SQLitescripts/codex_jsonl_to_sqlite.py
– summarize runs from SQLitescripts/codex_sqlite_report.py
– createscripts/init_agent_workspace.py
+.agent/AGENTS.md
from templates.agent/PLANS.md
– generatescripts/new_execplan.py
from the ExecPlan templateexecplans/execplan-*.md
assets/
– copy/paste templates (ExecPlan, prompts, schemas)assets/templates/
– Agents SDK starter snippets (MCP stdio, sessions, personalization)assets/templates/agents-sdk/