> ## Documentation Index
> Fetch the complete documentation index at: https://flowglad.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Skills

> 为外部 agent 和 Automations 创建可复用的包

Skills 是由指令和可选支持文件组成的可复用包。它们让你的团队只需定义一次完成某项任务的可重复方式，然后在整个 Flowglad 中一致地应用。

每个 Skill 都有名称、斜杠命令 slug、描述以及用 Markdown 编写的指令。支持文件可以提供遵循这些指令所需的额外上下文或资源。

## 将 Flowglad 用作团队的 Skill 库

Flowglad 将每个 Skill 作为带版本的包进行保存。发布变更会创建一个新修订，而不是原地替换之前的包。组织管理员可以打开 Skill 的 **History** 来查看其修订、比较变更、恢复较早的修订，或在可用时丢弃草稿。

这为你的团队提供了一个受治理的统一位置来维护可复用指令，同时保留在任一时间点哪个版本处于活跃状态。草稿和被拒绝的修订不会替换活跃版本。

### 通过 MCP 管理 Skills

连接 Flowglad MCP server 后，agent 可以代你查看和管理组织的 Skill 库：

* `skills.list` 返回该连接可见的 Skills。
* `skills.get` 返回单个 Skill 的最新修订和活跃修订元数据。
* `skills.create` 提交一个新的 Skill 包。
* `skills.create_candidate` 提交现有 Skill 的新修订。
* `skills.publish_revision` 验证并发布一个延迟的修订。
* `skills.create_package_upload_session` 和 `skills.finalize_package_upload_session` 用于传输过大而无法内联发送的包。
* `skills.get` 报告已接受请求的验证和提升结果。

创建或更新 Skills 需要团队成员的组织成员身份和 MCP 连接的授权中都具有 `skills:write` 权限。如果你在连接 server 之后才添加该权限，请重新连接 Flowglad MCP 并授权 `skills:write`，以使写入工具可用。

**权限：** 管理员默认拥有 Skill 编写权限。要为 Contributor 授予相同权限，请打开 **Settings** → **Team**，选择该团队成员，然后启用 **Skill Authoring**。这会授予创建和更新组织 Skills 的权限，而无需将该成员设为管理员。

## 将 Flowglad MCP Skills 加载到你的 agent 中

Flowglad MCP server 在 MCP 初始化期间声明 `io.modelcontextprotocol/skills`。这会告知兼容的客户端该 server 实现了 agent Skill 方法 `skills/list` 和 `skills/get`。每个返回的 Skill 都包含 `skill://` 资源 URI 和内容摘要；客户端可以使用 `resources/read` 获取文件。

连接 server 并不能保证客户端会调用 `skills/list` 或安装返回的包。各客户端的支持程度不同。如果你希望 agent 在每个会话开始时刷新 Flowglad 注册表，请向 ChatGPT / Codex 或 Claude 添加一条启动指令。

**MCP 命名：** 这些名称有意不同。带点的 `skills.list` 是一个 Flowglad 工具，用于访问组织带版本的 Skill 记录。带斜杠的 `skills/list` 是一个 MCP 协议扩展方法，用于发现面向 agent 的 Skill 包。

### 添加启动指令

在开始新会话之前先创建一次目标目录，然后添加下面对应的指令块。

#### ChatGPT / Codex

使用 `mkdir -p ~/.agents/skills` 创建 ChatGPT / Codex 目标目录。

将以下代码块放入 `~/.codex/AGENTS.md` 以应用于所有项目，或放入仓库的 `AGENTS.md` 以与该仓库的团队共享。

```markdown AGENTS.md theme={null}
## Flowglad MCP Skill bootstrap

At the start of every new session, before handling the first task:

1. Confirm that the Flowglad MCP server is connected.
2. Refresh the agent Skill catalog from Flowglad. Prefer the advertised `skills/list` MCP extension method. If the client does not expose that method directly, use the Flowglad server's `resources/list` method and select resources whose URIs begin with `skill://flowglad/`.
3. For every returned Skill, retrieve its manifest with `skills/get` when available, then read each listed resource with `resources/read`, beginning with `SKILL.md`.
4. Synchronize the package into `~/.agents/skills/<skill-name>/`. Compare the returned content digests and rewrite only new or changed Flowglad-managed files. Never overwrite or delete unrelated local Skills.
5. Treat the refreshed Flowglad package as the source of truth for this session. Make the synchronized Skills available for automatic matching and explicit `$skill-name` invocation.
6. If this ChatGPT / Codex client cannot call the Skill or resource methods, report that limitation once and continue without claiming that the registry was refreshed.
```

#### Claude

使用 `mkdir -p ~/.claude/skills` 创建 Claude 目标目录。

将以下代码块放入 `~/.claude/CLAUDE.md` 以应用于所有项目，或放入仓库的 `CLAUDE.md` 以与该仓库的团队共享。

```markdown CLAUDE.md theme={null}
## Flowglad MCP Skill bootstrap

