Skip to content

Dianel555/DSkills / skills/codex-cc

codex-cc

Unverified

Delegates coding tasks from Codex to local Claude Code in print mode while preserving Claude's normal runtime customizations by default. Use when: (1) You want Codex to call Claude Code locally, (2) You need Claude-side skills, plugins, MCP servers, custom commands, CLAUDE.md rules, or workspace settings to stay active, (3) You want resumable Claude sessions from Codex via SESSION_ID, (4) You need thin `claude mcp` / `claude plugin` passthrough from the same bridge.

FileKindSize
README.mdmarkdown4.0 KB
SKILL.mdskill md3.6 KB
ruff.tomlconfig656 B
scripts/claude_bridge.pyscript21.0 KB
tests/test_claude_bridge.pyscript24.7 KB
# codex-cc

A Codex-facing DSkills bridge that shells out to local Claude Code and returns a stable JSON envelope.

## Overview

`codex-cc` is for the inverse direction of `cc-codex`: Codex calls Claude Code locally.

By default the bridge preserves Claude Code's normal runtime behavior. It does not force `--safe-mode`, `--bare`, `--disable-slash-commands`, or `--strict-mcp-config`, so trusted-workspace customizations such as `CLAUDE.md`, skills, plugins, MCP servers, custom commands, and rules continue to load the same way Claude normally would.

Two runtime caveats still come from Claude Code itself:

- `claude -p` skips the interactive trust dialog, so only use this in directories you already trust.
- Invalid settings files may be silently ignored in print mode, so if inheritance seems missing, validate the workspace `.claude` configuration first.

## Installation

Copy this skill to your Codex skills directory:

```bash
cp -r skills/codex-cc ~/.codex/skills/
```

The bridge expects a working local Claude Code installation available as `claude` on `PATH`.

## Usage

### Basic

```bash
python scripts/claude_bridge.py --cd "/path/to/project" --PROMPT "Analyze the auth flow"
```

### Resume a Claude session

```bash
# Initial turn
python scripts/claude_bridge.py --cd "/project" --PROMPT "Review the failing tests"

# Follow-up turn using the returned SESSION_ID
python scripts/claude_bridge.py --cd "/project" --SESSION_ID "uuid-from-response" --PROMPT "Now write the minimal fix"
```

### Permission overrides are explicit

```bash
python scripts/claude_bridge.py --cd "/project" --PROMPT "Run the test suite" --permission-mode plan
python scripts/claude_bridge.py --cd "/project" --PROMPT "Run unattended in sandbox" --dangerously-skip-permissions
```

### Claude management passthrough

```bash
python scripts/claude_bridge.py mcp list
python scripts/claude_bridge.py plugin list
python scripts/claude_bridge.py plugin marketplace list
```

## Parameters

| Parameter | Required | Description |
|-----------|----------|-------------|
| `--PROMPT` | Yes* | Task instruction for Claude Code |
| `--cd` | Yes* | Workspace root used for both process `cwd` and `--add-dir` |
| `--SESSION_ID` | No | Resume an existing Claude conversation |
| `--model` | No | Claude model override. Aliases (e.g. `haiku`, `sonnet`) are resolved by Claude Code against the active endpoint, so a custom `ANTHROPIC_BASE_URL` may map them to a differently-named backend model |
| `--permission-mode` | No | Claude permission mode override |
| `--dangerously-skip-permissions` | No | Opt-in permission bypass |
| `--timeout` | No | Bridge-level timeout in seconds; omit it to wait without a bridge deadline |
| `--stream-file` | No | Raw Claude `stream-json` JSONL destination; omit it to create a temporary file |
| `--return-all-messages` | No | Include all parsed stream records in the returned envelope |

`*` Not required for `mcp` / `plugin` passthrough invocations.

## Output Format

Successful task execution:

```json
{
  "success": true,
  "SESSION_ID": "uuid",
  "agent_messages": "Claude response text",
  "stream_file": "/tmp/claude_stream_....jsonl",
  "stderr": "optional diagnostic text"
}
```

The bridge reads Claude's streaming output incrementally and treats the final
`result` record as the authoritative completion message. Intermediate
`assistant` records remain available in `stream_file` and, when
`--return-all-messages` is set, in `all_messages`.

When the bridge deadline fires, the error also reports the last transport-level
retry it observed (for example `claude timed out after 300.0s (last transport
error: HTTP 502 server_error, attempt 1/10)`), so an upstream or proxy outage is
distinguishable from a genuinely slow task.

Failed task execution:

```json
{
  "success": false,
  "SESSION_ID": "uuid-if-claude-was-launched",
  "error": "Failure reason",
  "stream_file": "/tmp/claude_stream_....jsonl",
  "stderr": "optional diagnostic text"
}
```

Passthrough output:

```json
{
  "success": true,
  "output": "...",
  "error": "",
  "returncode": 0
}
```
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall