add-codex
БесплатноБез исполняемых скриптовНе проверенAdd OpenAI/Codex as a backend. Guides through API key setup, service backend configuration, optional CLI setup, and verification. Can run alongside Claude…
от sliamh11★ 50 звёзд на GitHubОб этом скилле
Add OpenAI/Codex Backend
This skill configures OpenAI/Codex as a backend for Deus. Two independent modes:
- Service backend (
DEUS_AGENT_BACKEND=openai) — container agents use the OpenAI Responses API for background message handling - CLI sessions (
deus codex) — foreground interactive sessions using thecodexCLI binary
You can enable one or both. The Claude backend remains the default until explicitly switched.
IMPORTANT: This skill writes environment variables to .env and syncs them to data/env/env at runtime. It does not modify source code or require a rebuild.
Phase 1: Pre-flight
Check if already configured
Check if OpenAI/Codex is already set up:
grep -q 'OPENAI_API_KEY=.' .env 2>/dev/null && echo "API key found" || echo "No API key"
deus backend
If both show valid config, skip to Phase 5 (Verify).
Ask scope
AskUserQuestion: How do you want to use OpenAI/Codex?
- Service backend — container agents use OpenAI for message handling (replaces Claude as default backend)
- CLI only — use
deus codexfor interactive sessions (Claude stays as service backend) - Both — service backend + CLI sessions
Recovery: If you're unsure, start with CLI only (option 2). You can switch the service backend later with
deus backend set codex.
Phase 2: API Key
Check for existing key
grep 'OPENAI_API_KEY' .env 2>/dev/null
If a key is already set and valid, skip to Phase 3.
Collect the API key
AskUserQuestion: Do you have an OpenAI API key? If not, create one at https://platform.openai.com/api-keys — you need a key with API access (not just ChatGPT Plus).
Wait for the user to provide their key.
Write to .env
Append or update OPENAI_API_KEY in .env:
# Update or append OPENAI_API_KEY:
if grep -q '^OPENAI_API_KEY=' .env; then
tmpf=$(mktemp) && sed 's/^OPENAI_API_KEY=.*/OPENAI_API_KEY=<their-key>/' .env > "$tmpf" && mv "$tmpf" .env
else
echo 'OPENAI_API_KEY=<their-key>' >> .env
fi
Sync to container environment
mkdir -p data/env && cp .env data/env/env
The container reads environment from data/env/env, not .env directly.
Recovery: If you see
hasApiCredentials() failedin logs after setup, the key wasn't synced. Re-run thecpcommand above.
Phase 3: Backend Configuration
Skip this phase if the user chose CLI only (option 2) in Phase 1.
Set as default backend
deus backend set codex
This writes agent_backend: openai to ~/.config/deus/config.json and updates .env.
Model selection
AskUserQuestion: Which model do you want to use? Common options:
gpt-4o(default, recommended)gpt-4o-mini(faster, cheaper)o3(reasoning)- Or any model available on your OpenAI account
deus backend model <their-choice>
Parity warnings
Surface these warnings to the user before proceeding:
Backend parity notice: OpenAI/Codex is functional but not yet at full parity with the Claude default. Current gaps:
Feature Claude OpenAI/Codex Tool streaming Live output Batch response (no streaming) Session protocol Claude Code SDK OpenAI Responses API MCP tools Native Bridged via tool-broker Live container verification Yes Not yet Sessions Not portable — a session started on one backend cannot be resumed on the other These gaps are tracked and being closed. The system behavior (routing, tools, container environment) is identical regardless of backend — only the LLM interface differs.
To switch back to Claude at any time:
deus backend set claude
Recovery: If messages stop being handled after switching backends, verify the key is valid and the model is available on your account. Revert with
deus backend set claude.
Phase 4: CLI Setup (Optional)
Skip this phase if the user chose service backend only (option 1) in Phase 1.
The codex CLI binary is entirely separate from the service backend. Users who only want DEUS_AGENT_BACKEND=openai do not need the codex binary installed. The service backend uses the OpenAI Responses API directly.
Check if codex CLI is installed
command -v codex && codex --version || echo "codex CLI not found"
Install if needed
If not installed, tell the user:
The
codexCLI is an OpenAI tool for interactive coding sessions. Install it:npm install -g @openai/codexAfter installation, verify:
codex --version
Configure CLI model (optional)
If the user wants a different model for CLI sessions than the service backend:
# Set CLI-specific model (overrides DEUS_OPENAI_MODEL for deus codex only)
# Update or append DEUS_CODEX_MODEL:
if grep -q '^DEUS_CODEX_MODEL=' .env; then
tmpf=$(mktemp) && sed 's/^DEUS_CODEX_MODEL=.*/DEUS_CODEX_MODEL=<model>/' .env > "$tmpf" && mv "$tmpf" .env
else
echo 'DEUS_CODEX_MODEL=<model>' >
Установить add-codex в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл add-codex?
Add OpenAI/Codex as a backend. Guides through API key setup, service backend configuration, optional CLI setup, and verification. Can run alongside Claude (default) or replace it.
Как установить скилл add-codex?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл add-codex запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic