微算力 · API 导航与自营网关
API 接入 EN
未登录登录
🧩

Codex CLI Specialist

Codex CLI Specialist · v
Productivity & Workflow 作者 borghei 公开目录收录

简介

Converts Claude Code skills to OpenAI Codex format, validates dual-platform compatibility, and generates registry index manifests.

通过你的 Agent 添加

安装目录:codex-cli-specialist/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。

点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。

或者手动安装

Claude Code~/.claude/skills/codex-cli-specialist/
Codex CLI~/.codex/skills/codex-cli-specialist/
DeepSeek Harness~/.agents/skills/codex-cli-specialist/

包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可; 目录名不用换,也不要把包直接解压到 skills 根目录。 技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。

技能正文


name: codex-cli-specialist description: > Converts Claude Code skills to OpenAI Codex format (agents/openai.yaml), checks dual-platform compatibility and builds a skills index. Use when porting or syncing skills to Codex, checking that a skill loads in both Claude Code and Codex CLI, or setting up Codex CLI for a skill library. license: MIT + Commons Clause metadata: version: 1.1.0 author: borghei category: engineering domain: development-tools updated: 2026-11-08 tags: [openai-codex, cross-platform, skill-conversion, cli]

Codex CLI Specialist

The agent converts Claude Code skills to Codex-compatible format, validates cross-platform compatibility, and builds skill registry manifests. It generates agents/openai.yaml configurations from SKILL.md frontmatter, runs up to 21 compatibility checks across both platforms, and produces skills-index.json for discovery systems.

Core Capabilities

  • Skill conversion — turn a Claude Code SKILL.md into a Codex-compatible skill by generating agents/openai.yaml and copying scripts/references/assets.
  • Cross-platform validation — run up to 21 checks across Claude Code, Codex CLI, and shared categories (frontmatter, openai.yaml, encoding, naming, size).
  • Index building — scan skill directories and emit a skills-index.json manifest for registries, discovery, and version pinning.
  • Codex CLI setup & operation — install, configure API access, and run with the right approval mode (suggest / auto-edit / full-auto).
  • Dual-target authoring — write skills that work on both platforms from one shared scripts/, references/, assets/ tree.
  • Distribution & sync — keep Claude Code and Codex in sync via shared repo, CI/CD conversion, or git hooks; publish via GitHub releases.

When to Use

  • Setting up or operating OpenAI Codex CLI.
  • Converting or syncing skills between Claude Code and Codex.
  • Configuring or reviewing agents/openai.yaml.
  • Validating a skill for dual-platform compatibility.
  • Building a skills-index.json for a skill library.

Clarify First

Before converting or building, settle the inputs below. When one is missing or vague and would change the result, ask about it; when it wouldn't, use a sensible default and say which one you used.

  • Task: convert a skill, validate cross-platform compatibility, or build a skills index (selects codex_skill_converter.py vs cross_platform_validator.py vs skills_index_builder.py).
  • Source path: the SKILL.md or skill directory to operate on (the input the scripts read).
  • Strictness: strict validation mode and whether to fail on warnings (sets --strict and the pass/fail gate).

Ask about the two or three inputs that matter most for this request, not the whole list. If the user wants a result straight away, produce it and state your assumptions at the top.

Quick Start Workflow

Run from this skill folder. The samples in assets/ make every command runnable as written.

# 1. Convert a skill. Without --output-dir it writes agents/openai.yaml into the source skill.
python3 scripts/codex_skill_converter.py assets/sample_skill/SKILL.md --output-dir out

# 2. Validate both sides: Claude frontmatter, openai.yaml structure, encoding, naming, size
python3 scripts/cross_platform_validator.py assets/converted_skill   # exit 0
python3 scripts/cross_platform_validator.py assets/flawed_skill      # exit 1, no openai.yaml

# 3. Build a skills-index.json for a directory of skills
python3 scripts/skills_index_builder.py assets/skills_library --output skills-index.json --format text

Real output of the flawed-skill check (last lines):

Codex CLI Compatibility:
  [FAIL] agents/openai.yaml not found - required for Codex CLI. Fix: python3 scripts/codex_skill_converter.py <skill>/SKILL.md

Overall: NOT COMPATIBLE (1 error(s), 1 warning(s))
Checks: 9/13 passed
FIX 2 issue(s): see the [FAIL]/[WARN] lines above

Tools Overview

