Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Only write entries that are worth mentioning to users.
## Unreleased

- Tool: Add `ReadMediaFile` tool for reading image/video files; `ReadFile` now focuses on text files only
- Skills: Flow skills now also register as `/skill:<skill-name>` commands (in addition to `/flow:<skill-name>`)

## 0.82 (2026-01-21)

Expand Down
12 changes: 9 additions & 3 deletions docs/en/customization/skills.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,9 +239,15 @@ D -> END

**Executing a flow skill**

Flow skills can be invoked in two ways:

- `/flow:<name>`: Execute the flow. The Agent will start from the `BEGIN` node and process each node according to the flow diagram definition until reaching the `END` node
- `/skill:<name>`: Like a standard skill, sends the `SKILL.md` content to the Agent as a prompt (does not automatically execute the flow)

```sh
# Execute in Kimi CLI
# Execute the flow
/flow:code-review
```

After execution, the Agent will start from the `BEGIN` node and process each node according to the flow diagram definition until reaching the `END` node.
# Load as a standard skill
/skill:code-review
```
10 changes: 9 additions & 1 deletion docs/en/reference/slash-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ When the context is too long, Kimi CLI will automatically trigger compaction. Th

### `/skill:<name>`

Load a specific skill, sending the `SKILL.md` content to the Agent as a prompt.
Load a specific skill, sending the `SKILL.md` content to the Agent as a prompt. This command works for both standard skills and flow skills.

For example:

Expand All @@ -118,6 +118,10 @@ For example:

You can append additional text after the command, which will be added to the skill prompt. See [Agent Skills](../customization/skills.md) for details.

::: tip
Flow skills can also be invoked via `/skill:<name>`, which loads the content as a standard skill without automatically executing the flow. To execute the flow, use `/flow:<name>` instead.
:::

### `/flow:<name>`

Execute a specific flow skill. Flow skills embed an Agent Flow diagram in `SKILL.md`. After execution, the Agent will start from the `BEGIN` node and process each node according to the flow diagram definition until reaching the `END` node.
Expand All @@ -127,6 +131,10 @@ For example:
- `/flow:code-review`: Execute code review workflow
- `/flow:release`: Execute release workflow

::: tip
Flow skills can also be invoked via `/skill:<name>`, which loads the content as a standard skill without automatically executing the flow.
:::

See [Agent Skills](../customization/skills.md#flow-skills) for details.

## Others
Expand Down
1 change: 1 addition & 0 deletions docs/en/release-notes/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ This page documents the changes in each Kimi CLI release.
## Unreleased

- Tool: Add `ReadMediaFile` tool for reading image/video files; `ReadFile` now focuses on text files only
- Skills: Flow skills now also register as `/skill:<skill-name>` commands (in addition to `/flow:<skill-name>`)

## 0.82 (2026-01-21)

Expand Down
12 changes: 9 additions & 3 deletions docs/zh/customization/skills.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,9 +239,15 @@ D -> END

**执行 Flow Skill**

Flow Skill 可以通过两种方式调用:

- `/flow:<name>`:执行流程,Agent 会从 `BEGIN` 节点开始,按照流程图定义依次处理每个节点,直到到达 `END` 节点
- `/skill:<name>`:与普通 Skill 一样,将 `SKILL.md` 内容作为提示词发送给 Agent(不自动执行流程)

```sh
# 在 Kimi CLI 中执行
# 执行流程
/flow:code-review
```

执行后,Agent 会从 `BEGIN` 节点开始,按照流程图定义依次处理每个节点,直到到达 `END` 节点。
# 作为普通 Skill 加载
/skill:code-review
```
10 changes: 9 additions & 1 deletion docs/zh/reference/slash-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@

### `/skill:<name>`

加载指定的 Skill,将 `SKILL.md` 内容作为提示词发送给 Agent。
加载指定的 Skill,将 `SKILL.md` 内容作为提示词发送给 Agent。此命令适用于普通 Skill 和 Flow Skill。

例如:

Expand All @@ -118,6 +118,10 @@

命令后面可以附带额外的文本,这些内容会追加到 Skill 提示词之后。详见 [Agent Skills](../customization/skills.md)。

::: tip 提示
Flow Skill 也可以通过 `/skill:<name>` 调用,此时作为普通 Skill 加载内容,不会自动执行流程。如需执行流程,请使用 `/flow:<name>`。
:::

### `/flow:<name>`

执行指定的 Flow Skill。Flow Skill 在 `SKILL.md` 中内嵌 Agent Flow 流程图,执行后 Agent 会从 `BEGIN` 节点开始,按照流程图定义依次处理每个节点,直到到达 `END` 节点。
Expand All @@ -127,6 +131,10 @@
- `/flow:code-review`:执行代码审查工作流
- `/flow:release`:执行发布工作流

::: tip 提示
Flow Skill 也可以通过 `/skill:<name>` 调用,此时作为普通 Skill 加载内容,不会自动执行流程。
:::

详见 [Agent Skills](../customization/skills.md#flow-skills)。

## 其他
Expand Down
1 change: 1 addition & 0 deletions docs/zh/release-notes/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
## 未发布

- Tool:添加 `ReadMediaFile` 工具用于读取图片/视频文件;`ReadFile` 现在仅用于读取文本文件
- Skills:Flow Skills 现在也注册为 `/skill:<skill-name>` 命令(除了 `/flow:<skill-name>`)

## 0.82 (2026-01-21)

Expand Down
2 changes: 1 addition & 1 deletion src/kimi_cli/soul/kimisoul.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ def _build_slash_commands(self) -> list[SlashCommand[Any]]:
seen_names = {cmd.name for cmd in commands}

for skill in self._runtime.skills.values():
if skill.type != "standard":
if skill.type not in ("standard", "flow"):
continue
name = f"{SKILL_COMMAND_PREFIX}{skill.name}"
if name in seen_names:
Expand Down
50 changes: 50 additions & 0 deletions tests/test_kimisoul_slash_commands.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
from __future__ import annotations

from pathlib import Path

from kaos.path import KaosPath
from kosong.tooling.empty import EmptyToolset

from kimi_cli.skill import Skill
from kimi_cli.skill.flow import Flow, FlowEdge, FlowNode
from kimi_cli.soul.agent import Agent, Runtime
from kimi_cli.soul.context import Context
from kimi_cli.soul.kimisoul import KimiSoul


def _make_flow() -> Flow:
nodes = {
"BEGIN": FlowNode(id="BEGIN", label="Begin", kind="begin"),
"END": FlowNode(id="END", label="End", kind="end"),
}
outgoing = {
"BEGIN": [FlowEdge(src="BEGIN", dst="END", label=None)],
"END": [],
}
return Flow(nodes=nodes, outgoing=outgoing, begin_id="BEGIN", end_id="END")


def test_flow_skill_registers_skill_and_flow_commands(runtime: Runtime, tmp_path: Path) -> None:
flow = _make_flow()
skill_dir = tmp_path / "flow-skill"
skill_dir.mkdir()
flow_skill = Skill(
name="flow-skill",
description="Flow skill",
type="flow",
dir=KaosPath.unsafe_from_local_path(skill_dir),
flow=flow,
)
runtime.skills = {"flow-skill": flow_skill}

agent = Agent(
name="Test Agent",
system_prompt="Test system prompt.",
toolset=EmptyToolset(),
runtime=runtime,
)
soul = KimiSoul(agent, context=Context(file_backend=tmp_path / "history.jsonl"))

command_names = {cmd.name for cmd in soul.available_slash_commands}
assert "skill:flow-skill" in command_names
assert "flow:flow-skill" in command_names
Loading