Claude-for-Codex

Run Claude Code inside Codex with a built-in /claude skill, native realtime runner, and local-first install.

Apache-2.0·JavaScript·ai-coding / claude / claude-code
1
Stars
0
Forks

Media

Last updated
Jun 3, 2026
Original upload
May 31, 2026
Language
JavaScript
License
Apache-2.0
Type
Tool

About this project

Run Claude Code inside Codex with a built-in /claude skill, native realtime runner, and local-first install.

Report
Description

Overview

Claude in Codex runs your local Claude Code installation from inside Codex through a bundled /claude skill and a small portable bridge — nothing hosted, nothing in between.

  • Native local runner when installed — the closest match to Claude's own realtime output.
  • Portable Node bridge as a fallback when no native runner is present.
  • Your existing claude CLI, auth, and environment — reused as-is. Your install, your credits, your machine.

Realtime preview

The default events view surfaces what Claude is doing while it works — the delegated prompt and run settings, session metadata, per-tool progress (thinking, shell, reads, edits, writes, web, MCP), streamed assistant text, and a final summary with duration, turns, cost, and token counts.

ModeWhat you get
events (default)Human-readable realtime stream — closest match to Claude's own output
rawExact NDJSON from claude -p --output-format stream-json
traceStructured debug renderer with explicit [claude-in-codex:…] labels

Installation

Install globally from GitHub via npm

npm install -g github:xt0n1-t3ch/Claude-for-Codex
claude-in-codex-install

Or clone and install

git clone https://github.com/xt0n1-t3ch/Claude-for-Codex.git
cd Claude-for-Codex
node ./scripts/install.mjs

What the installer does

  • Copies the plugin to ~/.codex/plugins/claude-in-codex
  • Updates ~/.agents/plugins/marketplace.json
  • Enables the plugin in ~/.codex/config.toml
  • Builds the native runner to ~/.codex/tools/claude/target/release/claude.exe when Go is available
  • Refreshes the installed bundle at ~/.codex/plugins/cache/…

Restart Codex after install so the registry and plugin surfaces pick up the change.

Requirements

Node.json PATH, >= 18.18.0
claude CLIon PATH, already signed in
Gooptional, used to build the native runner; the Node bridge still works without it
Codexplugins enabled

Usage

Inside Codex, point Claude at the current task in natural language:

Use Claude to implement this feature.
Use Claude for a second-opinion review.
Use Claude to investigate or debug this issue.

Under the hood, the native runner and the portable bridge read the same JSON spec.

macOS / Linux

SPEC="${TMPDIR:-/tmp}/claude-in-codex.spec.json"
cat > "$SPEC" <<'JSON'
{
  "workdir": "/path/to/repo",
  "profile": "design",
  "permissionMode": "acceptEdits",
  "streamVisibility": "events",
  "prompt": "Improve the settings page layout and responsive spacing. Stay inside the frontend slice."
}
JSON

node ./scripts/claude-in-codex.mjs --spec-file "$SPEC"

Windows PowerShell

$spec = Join-Path $env:TEMP 'claude-in-codex.spec.json'
@{
  workdir          = 'D:\YourRepo'
  profile          = 'design'
  permissionMode   = 'acceptEdits'
  streamVisibility = 'events'
  prompt           = 'Improve the settings page layout and responsive spacing. Stay inside the frontend slice.'
} | ConvertTo-Json -Depth 8 | Set-Content -Path $spec

node .\scripts\claude-in-codex.mjs --spec-file $spec

A ready-made sample spec lives at examples/basic.spec.json.

Architecture

Codex delegates the active task to the bundled /claude skill. The plugin prefers a native local runner for richer streaming, and cleanly falls back to the portable Node bridge when no runner is installed. Either path invokes the claude CLI already on your machine, using your install, auth, and model access.

Profiles

Each profile tunes the system prompt, default model, default effort, and tool permissions.

FamilyAliasesDefault modelDefault effort
Designdesign · frontend · ui · ux · polishclaude-opus-4-7medium
Auditui-audit · frontend-audit · ux-auditclaude-opus-4-7medium
Reviewreview · second-opinionclaude-opus-4-7medium
Planningplan · architecture · architectclaude-opus-4-7medium
Debugchallenge · debug · investigationclaude-opus-4-7medium
Exploreexplore · scouthaikumedium
Generalgeneralclaude-opus-4-7medium

Audit, review, plan, and explore are read-only by default — Write, Edit, MultiEdit, and NotebookEdit are disabled unless you explicitly broaden scope.

Validation

npm run build:native
node --test ./scripts/tests/command.test.mjs
node ./scripts/claude-in-codex.mjs doctor

The first command builds the native runner. The second runs the unit tests. The third is a lightweight environment probe that reports your Node version, your claude CLI version, and the native runner path. Exit code 0 means the claude CLI is reachable on your PATH.