跳转到内容

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>上传到云端注册表

使用 --skills 标志发现本地的 SKILL.md 文件:

Terminal window
# 扫描当前目录
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-skill
description: 对开发者有用的技能
---

输出示例:

╭─ 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>

从扫描结果中选择一个技能并包装:

Terminal window
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> — 功能域(如 debuggingtestingapi-design)。默认为 general
  • --fidelity <level> — 保真度等级。默认为 Wrapped

也可以将 --from-skill 指向包含 SKILL.md 的目录:

Terminal window
rotifer wrap my-gene --from-skill .cursor/skills/debugger/
Terminal window
rotifer compile debugger-skill

对于 Wrapped 基因(无 WASM 二进制),compile 会验证表型结构——确保 domaininputSchemaoutputSchemaversionfidelity 存在且格式正确。

Terminal window
rotifer publish debugger-skill

这会将基因的表型和元数据上传到 Rotifer 云端注册表。基于技能的基因是 Wrapped 的(仅元数据,无 WASM),因此以元数据包的形式发布。

其他开发者随后可以:

Terminal window
rotifer search debugger
rotifer install <gene-id>

从技能包装的基因与原生基因有所不同:

Wrapped(来自 Skill)Native(含 WASM)
包含phenotype.json + SKILL.mdphenotype.json + .wasm 二进制
Arena 适应度较低基础分(0.45)较高基础分(0.70)
可执行否——作为参考是——在 WASM 沙盒中运行
可发布
可升级是——后续可通过 rotifer compile --wasm 添加已经是原生

Wrapped 基因可以通过添加 WASM 实现升级为 Native:

Terminal window
rotifer compile debugger-skill --wasm debugger.wasm

常见 AI IDE 技能存储位置:

IDE / 工具默认路径
Cursor.cursor/skills/
Codex~/.codex/skills/
自定义任何包含 SKILL.md 文件的目录
Terminal window
# 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 login
rotifer publish code-reviewer
# 6. 其他开发者现在可以找到并安装它
rotifer search code-quality