技能管理

设计与多媒体 社区

技能解读

当前原文的自动摘译,尚未人工审校。

技能管理(技能经理)

当用户要求添加、创建、编辑、检查、迁移或调整磨练技能时,请使用此技能。运行时契约现在是:技能存在于skills/<name>/SKILL.md,data/custom_skills/<name>/SKILL.md,或者更接近的.hone/skills/<name>/SKILL.md。该模型首先看到一个紧凑的列表。仅当以下情况时,完整技能本体才会注入当前回合:skill_tool(skill_name="...")或用户斜杠命令,例如/<skill-name>被调用。

前沿合同

更喜欢这个 frontmatter 模式:注释:allowed-tools取代遗产tools作为主要的运行时字段。context通常应该是inline;使用fork仅当技能应该在孤立的儿童跑步者中运行时。paths隐藏默认列表中的技能,直到活动任务触及匹配的文件。

如何检验技能

当用户询问存在哪些技能或哪些技能适合某项任务时:致电discover_skills(query="...")与用户的任务或关键字。从返回的元数据中总结相关技能。如果一项技能实际上应该用于当前任务,请调用skill_tool(skill_name="...")所以本回合的全技能提示进行了扩展。当用户要求详细检查特定技能时:

如何创建或更新技能

当用户想要创建或编辑技能时:收集想要的技能 ID、描述、触发条件以及用户是否应该能够直接调用它/<skill-name>。写入或更新实际的SKILL.md具有新 frontmatter 架构的文件。保持正文具体:触发规则、所需步骤、工具使用预期以及拒绝/验证约束。如果您创建或更改了应立即运行的技能,请通过调用来验证它skill_tool(skill_name="<skill id>")并检查呈现的提示。

严格的规则

不要教导被弃用的人skill_tool(action="add" | "update" | "remove")CRUD 工作流程。不要依赖load_skill作为面向用户的主要路径。如果一项技能是路径门控的,请提及它可能会保持隐藏状态,直到涉及匹配的文件为止。如果未对某个字段实施运行时强制,例如hooks或者严格的工具范围,直接说出来,而不是假装它是活跃的。

流狐档案 运行与权限由流狐静态检查推断,不代表作者声明或实际测试结果。
领域
设计与多媒体
作者声明的智能体
未找到明确声明;不据此推断已兼容或已测试
静态检查
94 / 100 · 启发式扫描,不代表运行安全
运行环境证据
未执行;当前没有隔离运行测试证据
作者 / 版本 / 许可证
@B-M-Capital-Research · MIT
上下文用量评级
低消耗
接入复杂程度
需简单配置
是否需要外部接口密钥
不需要
兼容的系统
未声明(默认跨平台)
运行环境要求
未检出明确要求
检测到的文件与系统行为
  • 只读
  • 允许写入 / 修改
  • 命令执行
网络行为
仅限本地
安装命令数
无(仅作为资料)

需要注意: 未声明工具权限范围;实际权限由运行环境决定。

作者说明文件(原文) SKILL.md

## Skill Management (skill_manager)

Use this skill when the user asks to add, create, edit, inspect, migrate, or align a Hone skill.

The runtime contract is now:

1. Skills live in `skills/<name>/SKILL.md`, `data/custom_skills/<name>/SKILL.md`, or a closer `.hone/skills/<name>/SKILL.md`.
2. The model sees a compact listing first.
3. The full skill body is only injected into the current turn when `skill_tool(skill_name="...")` or a user slash command like `/<skill-name>` is invoked.
4. `load_skill` is only a compatibility shim. Do not teach it as the primary workflow.

## Frontmatter Contract

Prefer this frontmatter schema:

```yaml
---
name: Human readable name
description: One-line description
when_to_use: Brief trigger guidance
allowed-tools:
  - skill_tool
user-invocable: true
model: optional model override
effort: optional effort override
context: inline
agent: optional agent hint
paths:
  - src/**/*.rs
hooks: {}
arguments: []
script: optional default script path like scripts/run.sh
shell: optional shell hint
---
```

Notes:

- `allowed-tools` replaces legacy `tools` as the main runtime field.
- `context` should usually be `inline`; use `fork` only when the skill should run in an isolated child runner.
- `paths` hides the skill from the default listing until the active task touches matching files.
- `script` declares the default executable entrypoint inside the skill directory. `skill_tool(..., execute_script=true)` can run it with `${HONE_SKILL_DIR}` as cwd.
- Keep the Markdown body task-oriented and ready to inject as prompt text.

## How To Inspect Skills

When the user asks what skills exist or which skill fits a task:

1. Call `discover_skills(query="...")` with the user's task or keyword.
2. Summarize the relevant skills from the returned metadata.
3. If one skill should actually be used for the current task, call `skill_tool(skill_name="...")` so the full skill prompt is expanded for this turn.

When the user asks to inspect a specific skill in detail:

1. Use `discover_skills(query="<skill name>")` to confirm the match if needed.
2. Call `skill_tool(skill_name="<skill id>")`.
3. Explain the resolved metadata and the injected prompt body, not a hand-written summary that drifts from the source.

## How To Create Or Update Skills

When the user wants to create or edit a skill:

1. Collect the intended skill id, description, trigger conditions, and whether users should be able to invoke it directly with `/<skill-name>`.
2. Write or update the actual `SKILL.md` file with the new frontmatter schema.
3. Keep the body concrete: trigger rules, required steps, tool usage expectations, and refusal/verification constraints.
4. If you created or changed a skill that should be runnable immediately, validate it by invoking `skill_tool(skill_name="<skill id>")` and checking the rendered prompt.

## Strict Rules

- Do not teach the deprecated `skill_tool(action="add" | "update" | "remove")` CRUD workflow.
- Do not rely on `load_skill` as the main user-facing path.
- If a skill is path-gated, mention that it may stay hidden until matching files are involved.
- If runtime enforcement is not implemented for a field such as `hooks` or strict tool scoping, say so plainly instead of pretending it is active.

讨论

基于 GitHub Discussions。登录 GitHub 即可参与讨论、点赞、订阅更新。