EN 中文

# Skills Lifecycle

# Skill 生命周期

Create, install, update, uninstall, and invoke reusable skill packages.

创建、安装、更新、卸载和调用可复用的技能包。

Skills are reusable instruction sets stored as Markdown files. The agent can fetch a skill's body on demand via the `Skill` tool, then follow its steps. Think of them as named workflows: "run Go tests", "do a dual-model review", etc.

Skill 是以 Markdown 文件存储的可复用指令集。agent 可以通过 `Skill` 工具按需获取技能内容并执行步骤。可以理解为命名的工作流：「运行 Go 测试」、「进行双模型审查」等。

## Search Order

## 搜索顺序

seek discovers skills from three locations (lower number wins on name collision):

seek 从三个位置发现技能（编号越小优先级越高）：

# | Location | 位置 | Notes
--- | --- | --- | ---
1 | `<project>/.seek/skills/` | Project-local, committed to git | 项目本地，提交到 git
2 | `~/.seek/skills/` (or `$SEEK_HOME/skills`) | User-global | 用户全局
3 | Built-in | Bundled with seek; always available | 内置于 seek，始终可用

## Built-in Skills

## 内置技能

Name | 名称 | When to use | 使用时机
--- | --- | --- | ---
dual-model | Non-trivial multi-step tasks — plans with V4 reasoning, executes with chat, then reviews | 非平凡多步骤任务——先用 V4 推理规划，再用聊天执行，最后审查
go-test-runner | Running, debugging, or analyzing Go test failures | 运行、调试或分析 Go 测试失败

## Writing a Skill

## 编写 Skill

Create a `.md` file with YAML frontmatter:

创建一个包含 YAML frontmatter 的 `.md` 文件：

    ---
    name: my-deploy
    description: Deploy the service to staging. Use when asked to deploy.
    ---

    1. Run `bash("make build")` to produce the binary.
    2. Run `bash("make deploy-staging")` to push.
    3. Confirm with `curl https://staging.example.com/health`.

## Directory-Package Format (v2)

## 目录包格式 (v2)

Since seek v0.3, a skill can be a directory package (`<name>/SKILL.md` + frontmatter), aligned with the Anthropic Agent Skills format. This enables extra metadata (version, license, allowed tools) and bundling of reference files:

自 seek v0.3 起，skill 可以是目录包格式（`<name>/SKILL.md` + frontmatter），与 Anthropic Agent Skills 格式兼容。支持额外元数据和参考文件：

    my-skill/
    ├── SKILL.md          # skill body with frontmatter
    ├── references/       # optional reference docs
    ├── examples/         # optional usage examples
    └── scripts/          # optional helper scripts

## Managing Skills (CLI)

## 管理 Skill（CLI）

Command | Description | 说明
--- | --- | ---
seek skill create <name> | Scaffold a new skill package with SKILL.md template | 用模板创建新 skill 包
seek skill install <path> | Install from local path, Git URL, or HTTPS tarball | 从本地路径/Git URL/HTTPS 压缩包安装
seek skill list | List all loaded skills with source and version | 列出所有已加载 skill
seek skill status <name> | Show detailed info for one skill | 查看单个 skill 详情
seek skill stats | Show usage statistics (call count, last used) | 查看使用统计
seek skill update <name> | Re-pull a skill from its install source | 从安装源重新拉取
seek skill uninstall <name> | Remove a skill | 卸载 skill

All commands are also available in the TUI via `/skill <verb> [args]`, which mirrors the CLI (shared dispatcher).

所有命令也可以通过 TUI 的 `/skill <verb> [args]` 使用（共享同一份 dispatcher）。

📖 For migration details and examples, see `docs/guide-skills.md`. 📖 迁移细节和示例见 `docs/guide-skills.md`。