Files
ruflo/v3/@claude-flow/codex
rUvandClaude Opus 4.5 5795367455 Checkpoint: File edits
Automatic checkpoint created by Claude Code
- Branch: feature/codex-integration
- Timestamp: 2026-02-07T17:49:15Z
- Changes: 2 file(s)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-07 17:49:15 +00:00
..
2026-02-07 16:35:55 +00:00
2026-02-07 17:15:48 +00:00
2026-02-07 17:37:33 +00:00
2026-02-07 16:44:32 +00:00
2026-02-07 16:35:55 +00:00
2026-02-07 16:35:55 +00:00
2026-02-07 16:19:34 +00:00
2026-02-07 17:49:15 +00:00
2026-02-07 17:15:48 +00:00
2026-02-07 16:19:40 +00:00
2026-02-07 16:35:07 +00:00

@claude-flow/codex

OpenAI Codex CLI adapter for Claude Flow V3. Enables multi-agent orchestration for OpenAI Codex CLI following the Agentic AI Foundation standard.

Features

  • AGENTS.md Generation - Creates project instructions in Codex format
  • Skill Management - 137+ skills with $skill-name invocation
  • Config Generation - .agents/config.toml for Codex configuration
  • Dual Platform - Supports both Claude Code and Codex simultaneously
  • Migration - Convert CLAUDE.md to AGENTS.md format

Installation

# Via claude-flow CLI (recommended)
npx claude-flow@alpha init --codex

# Or install package directly
npm install @claude-flow/codex

Quick Start

Using the CLI

# Initialize for Codex
npx claude-flow@alpha init --codex

# Full setup with all 137+ skills
npx claude-flow@alpha init --codex --full

# Dual mode (both Claude Code and Codex)
npx claude-flow@alpha init --dual

Programmatic Usage

import { CodexInitializer, initializeCodexProject } from '@claude-flow/codex';

// Quick initialization
const result = await initializeCodexProject('/path/to/project', {
  template: 'full',
  force: true,
  dual: false,
});

// Or use the class directly
const initializer = new CodexInitializer();
const result = await initializer.initialize({
  projectPath: '/path/to/project',
  template: 'enterprise',
  skills: ['swarm-orchestration', 'memory-management'],
  force: false,
  dual: true,
});

Directory Structure

project/
├── AGENTS.md              # Main project instructions (Codex format)
├── .agents/
│   ├── config.toml        # Project configuration
│   ├── skills/            # 137+ skills
│   │   ├── swarm-orchestration/
│   │   │   └── SKILL.md
│   │   ├── memory-management/
│   │   │   └── SKILL.md
│   │   └── ...
│   └── README.md          # Directory documentation
├── .codex/
│   ├── config.toml        # Local overrides (gitignored)
│   └── AGENTS.override.md # Local instruction overrides
└── .claude-flow/
    ├── config.yaml        # Runtime configuration
    ├── data/              # Memory and cache
    └── logs/              # Log files

Templates

Template Skills Description
minimal 2 Core skills only
default 4 Standard setup
full 137+ All available skills
enterprise 137+ Full + governance

Platform Comparison

Feature Claude Code OpenAI Codex
Config File CLAUDE.md AGENTS.md
Skills Dir .claude/skills/ .agents/skills/
Skill Syntax /skill-name $skill-name
Settings settings.json config.toml
Approval 3 levels 4 levels

Skill Invocation

In OpenAI Codex CLI, invoke skills with $ prefix:

$swarm-orchestration
$memory-management
$sparc-methodology
$security-audit
$agent-coder
$agent-tester

Configuration

.agents/config.toml

# Model configuration
model = "gpt-4"

# Approval policy
approval_policy = "on-request"

# Sandbox mode
sandbox_mode = "workspace-write"

# Skills
[[skills]]
path = ".agents/skills/swarm-orchestration"
enabled = true

[[skills]]
path = ".agents/skills/memory-management"
enabled = true

.codex/config.toml (Local)

# Local development overrides (gitignored)
approval_policy = "never"
sandbox_mode = "danger-full-access"
web_search = "live"

API Reference

CodexInitializer

class CodexInitializer {
  async initialize(options: CodexInitOptions): Promise<CodexInitResult>;
  async dryRun(options: CodexInitOptions): Promise<string[]>;
}

initializeCodexProject

async function initializeCodexProject(
  projectPath: string,
  options?: Partial<CodexInitOptions>
): Promise<CodexInitResult>;

Types

interface CodexInitOptions {
  projectPath: string;
  template?: 'minimal' | 'default' | 'full' | 'enterprise';
  skills?: string[];
  force?: boolean;
  dual?: boolean;
}

interface CodexInitResult {
  success: boolean;
  filesCreated: string[];
  skillsGenerated: string[];
  warnings?: string[];
  errors?: string[];
}

Migration

Convert an existing CLAUDE.md project to Codex format:

import { migrate } from '@claude-flow/codex';

const result = await migrate({
  sourcePath: './CLAUDE.md',
  targetPath: './AGENTS.md',
  preserveComments: true,
  generateSkills: true,
});

License

MIT

Support