add-codex

A setup for adding OpenAI and Codex as model backends for Deus. It can configure background message handling, interactive `deus codex` sessions, or both while leaving Claude as the default unless changed.

In plain words
What is it for?
It helps set up the OpenAI API key, configure the service backend, optionally enable the Codex command-line session, and verify the configuration.
Why use it?
It lets users choose OpenAI or Codex for particular kinds of work without requiring source-code changes or removing Claude entirely.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/sliamh11/deus/add-codex
Any agent
npx skills add sliamh11/Deus --skill add-codex
Clone the repo
git clone --depth 1 https://github.com/sliamh11/Deus

Made for: Claude Code, Codex.

Per session 43 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,153 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00043 $0.02153
Opus 5 $0.00022 $0.01077
Sonnet 5 $0.00009 $0.00431
Haiku 4.5 $0.00004 $0.00215

Measured 3d ago against content hash 95dea5f78f67, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

add-codex scanned grade C with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Harvests environment variableshighData exfiltration

Enumerating or grepping the environment for keys collects credentials unrelated to what the mod says it does.

### Collect the API key

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -s -H "Authorization: Bearer $(grep OPENAI_API_KEY .env | cut -d= -f2)" \
.claude/skills/add-codex/SKILL.md · 271 lines

How it starts

The opening of the file, as written. The whole thing — 271 lines — stays where its author put it; the contents beside it link to each section on 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

Read the full file on GitHub · 271 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 271 lines · 43 tokens per session scan C 95dea5f78f67

Subscribe to this mod's changes

add-codex is a skill published in the GitHub repository sliamh11/Deus (51 stars, last pushed 9d ago), licensed MIT. It adds 43 tokens to every session and 2,153 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it C with 2 findings (harvests environment variables, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

memcord

Privacy-first, self-hosted chat memory for OpenClaw — save and recall conversation history across sessions without any cloud dependency.

ukkit/memcord · 28 tokens

mem9

Persistent cloud memory for OpenClaw agents. Use when users say: "install mem9" "setup memory" "add memory plugin" "openclaw memory" "mem9 onboarding" "memory not working" "import memories" "upload sessions".

unvulcanised-watercress762/mem9 · 63 tokens

mem9

Persistent cloud memory for OpenClaw agents. Use when users say: "install mem9" "setup memory" "add memory plugin" "openclaw memory" "mem9 onboarding" "memory not working" "import memories" "upload sessions".

unvulcanised-watercress762/mem9 · 63 tokens

workflow-builder

Design, build, and maintain autonomous OpenClaw workflows (stewards). Use when creating new workflow agents, improving existing ones, evaluating automation opportunities, or debugging workflow reliability. Triggers on "build a workflow", "create a steward", "automate this process", "workflow audit", "what should I…

TechNickAI/openclaw-config · 86 tokens

smart-delegation

Intelligent task delegation — route to think with deep reasoning for hard problems, or Grok for unfiltered takes. Teaches when to escalate, how to pack context into sub-agent spawns, and how to communicate delays transparently. Default: handle directly on chat (thinking off). Escalate only when the quality gain…

TechNickAI/openclaw-config · 80 tokens

claude-code

Route real repo work to Claude Code instead of editing by hand. Triggers on "claude code" or "cc", and on any request to edit, fix, refactor, or open a PR in a repo outside /.openclaw/workspace. Claude Code picks up the repo's CLAUDE.md / AGENTS.md, applies its standards, and knows the /ai-coding-config:multi-review…

TechNickAI/openclaw-config · 105 tokens