converter

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

/converter -- Cross-Platform Skill Converter

/converter -- 跨平台Skill转换器

Parse AgentOps skills into a universal SkillBundle format, then convert to target agent platforms.
将AgentOps skills解析为通用的SkillBundle格式,然后转换为目标Agent平台格式。

Quick Start

快速开始

bash
/converter skills/council codex     # Convert council skill to Codex format
/converter skills/vibe cursor       # Convert vibe skill to Cursor format
/converter --all codex              # Convert all skills to Codex
bash
/converter skills/council codex     # 将council skill转换为Codex格式
/converter skills/vibe cursor       # 将vibe skill转换为Cursor格式
/converter --all codex              # 将所有skills转换为Codex格式

Pipeline

处理流程

The converter runs a three-stage pipeline:
parse --> convert --> write
转换器运行一个三阶段流程:
解析 --> 转换 --> 写入

Stage 1: Parse

阶段1:解析

Read the source skill directory and produce a SkillBundle:
  • Extract YAML frontmatter from SKILL.md (between
    ---
    markers)
  • Collect the markdown body (everything after the closing
    ---
    )
  • Enumerate all files in
    references/
    and
    scripts/
  • Assemble into a SkillBundle (see
    references/skill-bundle-schema.md
    )
读取源skill目录并生成SkillBundle:
  • 从SKILL.md中提取YAML前置内容(位于
    ---
    标记之间)
  • 收集Markdown正文(所有在闭合
    ---
    之后的内容)
  • 枚举
    references/
    scripts/
    中的所有文件
  • 组装为SkillBundle(详见
    references/skill-bundle-schema.md

Stage 2: Convert

阶段2:转换

Transform the SkillBundle into the target platform's format:
TargetOutput FormatStatus
codex
Codex SKILL.md + prompt.mdImplemented
cursor
Cursor .mdc rule + optional mcp.jsonImplemented
The Codex adapter produces a
SKILL.md
(body + inlined references + scripts as code blocks) and a
prompt.md
(Codex prompt referencing the skill). Descriptions are truncated to 1024 chars at a word boundary if needed.
The Cursor adapter produces a
<name>.mdc
rule file with YAML frontmatter (
description
,
globs
,
alwaysApply: false
) and body content. References are inlined into the body, scripts are included as code blocks. Output is budget-fitted to 100KB max -- references are omitted largest-first if the total exceeds the limit. If the skill references MCP servers, a
mcp.json
stub is also generated.
将SkillBundle转换为目标平台的格式:
目标平台输出格式状态
codex
Codex SKILL.md + prompt.md已实现
cursor
Cursor .mdc规则 + 可选mcp.json已实现
Codex适配器会生成一个
SKILL.md
(正文+内联引用+作为代码块的脚本)和一个
prompt.md
(引用该skill的Codex提示词)。如果需要,描述会在单词边界处截断至1024字符。
Cursor适配器会生成一个带YAML前置内容(
description
globs
alwaysApply: false
)的
<name>.mdc
规则文件以及正文内容。引用会内联到正文中,脚本作为代码块包含在内。输出会适配100KB的上限——如果总大小超过限制,会从最大的引用开始省略。如果skill引用了MCP服务器,还会生成一个
mcp.json
存根文件。

Stage 3: Write

阶段3:写入

Write the converted output to disk.
  • Default output directory:
    .agents/converter/<target>/<skill-name>/
  • Write semantics: Clean-write. The target directory is deleted before writing. No merge with existing content.
将转换后的输出写入磁盘。
  • 默认输出目录:
    .agents/converter/<target>/<skill-name>/
  • 写入规则: 清理写入。写入前会删除目标目录,不会与现有内容合并。

CLI Usage

CLI使用方法

bash
undefined
bash
undefined

Convert a single skill

转换单个skill

bash skills/converter/scripts/convert.sh <skill-dir> <target> [output-dir]
bash skills/converter/scripts/convert.sh <skill-dir> <target> [output-dir]

Convert all skills

转换所有skills

bash skills/converter/scripts/convert.sh --all <target> [output-dir]
undefined
bash skills/converter/scripts/convert.sh --all <target> [output-dir]
undefined

Arguments

参数

ArgumentRequiredDescription
skill-dir
Yes (or
--all
)
Path to skill directory (e.g.
skills/council
)
target
YesTarget platform:
codex
,
cursor
, or
test
output-dir
NoOverride output location. Default:
.agents/converter/<target>/<skill-name>/
--all
NoConvert all skills in
skills/
directory
参数是否必填描述
skill-dir
是(或使用
--all
skill目录的路径(例如
skills/council
target
目标平台:
codex
cursor
test
output-dir
覆盖输出位置。默认值:
.agents/converter/<target>/<skill-name>/
--all
转换
skills/
目录下的所有skills

Supported Targets

支持的目标平台

  • codex -- Convert to OpenAI Codex format (SKILL.md + prompt.md). Output:
    <dir>/SKILL.md
    and
    <dir>/prompt.md
    .
  • cursor -- Convert to Cursor rules format (
    .mdc
    rule file + optional
    mcp.json
    ). Output:
    <dir>/<name>.mdc
    and optionally
    <dir>/mcp.json
    .
  • test -- Emit the raw SkillBundle as structured markdown. Useful for debugging the parse stage.
  • codex -- 转换为OpenAI Codex格式(SKILL.md + prompt.md)。输出:
    <dir>/SKILL.md
    <dir>/prompt.md
  • cursor -- 转换为Cursor规则格式(
    .mdc
    规则文件 + 可选
    mcp.json
    )。输出:
    <dir>/<name>.mdc
    和可选的
    <dir>/mcp.json
  • test -- 以结构化Markdown形式输出原始SkillBundle。对调试解析阶段很有用。

Extending

扩展方法

To add a new target platform:
  1. Add a conversion function to
    scripts/convert.sh
    (pattern:
    convert_<target>
    )
  2. Update the target table above
  3. Add reference docs to
    references/
    if the target format needs documentation
要添加新的目标平台:
  1. scripts/convert.sh
    中添加转换函数(模式:
    convert_<target>
  2. 更新上方的目标平台表格
  3. 如果目标格式需要文档,在
    references/
    中添加参考文档

References

参考资料

  • references/skill-bundle-schema.md
    -- SkillBundle interchange format specification
  • references/skill-bundle-schema.md
    -- SkillBundle交换格式规范