Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

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от 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 the codex CLI 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?

  1. Service backend — container agents use OpenAI for message handling (replaces Claude as default backend)
  2. CLI only — use deus codex for interactive sessions (Claude stays as service backend)
  3. 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() failed in logs after setup, the key wasn't synced. Re-run the cp command 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 codex CLI is an OpenAI tool for interactive coding sessions. Install it:

npm install -g @openai/codex

After 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>' >
Полный SKILL.md на GitHub

Установить 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), без исполняемых скриптов.

Похожие скиллы

Сравнить add-codex с