SkillsGrove
SkillsGrove/Office documents/Asonlino/Visuals-Skill/visuals-skill

visuals-skill

Installation

$npx skills add https://github.com/Asonlino/Visuals-Skill --skill visuals-skill
$git clone --depth 1 https://github.com/Asonlino/Visuals-Skill.git /tmp/Visuals-Skill && mkdir -p ~/.claude/skills && cp -r /tmp/Visuals-Skill/. ~/.claude/skills/visuals-skill
Please install this Agent Skill for me: https://github.com/Asonlino/Visuals-Skill/tree/180509ef9f7df2e26b168a33bd8b468cdfb93ac2/ — read its SKILL.md and scripts first, and only install it into my skills folder once you have confirmed it is safe.

Summary

Original description · MIT为纯推理模型提供图像/文档理解能力的桥梁技能。当用户消息中包含图片、截图、照片、图表、扫描件、PDF、Word、PPT、Excel等视觉/文档内容,或者用户要求分析/识别/提取图片或文档信息时,必须使用此技能。它将图像通过GLM-4-Flash视觉模型转换为完整的文字描述(语义、布局、图表数据),同时用MinerU精准解析API进行结构化文字提取保障,最终合并输出纯文本供推理模型使用。适用于:图片内容理解、截图文字提取、图表数据读取、文档扫描件数字化、UI界面分析、照片场景描述、PDF/Word/PPT/Excel文档解析等任何涉及图像或文档的场景。
The SKILL.md below is reproduced from Asonlino/Visuals-Skill (commit 180509e) under the MIT license. The text is unchanged; only the file header metadata is omitted, images are shown as links, and very long files are truncated. Copyright 2026 Visuals Skill Contributors. License: LICENSE. Only the instructions file is shown; see the original repository for any scripts.

Visuals Skill

为纯推理模型(text-only)提供图像理解能力的桥梁。将图像通过 glm-4.6v-flash 视觉模型转换为深度结构化文字描述,同时用 MinerU 精准解析 API 进行结构化文字提取保障,最终合并输出纯文本供推理模型使用。

工作原理

                     ┌──→ glm-4.6v-flash(10维度深度语义描述)
                     │    原图直传(base64),temperature=0,thinking=disabled
用户文件 ──┤        固定标签:TYPE/SUMMARY/SCENE/TEXT/DATA/LAYOUT/COLOR/OBJECTS/QUALITY/PURPOSE
                     │
                     └──→ MinerU 精准解析(结构化文字提取)
                          原图直传,vlm模型,全功能开启
                    │
         合并 ←─────┘
           ↓
   固定格式纯文本 → 推理模型(context cache友好)
  • GLM视觉:深度语义理解——10个专业维度的结构化描述
  • MinerU解析:精确文字提取——Markdown格式的结构化内容
  • 图片文件:GLM + MinerU 并行执行,结果合并
  • 文档文件:仅MinerU(GLM不支持非图片格式)

快速开始

1. 配置 API Key

export GLM_API_KEY="your-glm-key"
export MINERU_API_KEY="your-mineru-key"

或编辑 config/config.json(从 config.example.json 复制)。

2. 运行

# 图片文件(GLM + MinerU并行)
python scripts/image_to_text.py --image photo.png

# 文档文件(仅MinerU)
python scripts/image_to_text.py --image document.pdf

# JSON格式输出
python scripts/image_to_text.py --image file.pdf --format json

输出格式

<<<IMAGE_VISION_BEGIN>>>
[GLM_VISION]
[TYPE]
图片类型及判断依据
[SUMMARY]
核心内容概括
[SCENE]
场景详细描述
[TEXT]
所有可见文字
[DATA]
图表数据点
[LAYOUT]
版面结构
[COLOR]
配色方案
[OBJECTS]
可识别对象
[QUALITY]
图片质量评估
[PURPOSE]
用途推断
[MINERU_OCR]
(MinerU提取的Markdown文字)
[STATUS] glm=ok ocr=ok
[FP] a81f9f44
<<<IMAGE_VISION_END>>>

固定结构标记 + 10个固定标签 + 内容指纹,便于下游推理模型的 context cache 命中。

脚本说明

脚本 作用
scripts/image_to_text.py 主入口,编排GLM+MinerU,规范化输出
scripts/glm_vision.py glm-4.6v-flash API调用,图片→10维度描述
scripts/mineru_ocr.py MinerU精准解析API,文件→Markdown文字
scripts/config.py 配置管理(GLM+MinerU双Key、模型参数)

支持的文件格式

类别 格式 处理方式
图片 PNG, JPG, JPEG, JP2, WebP, GIF, BMP GLM + MinerU并行
PDF PDF 仅MinerU
Word DOC, DOCX 仅MinerU
PPT PPT, PPTX 仅MinerU
Excel XLS, XLSX 仅MinerU

参考文档

View full license text (MIT)
MIT License

Copyright (c) 2026 Visuals Skill Contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.