Skill 导入指南
Rotifer 可以扫描你现有的 AI 技能文件(如 Cursor、Codex 等 AI IDE 使用的技能),并将它们转换为基因。这样你就可以对技能进行版本管理、竞争和共享。
整个流程分为四步:
scan → wrap → compile → publish| 步骤 | 命令 | 作用 |
|---|---|---|
| 扫描 | rotifer scan --skills | 发现目录中的 SKILL.md 文件 |
| 包装 | rotifer wrap <name> --from-skill <path> | 从技能文件创建基因 |
| 编译 | rotifer compile <name> | 验证基因的表型结构 |
| 发布 | rotifer publish <name> | 上传到云端注册表 |
第一步:扫描技能
Section titled “第一步:扫描技能”使用 --skills 标志发现本地的 SKILL.md 文件:
# 扫描当前目录rotifer scan --skills
# 扫描指定目录rotifer scan --skills --skills-path .cursor/skills
# 扫描 Codex 技能rotifer scan --skills --skills-path ~/.codex/skills扫描器会递归搜索名为 SKILL.md 的文件,要求包含有效的 YAML frontmatter,至少包含 name 字段:
---name: my-awesome-skilldescription: 对开发者有用的技能---输出示例:
╭─ Skill Scanner (SKILL.md → Gene candidates) ─╮
Scanning for SKILL.md: .cursor/skills ✓ Found 3 skill(s):
debugger .cursor/skills/debugger/SKILL.md 系统化调试指南,适用于 AI 和 Web3 应用…
api-designer .cursor/skills/api-designer/SKILL.md 设计 RESTful 和 tRPC API,保持一致的模式…
testing-strategist .cursor/skills/testing-strategist/SKILL.md 为 AI 和 Web3 应用设计测试策略…
Wrap and upload: rotifer wrap <name> --from-skill <path> --domain <domain> then: rotifer compile <name> && rotifer publish <name>第二步:包装为基因
Section titled “第二步:包装为基因”从扫描结果中选择一个技能并包装:
rotifer wrap debugger-skill --from-skill .cursor/skills/debugger/SKILL.md --domain debugging这会创建一个基因目录,包含:
| 文件 | 用途 |
|---|---|
genes/debugger-skill/phenotype.json | 基因元数据(域、模式、版本) |
genes/debugger-skill/SKILL.md | 原始技能内容(复制) |
genes/debugger-skill/.gene-manifest.json | 基因 ID 和来源信息 |
--domain <domain>— 功能域(如debugging、testing、api-design)。默认为general。--fidelity <level>— 保真度等级。默认为Wrapped。
也可以将 --from-skill 指向包含 SKILL.md 的目录:
rotifer wrap my-gene --from-skill .cursor/skills/debugger/第三步:编译(验证)
Section titled “第三步:编译(验证)”rotifer compile debugger-skill对于 Wrapped 基因(无 WASM 二进制),compile 会验证表型结构——确保 domain、inputSchema、outputSchema、version 和 fidelity 存在且格式正确。
第四步:发布到云端
Section titled “第四步:发布到云端”rotifer publish debugger-skill这会将基因的表型和元数据上传到 Rotifer 云端注册表。基于技能的基因是 Wrapped 的(仅元数据,无 WASM),因此以元数据包的形式发布。
其他开发者随后可以:
rotifer search debuggerrotifer install <gene-id>仅元数据基因
Section titled “仅元数据基因”从技能包装的基因与原生基因有所不同:
| Wrapped(来自 Skill) | Native(含 WASM) | |
|---|---|---|
| 包含 | phenotype.json + SKILL.md | phenotype.json + .wasm 二进制 |
| Arena 适应度 | 较低基础分(0.45) | 较高基础分(0.70) |
| 可执行 | 否——作为参考 | 是——在 WASM 沙盒中运行 |
| 可发布 | 是 | 是 |
| 可升级 | 是——后续可通过 rotifer compile --wasm 添加 | 已经是原生 |
Wrapped 基因可以通过添加 WASM 实现升级为 Native:
rotifer compile debugger-skill --wasm debugger.wasm默认技能路径
Section titled “默认技能路径”常见 AI IDE 技能存储位置:
| IDE / 工具 | 默认路径 |
|---|---|
| Cursor | .cursor/skills/ |
| Codex | ~/.codex/skills/ |
| 自定义 | 任何包含 SKILL.md 文件的目录 |
# 1. 初始化 Rotifer 项目rotifer init my-project && cd my-project
# 2. 扫描你的 Cursor 技能rotifer scan --skills --skills-path ~/.cursor/skills
# 3. 将技能包装为基因rotifer wrap code-reviewer --from-skill ~/.cursor/skills/tech-lead/SKILL.md --domain code-quality
# 4. 验证rotifer compile code-reviewer
# 5. 登录并发布rotifer loginrotifer publish code-reviewer
# 6. 其他开发者现在可以找到并安装它rotifer search code-quality