Codex 助手
- 作者仓库星标 0
- 作者更新于 实时读取
- 作者仓库 skills-registry
- 领域
- AI 智能
- 兼容 Agent
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- 信任分
- 88 / 100 · 社区维护
- 作者 / 版本 / 许可
- @tomevault-io · 未声明 license
- Token 消耗评级
- 低消耗
- 接入复杂程度
- 需简单配置
- 是否需要外部 API Key
- 不需要
- 兼容的系统
- 未声明(默认跨平台)
- 底层运行要求
- Python
- 文件与系统权限
-
- 只读
- 允许写入 / 修改
- Shell 执行
- 网络行为
- 仅限本地
- 安装命令数
- 26 条
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: codex-cli-bridge
description: Bridge between Claude Code and OpenAI Codex CLI - generates AGENTS.md from CLAUDE.md, provides C…
category: AI 智能
runtime: Python
---
# codex-cli-bridge 输出预览
## PART A: 任务判断
- 适用问题:提示词、Agent 工作流、模型评估或自动化推理。
- 输入要求:目标材料、限制条件、期望输出和验收方式。
- 证据边界:围绕“Purpose / Key Capabilities / 1. CLAUDE.md → AGENTS.md Generation”读取原文规则,不把推断写成作者承诺。
## PART B: 执行结果
- **01** 任务判断:确认你的需求是否属于提示词、Agent 工作流、模型评估或自动化推理,并标出输入、限制和预期结果。
- **02** 执行计划:优先按“Purpose / Key Capabilities / 1. CLAUDE.md → AGENTS.md Generation”拆成步骤,说明每一步会读取什么、修改什么、产出什么。
- **03** 交付结果:给出可复制的命令、文件改动、检查清单或内容草稿,并说明如何继续迭代。
- **04** 风险边界:结合 读取文件、写入/修改文件、执行终端命令、主要在本地完成、通常不需要额外 API Key 给出执行前确认项。
## Running Rules
- 读取文件、写入/修改文件、执行终端命令;主要在本地完成;通常不需要额外 API Key。
- 先小样例验证,再放大到真实任务。
- 交付时同时给结果、检查口径和下一步迭代建议。 原文出现了 `/init`、`/update-claude`、`/check-docs`、`/sync-agents-md`、`/codex-exec` 这类斜杠命令;如果你的 Agent 支持命令触发,优先用命令开场,再补充目标和边界。
告诉 Agent 目标文件或材料、期望结果、不可改范围、是否允许联网或执行命令。本 Skill 的权限画像是:读取文件、写入/修改文件、执行终端命令。
先用一个小任务确认它会围绕“Purpose / Key Capabilities / 1. CLAUDE.md → AGENTS.md Generation”工作;涉及文件或命令时,先看 diff、日志、预览或测试结果。
检查最终产物是否包含明确结果、必要证据和下一步动作;如果输出泛泛而谈,就补充输入、边界和验收标准后重跑。
---
name: codex-cli-bridge
description: Bridge between Claude Code and OpenAI Codex CLI - generates AGENTS.md from CLAUDE.md, provides C…
category: AI 智能
source: tomevault-io/skills-registry
---
# codex-cli-bridge
## 什么时候使用
- 把 AI / Agent方向的常用动作沉淀成 Agent 可调用的技能 适合处理AI Agent、提示词、模型评估与自动化推理,核心价值是把输入、判断、执行、验证和交付边界固定下来,避免 Agent 泛泛回答。 把任务拆成可执行、可检查…
- 面向提示词、Agent 工作流、模型评估或自动化推理,优先处理能明确输入、步骤和验收标准的工作。
## 需要提供什么
- 目标材料、目录范围、期望结果和不可改动内容。
- 是否允许联网、执行命令、读写文件或调用外部服务。
## 执行规则
- 围绕「Purpose / Key Capabilities / 1. CLAUDE.md → AGENTS.md Generation」组织步骤,不把推断写成作者事实。
- 读取文件、写入/修改文件、执行终端命令;主要在本地完成;通常不需要额外 API Key。
- 先跑小样例,确认结果可检查后再扩大任务范围。
## 输出要求
- 给出最终产物、关键证据、验证方式和下一步动作。
- 信息不足时标记 unknown,不编造命令、平台或依赖。 作者原文负责流程事实;仓库文件负责来源和命令;流狐只补充适用场景、限制和质量判断。
skill "codex-cli-bridge" {
输入层 -> 用户目标 + 目标文件 + 禁止范围 + 验收标准
上下文层 -> Purpose / Key Capabilities / 1. CLAUDE.md → AGENTS.md Generation
规则层 -> SKILL.md 触发条件 / 执行顺序 / 输出格式
运行层 -> Python | 读取文件、写入/修改文件、执行终端命令 | 主要在本地完成
安全层 -> 通常不需要额外 API Key + 小任务验证 + diff / 日志复核
输出层 -> 可复制结果 + 检查清单 + 下一步迭代
} Codex CLI Bridge Skill
Purpose
This skill creates a comprehensive bridge between Claude Code and OpenAI's Codex CLI, enabling seamless interoperability through:
- Documentation Translation: Converts CLAUDE.md → AGENTS.md (reference-based, no file duplication)
- Execution Helpers: Python wrappers for Codex CLI commands (always uses
codex exec) - Skill Documentation: Makes Claude Skills accessible to Codex CLI users
Key Capabilities
1. CLAUDE.md → AGENTS.md Generation
- Parses CLAUDE.md and project structure
- Scans
.claude/skills/,.claude/agents/,documentation/folders - Generates comprehensive AGENTS.md with file path references
- Reference-based: No file duplication, only links to existing files
- Documents Skills with most relevant usage method (bash scripts vs prompt references)
2. Safety Mechanism
- Auto-checks Codex CLI installation (
codex --version) - Auto-runs
/initif CLAUDE.md missing (with user notification) - Validates authentication and environment
- User-friendly error messages
3. Codex CLI Execution Helpers
exec_analysis()- Read-only analysis tasks (gpt-5, read-only sandbox)exec_edit()- Code editing tasks (gpt-5-codex, workspace-write)exec_with_search()- Web search-enabled tasksresume_session()- Continue last Codex session- Always uses
codex exec(never plaincodex- critical for Claude Code)
4. Skill Documentation for Codex CLI
- Prompt-only skills: Show how to reference in Codex prompts
- Functional skills: Show how to execute Python scripts directly
- Complex skills: Show both methods
- Includes proper
codex execcommand syntax - Model selection guidance (gpt-5 vs gpt-5-codex)
Input Requirements
For AGENTS.md Generation
{
"action": "generate-agents-md",
"project_root": "/path/to/project",
"options": {
"validate_codex": true,
"auto_init": true,
"include_mcp": true,
"skill_detail_level": "relevant"
}
}
For Codex Execution
{
"action": "codex-exec",
"task_type": "analysis|edit|search",
"prompt": "Your task description",
"model": "gpt-5|gpt-5-codex",
"sandbox": "read-only|workspace-write|danger-full-access"
}
Output Formats
AGENTS.md Structure
# AGENTS.md
## Project Overview
[From CLAUDE.md]
## Available Skills
### Skill Name
**Location**: `path/to/skill/`
**Using from Codex CLI**: [Most relevant method]
## Workflow Patterns
[Slash commands → Codex equivalents]
## MCP Integration
[MCP server references]
## Command Reference
| Claude Code | Codex CLI |
|-------------|-----------|
[Mappings]
Execution Helper Output
{
"status": "success|error",
"output": "Command output",
"session_id": "uuid",
"model_used": "gpt-5|gpt-5-codex",
"command": "codex exec ..."
}
Python Scripts
safety_mechanism.py
- Check Codex CLI installation
- Validate CLAUDE.md exists (auto-run /init if missing)
- Environment validation
- User notifications
claude_parser.py
- Parse CLAUDE.md sections
- Scan skills, agents, commands
- Extract quality gates and MCP configuration
- Return file paths only (no content duplication)
project_analyzer.py
- Auto-detect project structure
- Discover all Claude Code assets
- Generate project metadata
- Build reference map
agents_md_generator.py
- Template-based AGENTS.md generation
- File path references (no duplication)
- Skill documentation (most relevant method)
- Workflow translation (Claude → Codex)
skill_documenter.py
- Document skills for Codex CLI users
- Determine most relevant usage method per skill type
- Generate bash examples for Python scripts
- Create Codex prompt templates
codex_executor.py
- Python wrappers for Codex CLI commands
- Intelligent model selection (gpt-5 vs gpt-5-codex)
- Sandbox mode helpers
- Session management
- Always uses
codex exec
Usage Examples
Example 1: Generate AGENTS.md
User prompt:
Generate AGENTS.md for this project
What happens:
- Safety mechanism checks Codex CLI installed
- Checks CLAUDE.md exists (auto-runs /init if missing)
- Parses CLAUDE.md and project structure
- Generates AGENTS.md with file references
- Documents all skills with most relevant usage method
Output: Complete AGENTS.md file in project root
Example 2: Execute Codex Analysis Task
User prompt:
Use Codex to analyze this codebase for security vulnerabilities
What happens:
from codex_executor import CodexExecutor
executor = CodexExecutor()
result = executor.exec_analysis(
"Analyze this codebase for security vulnerabilities",
model="gpt-5"
)
Executes:
codex exec -m gpt-5 -s read-only \
-c model_reasoning_effort=high \
"Analyze this codebase for security vulnerabilities"
Example 3: Execute Codex Code Editing
User prompt:
Use Codex to refactor main.py for better async patterns
What happens:
executor = CodexExecutor()
result = executor.exec_edit(
"Refactor main.py for better async patterns",
model="gpt-5-codex"
)
Executes:
codex exec -m gpt-5-codex -s workspace-write \
-c model_reasoning_effort=high \
"Refactor main.py for better async patterns"
Example 4: Resume Codex Session
User prompt:
Continue the previous Codex session
What happens:
executor = CodexExecutor()
result = executor.resume_session()
Executes:
codex exec resume --last
Best Practices
For AGENTS.md Generation
- Always run on projects with CLAUDE.md (or let auto-init create it)
- Validate Codex CLI installed first
- Keep skills documented with most relevant method (bash vs prompt)
- Use reference-based approach (no file duplication)
For Codex Execution
- Use
codex execalways (never plaincodexin Claude Code) - Choose correct model:
gpt-5: General reasoning, architecture, analysisgpt-5-codex: Code editing, specialized coding tasks
- Choose correct sandbox:
read-only: Safe analysis (default)workspace-write: File modificationsdanger-full-access: Network access (rarely needed)
- Enable search when needed (
--searchflag)
For Skill Documentation
- Prompt-only skills: Reference in Codex prompts
- Functional skills: Execute Python scripts directly
- Complex skills: Show both methods
- Always provide working examples
Command Integration
This skill integrates with existing Claude Code commands:
/init: Auto-generates AGENTS.md after CLAUDE.md creation/update-claude: Regenerates AGENTS.md when CLAUDE.md changes/check-docs: Validates AGENTS.md exists and is in sync/sync-agents-md: Manual AGENTS.md regeneration/codex-exec <task>: Wrapper using codex_executor.py
Installation
Prerequisites
Codex CLI installed:
codex --version # Should show v0.48.0 or higherCodex authenticated:
codex loginClaude Code v1.0+
Install Skill
Option 1: Copy to project
cp -r generated-skills/codex-cli-bridge ~/.claude/skills/
Option 2: Use from this repository
# Skill auto-discovered when Claude Code loads this project
Troubleshooting
Error: "Codex CLI not found"
Solution: Install Codex CLI and ensure it's in PATH
which codex # Should return path
codex --version # Should work
Error: "CLAUDE.md not found"
Solution: Skill auto-runs /init with notification. If it fails:
# Manually run /init
/init
Error: "stdout is not a terminal"
Solution: Always use codex exec, never plain codex
❌ codex -m gpt-5 "task"
✅ codex exec -m gpt-5 "task"
AGENTS.md Out of Sync
Solution: Regenerate manually
/sync-agents-md
References
- Codex CLI Docs:
openai-codex-cli-instructions.md - Claude Skills Docs:
claude-skills-instructions.md - Example Skills:
claude-skills-examples/codex-cli-skill.md - AGENTS.md Spec: https://agents.md/
Version
v1.0.0 - Initial release (2025-10-30)
License
Apache 2.0
Created by: Claude Code Skills Factory Maintained for: Cross-tool team collaboration (Claude Code ↔ Codex CLI) Sync Status: Reference-based bridge (one-way sync: CLAUDE.md → AGENTS.md)
Source: ComeOnOliver/skillshub — distributed by TomeVault.
先判断是否适合
作者设计意图
作者的方法与取舍
边界和复核