Skip to content

JiuwenSwarm is an intelligent AI Agent built on openJiuwen. It extends the powerful capabilities of large language models directly to your fingertips through various communication apps you use daily.

Python

docs:补充/skills文档

openJiuwen-bot44eaea40aa35
diff --git a/docs/en/SlashCommands.md b/docs/en/SlashCommands.md
index 3e8bc7e9f0..ac2015fbda 100644
--- a/docs/en/SlashCommands.md
+++ b/docs/en/SlashCommands.md
@@ -35,7 +35,7 @@ Identified by Gateway and forwarded to AgentServer and other backend capabilitie
| `/new_session` | Create new session (IM only) |
| `/mode` | Mode switching (supports first-level entry and direct syntax) |
| `/switch` | Switch second-level mode within current mode family |
-| `/skills` | Skills list (see "IM vs TUI Differences") |
+| `/skills` | Skills management (list, install, uninstall, marketplace) (see below) |
| `/model` | Model view, add, switch (see below) |
| `/mcp` | MCP server management (see below) |
| `/diff` | View session changes by turn (see below) |
@@ -173,9 +173,31 @@ Manages directories AI can access for file read, edit, and execute operations.
- Changes are written to `config.yaml` under `mcp.servers`;
- After write, Agent config reload is triggered, and runtime MCP server bindings are synced accordingly.
----
+### `/skills` (Skills Management)
+
+Manage skills lifecycle: listing, installing, uninstalling, and marketplace source management.
+
+#### Subcommands
+
+| Command | Description |
+|---|---|
+| `/skills` or `/skills list` | List currently installed skills |
+| `/skills install <spec>` | Install a skill from marketplace (e.g., `my-skill@marketplace`) |
+| `/skills uninstall <name>` | Uninstall a skill by name |
+| `/skills marketplace` or `/skills marketplace list` | List marketplace sources (name, URL, enabled status, last updated) |
+| `/skills marketplace add <name> <url>` | Add a new marketplace source |
+| `/skills marketplace remove <name>` | Remove a marketplace source (also clears its cache) |
+| `/skills marketplace toggle <name> <on|off>` | Enable or disable a marketplace source (`on`/`true`/`1` = enable, otherwise disable) |
+| `/skills use <skill_name>, <query>` | Execute a query using a specific skill |
-## `/skills`: IM vs TUI Differences
+#### Concepts
+
+- **Skill**: An extension capability that can be installed from marketplace sources, providing additional functionality to the agent.
+- **Marketplace source**: A remote repository (typically a Git URL) that hosts available skills. Each source has a name, URL, and enabled/disabled state.
+- **Spec**: The install identifier format `<skill>@<marketplace>` used when installing a skill from a specific marketplace.
+- **Install location**: The directory where a skill is stored after installation.
+
+#### IM vs TUI Differences
Both ultimately request `skills.list`, but trigger methods and display differ.
@@ -184,7 +206,27 @@ Both ultimately request `skills.list`, but trigger methods and display differ.
| IM (Feishu etc. controlled channel) | Exact match `/skills list` (whitespace normalized first) | Gateway intercepts control message and requests `skills.list`, results shown as IM notification/card; standalone `/skills` doesn't go through this control path. |
| TUI (CLI built-in) | Input `/skills` | Locally executes built-in command and calls `skills.list`, displays as list view in session (title `Skills`); shows `No skills returned` when empty. |
-Conclusion: IM uses `/skills list`, TUI uses `/skills`, current syntax differs (known status).
+For other subcommands (`/skills install`, `/skills uninstall`, `/skills marketplace add/remove/toggle`, `/skills use`), Gateway does **not** intercept them — on the IM side they are treated as regular chat messages. These subcommands are only functional on the TUI (CLI built-in) and Web UI paths, where they send RPC requests directly to AgentServer.
+
+#### Notes
+
+- **Timeout**: `install`, `uninstall`, and `marketplace toggle` requests have a 120-second timeout on the TUI side; other subcommands have no explicit timeout.
+- **Cache cleanup**: `marketplace remove` sends `{ name, remove_cache: true }` to also clear the local cache for that source.
+- **Auto-refresh**: `marketplace add`, `marketplace remove`, and `marketplace toggle` automatically re-list marketplace sources after a successful operation.
+- **Offline handling**: `/skills use` checks connection status; if offline, shows `offline: waiting for reconnect before sending /skills use request`.
+
+#### Examples
+
+- `/skills` — List installed skills
+- `/skills list` — List installed skills (explicit subcommand)
+- `/skills install my-skill@marketplace` — Install a skill from marketplace
+- `/skills uninstall my-skill` — Uninstall a skill
+- `/skills marketplace list` — List marketplace sources
+- `/skills marketplace add community https://github.com/user/skills-repo` — Add a marketplace source named "community"
+- `/skills marketplace remove community` — Remove the "community" marketplace source
+- `/skills marketplace toggle community on` — Enable the "community" marketplace source
+- `/skills marketplace toggle community off` — Disable the "community" marketplace source
+- `/skills use my-skill, Code and execute a Hello World program.` — Use a skill to execute a query
---
diff --git "a/docs/zh/Slash\345\221\275\344\273\244\350\241\250.md" "b/docs/zh/Slash\345\221\275\344\273\244\350\241\250.md"
index e5f5bb86af..f7faf4416f 100644
--- "a/docs/zh/Slash\345\221\275\344\273\244\350\241\250.md"
+++ "b/docs/zh/Slash\345\221\275\344\273\244\350\241\250.md"
@@ -35,7 +35,7 @@
| `/new_session` | 新建会话(仅 IM 生效) |
| `/mode` | 模式切换(支持一级入口与直达写法) |
| `/switch` | 在当前模式族内切换二级模式 |
-| `/skills` | 技能列表(见「IM 与 TUI 差异」) |
+| `/skills` | 技能管理(列表、安装、卸载、市场源) |
| `/model` | 模型查看、新增、切换(见下文) |
| `/mcp` | MCP 服务管理(见下文) |
| `/diff` | 查看当前会话按轮次改动(见下文) |
@@ -173,9 +173,31 @@
- 变更会写入 `config.yaml` 的 `mcp.servers`;
- 写入后会触发 Agent 配置重载,运行时按配置同步 MCP server 绑定。
----
+### `/skills`(技能管理)
+
+管理技能的完整生命周期:列表查看、安装、卸载以及市场源管理。
+
+#### 子命令
+
+| 命令 | 说明 |
+|---|---|
+| `/skills` 或 `/skills list` | 列出当前已安装的技能 |
+| `/skills install <spec>` | 从市场源安装技能(如 `my-skill@marketplace`) |
+| `/skills uninstall <name>` | 按名称卸载技能 |
+| `/skills marketplace` 或 `/skills marketplace list` | 列出市场源(名称、URL、启用状态、最后更新时间) |
+| `/skills marketplace add <name> <url>` | 添加新的市场源 |
+| `/skills marketplace remove <name>` | 移除市场源(同时清理缓存) |
+| `/skills marketplace toggle <name> <on|off>` | 启用或禁用市场源(`on`/`true`/`1` 为启用,其余为禁用) |
+| `/skills use <skill_name>, <query>` | 使用指定技能执行查询 |
-## `/skills`:IM 与 TUI 的差异
+#### 概念说明
+
+- **技能(Skill)**:可从市场源安装的扩展能力,为 Agent 提供额外功能。
+- **市场源(Marketplace source)**:托管可用技能的远程仓库(通常为 Git URL),每个源包含名称、URL 和启用/禁用状态。
+- **规格标识(Spec)**:安装时使用的标识格式 `<技能名>@<市场源名>`。
+- **安装位置(Install location)**:技能安装后的存储目录。
+
+#### IM 与 TUI 的差异
两端最终都会请求 `skills.list`,但触发方式和展示形态不同。
@@ -184,7 +206,27 @@
| IM(飞书等受控通道) | 整行精确匹配 `/skills list`(会先做空白规范化) | Gateway 拦截控制消息并请求 `skills.list`,结果以 IM 通知/卡片等形式展示;单独输入 `/skills` 不走该控制路径。 |
| TUI(CLI 内置) | 输入 `/skills` | 本地执行内置命令并调用 `skills.list`,在会话内以列表视图展示(标题 `Skills`);无数据时提示 `No skills returned`。 |
-结论:IM 使用 `/skills list`,TUI 使用 `/skills`,当前写法存在差异(已知现状)。
+对于其他子命令(`/skills install`、`/skills uninstall`、`/skills marketplace add/remove/toggle`、`/skills use`),Gateway **不会拦截**——在 IM 侧输入时会被当作普通聊天消息发送给 Agent。这些子命令仅在 TUI(CLI 内置)和 Web UI 路径下可用,通过 RPC 直连 AgentServer。
+
+#### 备注
+
+- **超时**:`install`、`uninstall`、`marketplace toggle` 请求在 TUI 侧有 120 秒超时;其余子命令无显式超时设置。
+- **缓存清理**:`marketplace remove` 发送 `{ name, remove_cache: true }` 以同时清理该源的本地缓存。
+- **自动刷新**:`marketplace add`、`marketplace remove`、`marketplace toggle` 在操作成功后会自动重新列出市场源。
+- **离线处理**:`/skills use` 会检查连接状态;离线时显示 `offline: waiting for reconnect before sending /skills use request`。
+
+#### 示例
+
+- `/skills` — 列出已安装技能
+- `/skills list` — 列出已安装技能(显式子命令)
+- `/skills install my-skill@marketplace` — 从市场源安装技能
+- `/skills uninstall my-skill` — 卸载技能
+- `/skills marketplace list` — 列出市场源
+- `/skills marketplace add community https://github.com/user/skills-repo` — 添加名为"community"的市场源
+- `/skills marketplace remove community` — 移除"community"市场源
+- `/skills marketplace toggle community on` — 启用"community"市场源
+- `/skills marketplace toggle community off` — 禁用"community"市场源
+- `/skills use my-skill, Code and execute a Hello World program.` — 使用技能执行查询
---