> ## 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 需要团队成员的组织 membership 和 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

打开 **organization menu** → **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-Hans/mcp-server.md)
- [Automations](/docs/zh-Hans/automations.md)
- [欢迎](/docs/zh-Hans/agents/introduction.md)


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