Bi

技能

将重复流程封装为可复用的技能。

Markdown 原文Raw markdown

如果同一套流程需要反复交代,可以把它封装成技能。

什么是技能

技能是一段可复用的说明,告诉智能体遇到特定任务时应当怎么做。它把「每次重新描述」变成「调用一次」。

使用技能

在会话中通过技能名称调用。智能体按技能定义的流程执行,免去重复说明。

适合的场景:

  • 反复进行的同类任务,例如生成某类报告、按固定流程检查代码
  • 团队内共享的一套标准做法
  • 一段较长的说明中,你只需要用到其中一部分

子目录与技能包

技能可以放进子目录分类。技能名就是 / 分隔的相对路径,例如 文案/品牌文案.md 对应技能 文案/品牌文案。

目录里含 SKILL.md 时,整个目录算一个技能包:技能名取目录名,调用时只注入 SKILL.md,同目录其他文件作为伴随文件,由智能体按需用 read 读取。选择器把技能包显示为单独一条(带目录图标),伴随文件不会出现在列表里——但搜索伴随文件名仍能命中所属包,也可以用 [skill:包/伴随] 手工挂载单份。流程很长时适合这样做:入口保持精简,细节用到才加载。

常驻技能

用 / 调用的技能只对当前这一轮生效。要让技能跨多轮保持,把它固定住:

  • 会话级:输入框上方的常驻技能栏。技能文件声明 pin: true 后会出现在这里,点击即为本会话开启,每轮自动注入,直到你关掉或切换会话。
  • 项目级:项目设置弹窗的「技能」tab。在这里固定,该项目下所有会话都生效,同项目目录的使用者共享。

三层并存、互不冲突:一次性 [skill:xxx] 标记、会话级固定、项目级固定会在每轮取并集去重后注入。上下文面板的「技能内容」段会显示本轮注入了哪些技能及其 token 占用。

技能要出现在常驻栏,需在 frontmatter 里声明 pin: true(声明不等于自动启用,仍需手动开启):

---
name: 水保方案
description: ……
pin: true
---

技能目录下的加密技能(.skl)在读取时自动解密,因此加密交付下伴随文件同样可用。

相关

Skills

Package repeated workflows into reusable skills.

Markdown 原文Raw markdown

When the same workflow needs explaining again and again, package it as a skill.

What a skill is

A skill is reusable instructions that tell the agent how to handle a particular kind of task. It turns “explain it every time” into “invoke it once”.

Using a skill

Invoke it by name in the conversation. The agent follows the workflow defined in the skill, so you do not have to restate it.

Good fits:

  • Recurring tasks, such as producing a kind of report or running a fixed code review
  • A standard practice shared by a team
  • A long instruction set where only part is relevant each time

Subdirectories and skill packs

Skills can be grouped in subdirectories. The skill name is the relative /-separated path: copy/brand.md is the skill copy/brand.

When a directory contains SKILL.md, the whole directory counts as one skill pack. The skill name is the directory name; invoking it injects only SKILL.md, while sibling files stay available as companion files that the agent reads on demand. The picker shows a pack as one entry (with a directory icon); companions are not listed, but searching a companion name still finds the pack, and [skill:pack/companion] mounts a single file manually. This suits long workflows: keep the entry point small and load detail only when needed.

Always-on skills

A skill invoked with / applies to the current turn only. To keep one across turns, pin it:

  • Session level: the always-on skill bar above the input. Skills declaring pin: true appear there; clicking one enables it for this session and injects it every turn until you turn it off or switch sessions.
  • Project level: the “Skills” tab in project settings. Pinning there applies to every session under that project and is shared by everyone using that project directory.

The three layers coexist: a one-off [skill:xxx] marker, session pins and project pins are merged and de-duplicated each turn. The context panel’s “skill content” section shows exactly what was injected and how many tokens it used.

To appear in the always-on bar, a skill declares pin: true in frontmatter (declaring it does not enable it; you still turn it on):

---
name: soil-conservation
description: …
pin: true
---

Encrypted skills (.skl) under the skills directory are decrypted when read, so companion files work in encrypted deliveries too.