At the start of every new session, before handling the first task:

1. Confirm that the Flowglad MCP server is connected.
2. Refresh the agent Skill catalog from Flowglad. Prefer the advertised `skills/list` MCP extension method. If the client does not expose that method directly, use the Flowglad server's `resources/list` method and select resources whose URIs begin with `skill://flowglad/`.
3. For every returned Skill, retrieve its manifest with `skills/get` when available, then read each listed resource with `resources/read`, beginning with `SKILL.md`.
4. Synchronize the package into `~/.claude/skills/<skill-name>/`. Compare the returned content digests and rewrite only new or changed Flowglad-managed files. Never overwrite or delete unrelated local Skills.
5. Treat the refreshed Flowglad package as the source of truth for this session. Make the synchronized Skills available for automatic matching and explicit `/skill-name` invocation.
6. If this Claude client cannot call the Skill or resource methods, report that limitation once and continue without claiming that the registry was refreshed.
```

你可以让 ChatGPT / Codex 或 Claude 将相应的代码块添加到其自身的用户级指令文件中。由于该文件会影响未来的会话，请在接受之前审查拟议的编辑。该指令是一种尽力而为的 agent 引导方式；如果你的环境必须确定性地刷新 Skills，请在受信任的 `SessionStart` hook 或你的 MCP 客户端集成中实现相同的同步。

## Skills 的使用场景

Skills 目前有两类使用方：

* 兼容的外部 agent 通过 Flowglad MCP 发现并同步已启用的包，然后自动匹配或按名称调用它们。
* Automations 将某个确切的已发布 Skill 修订固定为 OWS `skill-revision` 代码资源。Automation 选择包路径和入口点；agent 步骤仅接收由密封的运行能力集授权的 Skills。

第一种方式向外部 agent 提供可复用指令。第二种方式向可重复的 Automation 运行提供不可变的代码和支持文件。已发布的 Skills 在整个组织范围内可用，因此获得授权的 Automation 可以在任意 Space 中选择同一个 Skill 修订。使用它的 Automation 及其运行仍归其所在的 Space 所有；选择 Skill 不会改变这一边界。

## 创建和维护 Skills

打开**组织菜单** → **Skills** → **New Skill**。在 **Skill** 选项卡中，输入 **Name**、**Slug**、可选的 **Description**，并在 **Markdown** 中输入可复用指令。使用 **Files** 选项卡添加任何支持性包文件，然后选择 **Create Skill**。

Slug 使用小写字母、数字和连字符，以字母或数字开头，是用户在 `/` 之后输入的内容。

创建或编辑 Skill 会生成一个草稿。在 Skill 详情页上，编辑会自动保存；选择 **Publish Draft** 以验证并发布草稿。如果验证失败，请根据显示的诊断信息修正草稿并重新发布。

使用 **History** 查看修订、恢复已被取代的修订，或在可用时丢弃可变草稿。**Disable Skill** 会将其从外部 agent 发现和 Automation 解析中移除，但不会删除修订历史；**Enable Skill** 会使其重新可用。

## 使用 MCP 创建或编辑 Skill

使用已连接的外部 MCP 客户端进行以包为先的编写。在编辑现有 Skill 之前调用 `skills.get`。使用 `skills.create` 创建新包，或使用 `skills.create_candidate` 基于当前活跃修订创建新修订。

小型包可以内联提供。对于较大的包，请调用 `skills.create_package_upload_session`，上传所请求的对象，最后调用 `skills.finalize_package_upload_session` 完成。如果验证被延迟，请调用 `skills.publish_revision`。轮询 `skills.get` 以获取已接受的生命周期请求及其验证或提升结果。

发布 Skill 不会创建、修订或激活 Automation；需要时请显式使用 Automation MCP 生命周期。

## 从 Skill 模板开始

**Skills** 页面包含 **Skill Templates**。搜索或筛选目录，预览模板，然后选择 **Copy Skill**。副本会成为一个组织 Skill，可以像其他 Skill 一样编辑和发布。

## Skills 与 Automations

Skill 定义如何执行可复用的工作。它不决定该工作何时运行。

当工作需要手动运行、按计划运行或响应事件运行时，请使用 Automation。Automation 可以固定一个或多个 Skill 修订，以便在多次运行中复用相同的实现。


## Related topics

- [MCP](/docs/zh/mcp-server.md)
- [Automations](/docs/zh/automations.md)
- [欢迎](/docs/zh/agents/introduction.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.