> For the complete documentation index, see [llms.txt](https://getsquish.gitbook.io/squish/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://getsquish.gitbook.io/squish/zh/shi-pu/agent-skill.md).

# 安装 agent 技能

该 **`视频导航`** skill 是一个可直接接入的协议文档，教会 agent 整套流程：当拿到一段无法直接摄取的视频时，把它压缩成带时间戳的 contact sheet（联系表），读取网格，再用 `start`/`end` 不要猜测，引用前先确认，并用绝对时间码作答。安装了这个 skill 的 agent 会自动调用 Squish；你完全不用在提示词里解释工作流程。它遵循开源 [Agent 技能](https://agentskills.io) 格式，因此它能在任何会读取 `SKILL.md` skills。

## 存放位置

[`skills/video-navigation/SKILL.md`](https://github.com/getsquish/squish/tree/main/skills/video-navigation/README.md) 位于 [github.com/getsquish/squish](https://github.com/getsquish/squish)。它在 frontmatter（头部元数据）中声明了自己的需求：一个 contact-sheet 工具——本地运行的 Squish CLI/MCP（Node ≥ 20， `ffmpeg` 在 PATH 中）或托管连接器。

## 使用 skills CLI 安装（推荐）

一条命令，可跨 Claude Code、Cursor、Codex，以及其他所有由 [`skills` CLI](https://github.com/vercel-labs/skills) 支持：

```bash
npx skills add getsquish/squish
```

## 手动安装（Claude Code）

Claude Code 将 skills 识别为 `SKILL.md` skills 目录中的文件。将该文件复制到一个以该 skill 命名的文件夹中：

```bash
mkdir -p ~/.claude/skills/video-navigation
curl -o ~/.claude/skills/video-navigation/SKILL.md \
  https://raw.githubusercontent.com/getsquish/squish/main/skills/video-navigation/SKILL.md
```

使用项目的 `.claude/skills/` 目录，而不是 `~/.claude/skills/` ，可将该 skill 限定到单个仓库。该 skill 的 `描述` frontmatter（头部元数据）会告诉 agent 何时触发它——无需再做额外连接。将它与 [MCP server](/squish/zh/ru-men/quickstart-mcp.md) 配合使用，流程最顺畅：该 skill 会优先使用 `squish_video` 工具（如果存在），并在没有时回退为通过 `npx`.

## 在其他任何地方安装

该文件只是普通 markdown，带有一小段 YAML frontmatter——其中没有任何框架特定内容。对于其他任何 agent 框架，要么把它放到该框架加载 skill/指令文件的位置，要么把正文粘贴到 agent 的 system prompt 或自定义指令里。真正的要求只有 skill 里写明的那些：agent 需要视觉能力，以及一个 contact-sheet 工具——shell 访问（Node ≥ 20， `ffmpeg`）或 `squish_video` MCP 工具。

## 示例：Hermes

这个 skill 的一个变体随 Hermes agent 框架一起提供（`squish-video`，见本项目的集成文档）。有两条约定值得你在从我们的版本改造任何 skill 时借鉴：

**固定的回答格式。** Hermes skill 禁止只用文件路径作答，并规定了以下响应结构：

1. **摘要** —— 这段片段展示了什么，用一两句话说明。
2. **带时间戳的关键时刻** —— 重要事件，每一项都引用到某个 cell 的时间码。
3. **值得注意的画面 / 异常** —— 任何异常之处及其时间码；如果没有，就直接说明没有。

如果用户的问题很具体（“找到……发生的时刻”），就先给出答案和时间戳。这会把“agent 做了一张表”变成“agent 回答了问题”。

**明确范围。** 它只限定于本地视频文件路径——如果视频是聊天附件或 URL，它会先要求提供本地路径——而当问题与视频的视觉内容无关时，则完全跳过这套流程。

## agent 什么时候该使用它——以及什么时候不该

当视频太长或太大，无法直接摄取时；当问题涉及时间跨度（之前/之后、场景切换、进度、“找到……发生的时刻”）时；或者当答案需要精确引用（“在 0:07 时压机落下”）时，就使用这个 skill。

如果用户只需要某一张具体画面（直接提取那一帧即可），或者问题无法通过画面证据或活动时间来回答，就跳过它。Local Squish 0.3+ 会把音频活动也作为导航信号——不是语音或声音解析。参见 [FAQ](/squish/zh/zi-yuan/faq.md) 了解口型级边界。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://getsquish.gitbook.io/squish/zh/shi-pu/agent-skill.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