Tool Purpose Key flags
codex_skill_converter.py Generate agents/openai.yaml from SKILL.md frontmatter and copy scripts/references/assets --output-dir DIR, --format text|json
cross_platform_validator.py Up to 21 checks (13 without agents/openai.yaml) across Claude Code, Codex and shared rules --strict (warnings fail), --format text|json
skills_index_builder.py Scan skill folders into a skills-index.json manifest --output FILE, --format json|text, --category CAT

--json remains an alias for --format json on the converter and validator. The index builder accepts --format human as an alias for text.

The generated agents/openai.yaml leaves model unset so the skill inherits the user's Codex CLI default; pin a model only when the skill truly needs one, using an id from OpenAI's current list. Codex CLI flags and config file names have changed between releases, so confirm commands from references/codex-cli-guide.md with codex --help on the installed version.

Exit codes

Code Meaning
0 Converted, compatible, or index written
1 Findings: the skill is not compatible (with --strict, warnings count) or the conversion could not write its output
2 Unusable input: path missing, SKILL.md without frontmatter or description (the converter will not invent one), a folder with no SKILL.md, or a directory containing no skills

Text output ends with one verdict line (PASS ..., FIX n issue(s), BLOCKED: <reason>).

Done when: the validator passes on the converted skill, a Codex session picks the skill up and runs one of its scripts, and the Claude Code copy still passes its own lint.

Anti-Patterns

Forking the skill per platform

Mistake: Keeping a Claude copy and a Codex copy of the same skill and editing them separately. Why it happens: Converting once feels simpler than wiring a sync. Instead: Keep one scripts/, references/ and assets/ tree and regenerate agents/openai.yaml from SKILL.md in CI or a hook.

Pinning model ids in skill config

Mistake: Hard-coding a model name in every openai.yaml. Why it happens: Templates often ship with one filled in. Instead: Omit model and inherit the CLI default; pinned ids go stale and break when a model is retired.

Trusting the conversion blindly

Mistake: Shipping the generated openai.yaml without reading it. Why it happens: The converter prints "Conversion complete". Instead: Read the instructions and tool list it extracted, then run the validator and one real Codex invocation.

Files

  • scripts/codex_skill_converter.py, scripts/cross_platform_validator.py, scripts/skills_index_builder.py — the three CLIs above.
  • assets/openai-yaml-template.yaml — annotated agents/openai.yaml template.
  • references/ — workflows, configuration and distribution, Codex CLI guide, cross-platform authoring, best practices.

Reference Documentation

Load the reference that matches the task — keep this file lean and pull detail on demand:

  • references/workflows.md — Quick Start, Tools Overview, the 5 core workflows (install, author, convert, validate, build index), Common Patterns, and deep per-tool parameter/output reference. Read when running a workflow or needing exact tool arguments.
  • references/configuration-and-distribution.md — agents/openai.yaml structure, discovery/locations, invocation patterns, cross-platform patterns, frontmatter compatibility, install/versioning, and sync/CI/CD/GitHub distribution. Read when configuring openai.yaml or distributing a library.
  • references/best-practices-and-troubleshooting.md — best practices (authoring, Codex usage, cross-platform, performance), anti-patterns, troubleshooting table, and success criteria. Read before shipping or when a tool misbehaves.
  • references/codex-cli-guide.md — full Codex CLI reference: installation, configuration, approval modes, skill system, invocation, built-in features, environment variables.
  • references/cross-platform-skills.md — writing skills for multiple agents (Claude Code, Codex, Cursor, Copilot, Goose): platform comparison, universal structure, per-platform config files, template.
  • assets/openai-yaml-template.yaml — annotated Codex config template (instructions, tools, optional model, versioning).

Scope & Limitations

This skill covers:

  • Installing, configuring, and operating OpenAI Codex CLI
  • Converting Claude Code SKILL.md files into Codex-compatible format with agents/openai.yaml
  • Validating skill directories for dual-platform (Claude Code + Codex CLI) compatibility
  • Building skill registry manifests (skills-index.json) for discovery and distribution

This skill does NOT cover:

  • Writing the actual domain logic inside Python tool scripts (see senior-fullstack, code-reviewer, or the relevant domain skill)
  • Cursor, Windsurf, Cline, or Aider platform-specific configuration (see standards/ and root-level dotfiles like .cursorrules, .windsurfrules)
  • OpenAI API key management, billing, or rate-limit troubleshooting (out of scope -- refer to OpenAI documentation)
  • Automated testing or CI/CD pipeline authoring beyond skill validation (see senior-devops and templates/)

See Also

正文来自原始仓库, 版权归作者所有,许可:MIT。 权利人认为有不妥,可申请下架。

原始仓库

作者的项目地址:https://github.com/borghei/Claude-Skills

标签

没有标签

同类 Skill