Files
jsc-plugins/plugins/anime-companion/README.md
T
Jeffery (jiantw83)andClaude Sonnet 5.5 697ed6a0b9 feat: 亞絲娜與直葉的角色包 (#6, #7)
build_pack.py 產生對白索引(放在使用者資料目錄);render_skill.py 把人格卡渲染成
角色 skill 並檢查精選對白逐字來自索引;插件改成執行期從資料目錄讀索引。

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-14 20:52:40 +00:00

51 lines
2.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# anime-companion
用輕小說角色的個性與語氣取代 Claude 與你對話,並照常協助你做事。
狀態:0.0.1。兩個角色的人格卡已建置;對白索引要先在本機產生(見「對白檢索」),進度見 [議題](https://gitea.jsc.idv.tw/jiantw83/jsc-plugins/issues)。
## 安裝
```bash
claude plugin marketplace add https://gitea.jsc.idv.tw/jiantw83/jsc-plugins.git
claude plugin install anime-companion@jsc-plugins
```
## 角色
以 `anime-companion:{作品代號}-{角色代號}` 啟動:
| 指令 | 角色 |
| --- | --- |
| `/anime-companion:sao-asuna` | 亞絲娜(《刀劍神域》) |
| `/anime-companion:sao-suguha` | 直葉(莉法)(《刀劍神域》) |
## 設定
在 `/config` 的 anime-companion 設定,或寫在 settings.json 的 `pluginConfigs`。
| 欄位 | 預設 | 說明 |
| --- | --- | --- |
| `defaultCharacter` | `none` | 新 session 自動套用的角色:`none`、`sao-asuna`、`sao-suguha` |
| `intensity` | `2` | 0 不套角色;1 只換稱呼與句尾;2 前後各一個對話氣泡;3 再加動作旁白 |
| `showTiming` | `false` | 在狀態列顯示每則訊息的功能標籤分類耗時與結果 |
| `dataDir` | 空 | 對白索引所在目錄;留空用 `~/.claude/anime-companion` |
| `address` | 空 | 角色怎麼稱呼你;留空則依原作關係(亞絲娜「桐人」、直葉「哥哥」) |
缺失或無效的設定值一律退回預設。
## 開發
```bash
claude plugin validate plugins/anime-companion
claude plugin test plugins/anime-companion
```
## 對白檢索
每則使用者訊息送出時,hook 用 `$.model.complete`(Haiku、低 effort、3 秒逾時)判斷「角色接下來最自然的回應」屬於哪個功能標籤,再從該角色的對白索引取同標籤的 3 句,以一則只增不改的訊息附在使用者訊息之前,當語氣參考。
- 沒選角色、強度 0、索引為空、分類失敗、該標籤沒有對白時,都不注入,也不影響對話。
- 索引為空時不呼叫模型。索引由建置流水線產生,放在使用者資料目錄 `<dataDir>/<角色代號>/index.jsonl`(預設 `~/.claude/anime-companion`),不在插件裡;產生方式見 `tools/corpus/README.md`。沒有索引時只載入人格卡,不做檢索。
- 開 `showTiming` 可在狀態列看到每次分類的耗時。