feat: skill 随插件自动注册,免去 extra_skill_dirs 配置
kimi.plugin.json 声明 skills:["./skills"],/plugins install 后 /skill kimi-eyes 经 PluginSkillSource 自动注册(源码 manifest.ts:100 + pluginSkillRoots 全链路证实);package.json files 补 skills/;README(中英)与网页把「两步配置」简化为「一步」(只声明 image_in)。1.0.7 → 1.0.8。
This commit is contained in:
1 parent
43f09c83f4
commit
5f797dc61a
5 files changed
+13
-21
No files matched your search
+3
-9
@@ -152,22 +152,16 @@ capabilities = [ "thinking", "tool_use", "image_in" ] # append image_in
|
||||
|
||||
The warning above says: on a text-only provider, declaring `image_in` and using **Alt-V paste** sends an `image_url` part to the provider and triggers a 400. But the same `image_in` declaration is harmless if you go through the **`/skill` command** instead — `/skill` renders the pasted image as an `Attached image file: <path>` **plain-text path**, producing no image part. This plugin ships a skill that exploits exactly this channel.
|
||||
|
||||
**One-time setup (two steps)**:
|
||||
**One-time setup**:
|
||||
|
||||
1. Declare `image_in` on the text-only model (only to pass the `/skill` frontend check; `/skill` sends no image part, so **no 400**):
|
||||
Declare `image_in` on the text-only model (only to pass the `/skill` frontend check; `/skill` sends no image part, so **no 400**):
|
||||
|
||||
```toml
|
||||
[models."opencode-go/deepseek-v4-flash"]
|
||||
capabilities = [ "thinking", "tool_use", "image_in" ] # append image_in
|
||||
```
|
||||
|
||||
2. Register the skill — add the plugin's `skills/` dir to the scan list in `~/.kimi-code/config.toml`:
|
||||
|
||||
```toml
|
||||
extra_skill_dirs = [ "D:/AIGC/Plugin/kimi-eyes/skills" ]
|
||||
```
|
||||
|
||||
> If the plugin lives elsewhere, use its actual `kimi-eyes/skills` path. After restarting the session, `/skill kimi-eyes` appears in the `/` completion menu.
|
||||
> The skill ships with the plugin — `kimi.plugin.json` declares `skills`, so after `/plugins install kimi-eyes` the `/skill kimi-eyes` command is auto-registered into the `/` completion menu. **No `extra_skill_dirs` needed.**
|
||||
|
||||
**Usage**:
|
||||
|
||||
|
||||
@@ -117,22 +117,16 @@ capabilities = [ "thinking", "tool_use", "image_in" ] # 追加 image_in
|
||||
|
||||
上面警告过:纯文本 provider 声明 `image_in` 后走 **Alt-V 粘贴**,图片会作为 `image_url` part 发给 provider 触发 400。但同样声明 `image_in`,改走 **`/skill` 命令**就不会 400——`/skill` 通道把图片渲染成 `Attached image file: <路径>` 的**纯文本路径**,不产生 image part。本插件自带一个 skill 利用这条通道。
|
||||
|
||||
**一次性配置(两步)**:
|
||||
**一次性配置**:
|
||||
|
||||
1. 给纯文本模型声明 `image_in`(仅为通过 `/skill` 的前端校验;`/skill` 下图片不走 part,**不会**触发 400):
|
||||
给纯文本模型声明 `image_in`(仅为通过 `/skill` 的前端校验;`/skill` 下图片不走 part,**不会**触发 400):
|
||||
|
||||
```toml
|
||||
[models."opencode-go/deepseek-v4-flash"]
|
||||
capabilities = [ "thinking", "tool_use", "image_in" ] # 追加 image_in
|
||||
```
|
||||
|
||||
2. 注册 skill——在 `~/.kimi-code/config.toml` 把插件目录的 `skills/` 加入扫描:
|
||||
|
||||
```toml
|
||||
extra_skill_dirs = [ "D:/AIGC/Plugin/kimi-eyes/skills" ]
|
||||
```
|
||||
|
||||
> 插件装在别处就换成实际的 `kimi-eyes/skills` 目录。重启会话后 `/skill kimi-eyes` 会出现在 `/` 补全菜单。
|
||||
> skill 由插件自带——`kimi.plugin.json` 已声明 `skills`,`/plugins install kimi-eyes` 后 `/skill kimi-eyes` 自动注册到 `/` 补全菜单,**无需** `extra_skill_dirs`。
|
||||
|
||||
**用法**:
|
||||
|
||||
|
||||
+1
-1
@@ -431,7 +431,7 @@ npx kimi-eyes setup
|
||||
@截图.png 这个图里有什么? <span class="cmt"># → read_image</span>
|
||||
分析这张截图 <span class="cmt"># → read_clipboard_image</span>
|
||||
|
||||
<span class="cmt"># 纯文本模型想「粘贴」看图(需先声明 image_in + 注册 skill,详见 README):</span>
|
||||
<span class="cmt"># 纯文本模型想「粘贴」看图(需先声明 image_in;skill 随插件自动注册,详见 README):</span>
|
||||
/skill kimi-eyes 这张图说明什么? <span class="cmt"># 然后 Alt-V 粘贴图片,回车</span></pre>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+4
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "kimi-eyes",
|
||||
"version": "1.0.7",
|
||||
"version": "1.0.8",
|
||||
"description": "Give non-multimodal models vision: analyze local images and clipboard screenshots through a user-configured VLM API (OpenAI-compatible or Anthropic protocol).",
|
||||
"keywords": [
|
||||
"vision",
|
||||
@@ -17,6 +17,9 @@
|
||||
"longDescription": "读取本地图片或剪贴板截图,调用用户自配的多模态 API(OpenAI 兼容或 Anthropic 协议)返回描述。多模态模型不受影响,粘贴即原生看图。"
|
||||
},
|
||||
"systemPromptPath": "./SYSTEM.md",
|
||||
"skills": [
|
||||
"./skills"
|
||||
],
|
||||
"mcpServers": {
|
||||
"kimi-eyes": {
|
||||
"command": "node",
|
||||
|
||||
+2
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "kimi-eyes",
|
||||
"version": "1.0.7",
|
||||
"version": "1.0.8",
|
||||
"description": "Give non-multimodal models in Kimi Code the ability to analyze images and screenshots via a user-configured VLM (OpenAI-compatible or Anthropic protocol).",
|
||||
"keywords": [
|
||||
"kimi",
|
||||
@@ -24,6 +24,7 @@
|
||||
"files": [
|
||||
"mcp/",
|
||||
"scripts/",
|
||||
"skills/",
|
||||
"SYSTEM.md",
|
||||
"kimi.plugin.json",
|
||||
"setup.mjs",
|
||||
|
||||
Reference in new issue
Block a user