初始发布: 21 个 skills (Claude Code / Codex / DSH)
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
---
|
||||
name: minimax-vision
|
||||
description: 用 MiniMax-M3(火山方舟 Coding Plan)做图像识别与理解。触发关键词:「看图」「识图」「这张图」「图片里有什么」「读一下截图」「OCR」「识别文字」「看看这个截图」「分析这张图」「图表数据提取」「图像识别」「minimax 看图」。当用户直接发送图片、没有附带其他明确指令时,也自动调用本技能识图。能力:物体/颜色/计数识别、OCR 文字提取(含数字符号)、图表数据读取、空间关系判断、UI 截图分析、多图对比。不用于:生成图片(那是 glm-image / seedream)。
|
||||
---
|
||||
|
||||
# MiniMax-M3 图像识别
|
||||
|
||||
调用火山方舟 Coding Plan 的 `minimax-m3` 视觉模型识别图片。实测 4/4 满分(计数/OCR/图表/空间关系),平均响应约 3 秒。
|
||||
|
||||
## 脚本
|
||||
|
||||
`scripts/vision.py`(Python 3 标准库,无第三方依赖)
|
||||
|
||||
## API Key
|
||||
|
||||
优先读环境变量 `ARK_CP_API_KEY`,否则读 `~/.config/ark_cp_api_key`。不要把 key 写进代码或提交到仓库。
|
||||
|
||||
用的是火山**Coding Plan** 端点 `https://ark.cn-beijing.volces.com/api/coding/v3`(和 Agent Plan 的 key 不通用)。
|
||||
|
||||
## 用法
|
||||
|
||||
```bash
|
||||
V=~/.codex/skills/minimax-vision/scripts/vision.py
|
||||
|
||||
# 默认: 描述图片
|
||||
python3 "$V" screenshot.png
|
||||
|
||||
# 指定问题
|
||||
python3 "$V" invoice.png -p "提取发票号和总金额"
|
||||
|
||||
# OCR
|
||||
python3 "$V" doc.jpg -p "把图中所有文字原样读出来,只输出文字"
|
||||
|
||||
# 图表取数
|
||||
python3 "$V" chart.png -p "这个柱状图每根柱子的数值分别是多少?"
|
||||
|
||||
# 结构化输出(自动追加"只输出JSON"约束)
|
||||
python3 "$V" form.png -p "提取表单字段" --json
|
||||
|
||||
# 多图对比
|
||||
python3 "$V" before.png after.png -p "这两张图有什么不同?"
|
||||
|
||||
# 网络图片
|
||||
python3 "$V" https://example.com/pic.jpg -p "图里是什么?"
|
||||
|
||||
# 看耗时/token/request_id(输出到 stderr,不污染正文)
|
||||
python3 "$V" a.png --detail
|
||||
|
||||
# 长提问从 stdin 读
|
||||
cat question.txt | python3 "$V" a.png -p -
|
||||
```
|
||||
|
||||
## 参数
|
||||
|
||||
- `-p/--prompt` 提问,默认"详细描述这张图片的内容";传 `-` 从 stdin 读
|
||||
- `--json` 追加"只输出 JSON"约束,便于程序解析
|
||||
- `--max-tokens` 默认 2048;**返回空内容时优先调大这个值**(推理可能吃光额度)
|
||||
- `--detail` 在 stderr 打印耗时 / token 用量 / request_id
|
||||
|
||||
## 注意
|
||||
|
||||
- 支持 png/jpg/webp/gif 等常见格式,本地文件自动转 base64,http(s) 链接直接透传
|
||||
- 图片越大越慢,超大图建议先压到 2000px 以内
|
||||
- 报错 `模型返回空内容` → 加大 `--max-tokens`
|
||||
- 报错 401 → 检查 key 是不是拿成了 Agent Plan 的(两个套餐 key 不通用)
|
||||
Reference in New Issue
Block a user