Skip to main content
当前正确路径是“手写 Adapter,再 validate / explain / preflight”。CLI 尚不支持 import --as Adapter
不要运行或记录成已支持命令:huoban import path/to/SKILL.md --as Adapter ...。当前 CLI 会拒绝除 Profile 以外的 import target。

为什么使用 Adapter

外部 SKILL.md 通常缺少 Huoban 所需的结构化边界:
  • capability。
  • input/output mapping。
  • declared side effects。
  • target-environment Requirement。
  • Trust 与 Policy 引用。
  • Checkpoint hint。
因此外部来源先进入 Adapter。不要仅因文件存在就生成 trusted Skill

public fixture

source tree 的 examples/fixtures/grill-me/SKILL.md 内容是:
examples/... 是 Huoban source repo 内的路径,不是文档站链接。

完整 Adapter

下面逐字取自 examples/adapters/grill-me-skill-md.yaml

手工迁移步骤

  1. 保留原始 SKILL.md,不要覆盖它。
  2. 创建 Adapter,显式填写 sourcecapabilitiesmappingsideEffects
  3. 把本地文件、executable、MCP 或 context 依赖写入 requirements
  4. 为来源创建独立 Trust 对象并关联 Policy。
  5. 对推断的 capability 与 side effects 保留 review condition。
  6. 在 Flow 中声明 capability/role,在 Run binding 中选择 Adapter。
  7. validate、explain、print dry-run,再执行 Preflight。

验证命令

Preflight 会检查显式 requirements,不会执行 Adapter,也不会调用它描述的 MCP tool。

review 与提升边界

  • ImportNeedsReview=True 不会自动变更。
  • inferred Requirement 的 reviewStatus: needsReview 会让 Preflight 保持 Unknown
  • 当前 CLI 没有接受、提升 Trust 或生成原生 Skill 的命令。
  • 如果另行创建 Huoban Skill,可以用 Skill.spec.adapterRef 指回 Adapter;这仍需 schema-valid object、review 和真实 workflow 证据。
  • fallback 写在 Run.spec.bindings.<role>.fallback,不写在 Flow 或 Adapter。

下一步