From 5f797dc61aa5898134771e9bcdea7e49aa4c96be Mon Sep 17 00:00:00 2001 From: billowliu2 Date: Sun, 2 Aug 2026 18:19:46 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20skill=20=E9=9A=8F=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E6=B3=A8=E5=86=8C=EF=BC=8C=E5=85=8D=E5=8E=BB?= =?UTF-8?q?=20extra=5Fskill=5Fdirs=20=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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。 --- README.en.md | 12 +++--------- README.md | 12 +++--------- docs/index.html | 2 +- kimi.plugin.json | 5 ++++- package.json | 3 ++- 5 files changed, 13 insertions(+), 21 deletions(-) diff --git a/README.en.md b/README.en.md index 930612c..2269c2b 100644 --- a/README.en.md +++ b/README.en.md @@ -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: ` **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**: diff --git a/README.md b/README.md index 4b50bb2..bb0c19b 100644 --- a/README.md +++ b/README.md @@ -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`。 **用法**: diff --git a/docs/index.html b/docs/index.html index 31ee88f..5344c24 100644 --- a/docs/index.html +++ b/docs/index.html @@ -431,7 +431,7 @@ npx kimi-eyes setup @截图.png 这个图里有什么? # → read_image 分析这张截图 # → read_clipboard_image -# 纯文本模型想「粘贴」看图(需先声明 image_in + 注册 skill,详见 README): +# 纯文本模型想「粘贴」看图(需先声明 image_in;skill 随插件自动注册,详见 README): /skill kimi-eyes 这张图说明什么? # 然后 Alt-V 粘贴图片,回车 diff --git a/kimi.plugin.json b/kimi.plugin.json index 69cc3ff..7062862 100644 --- a/kimi.plugin.json +++ b/kimi.plugin.json @@ -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", diff --git a/package.json b/package.json index 1752bdf..d872433 100644 --- a/package.json +++ b/package.json @@ -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",