> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blon.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Skills

> 讓 Claude Code、Codex 或 Cursor 用 Blon 生成。

Blon 提供任務式的 [Agent Skills](https://www.anthropic.com/engineering/equipping-agents-for-the-real-world-with-agent-skills)，給支援 `SKILL.md` 格式的 coding agent 使用。每個 skill 告訴 agent 何時使用、該執行哪些 `blon` 指令，以你的 Blon 帳號與點數生成。

## 安裝

> [!NOTE]
>
> Skills 透過 `blon` CLI 執行，而 CLI 尚未發行到 npm；以下步驟在第一個版本發行後即可使用。

**1. 安裝 CLI 並登入**

```bash theme={null}
npm i -g @blon/cli && blon auth login
```

登入時會開啟瀏覽器請你核准，詳見 [CLI](https://docs.blon.ai/zh-TW/cli.md)。

**2. 加入 Skills**

```bash theme={null}
npx skills add https://github.com/BlonAI/social-web/tree/main/skills
```

只安裝其中一個：

```bash theme={null}
npx skills add https://github.com/BlonAI/social-web/tree/main/skills --skill generate-image
```

## 可用的 Skills

| Skill | 用途 | 預設模型 |
| - | - | - |
| [`generate-image`](https://github.com/BlonAI/social-web/tree/main/skills/generate-image) | 從文字產生圖片 | `nano-banana-2-lite` |
| [`generate-video`](https://github.com/BlonAI/social-web/tree/main/skills/generate-video) | 從文字或圖片製作影片 | `seedance-2.0` |
| [`generate-voiceover`](https://github.com/BlonAI/social-web/tree/main/skills/generate-voiceover) | 把腳本轉成旁白 | `minimax-speech-2.8-hd` |

直接用一般語句請 agent 處理，例如「生成一張 16:9 的陶瓷茶壺橫幅」，或以 `/generate-image` 直接呼叫。agent 會執行 `blon generate … --wait --json`、讀取工作 JSON，並回給你產物網址與 asset id。你指定的本機檔案會自動上傳。

## Agent 如何處理失敗

Skills 依 CLI 的離開碼處理：

| 離開碼 | Agent 的處理 |
| - | - |
| `1` | 轉達訊息；401 時請你重新執行 `blon auth login` |
| `2` | 轉達工作錯誤，不會自行重送付費工作 |
| `3` | 停止並告訴你餘額不足 |

影片等待中斷時，以 `blon jobs wait <id>` 接續，不會重新提交。

## CI

在 CI 中把 `BLON_API_KEY` 設為 `blon_api_` 金鑰，略過 `blon auth login`；此時花的是金鑰所屬工作區的餘額，而不是你的點數。


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