본문으로 건너뛰기
cccskills
무료GitHub에 공개

glm-vision

This skill should be used when the user sends an image and asks to "analyze this image", "describe this picture", "what's in this image", or any request requiring visual understanding of images. Provides image analysis using Zhipu GLM-4.6V multimodal model.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

연동 도구OpenAI
설치 방법 보기

포함된 파일(3)

  • SKILL.md4.1 KB
  • references/api-reference.md4.5 KB
  • scripts/analyze_image.py4.4 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

GLM Vision - 图片分析技能

概述

使用智谱 GLM-4.6V 多模态模型分析图片内容。支持:

  • 图片内容描述和理解
  • 图片中的文字提取(OCR)
  • 图片元素识别和分析
  • 多图对比分析
  • 视频内容理解

使用场景

当用户发送图片并提出以下类型问题时触发:

  • "这张图片里有什么?"
  • "请描述这张图片"
  • "分析这个截图"
  • "这是什么?"
  • "图片里的文字是什么?"
  • "比较这两张图片"

API 配置

环境变量

需要设置 ZHIPU_API_KEY 环境变量:

export ZHIPU_API_KEY="your-api-key-here"

或者在 ~/.claude/settings.json 中配置:

{
  "env": {
    "ZHIPU_API_KEY": "your-api-key-here"
  }
}

模型选择

模型用途价格
glm-4.6v-flash免费版,日常使用免费
glm-4.6v旗舰版,复杂推理付费
glm-4.6v-flashx轻量高速版付费

默认使用 glm-4.6v-flash 免费模型。

调用方式

方式一:使用辅助脚本(推荐)

python3 ~/.claude/skills/glm-vision/scripts/analyze_image.py \
  --image "/path/to/image.jpg" \
  --prompt "请描述这张图片" \
  [--model "glm-4.6v-flash"]

参数说明:

  • --image / -i: 图片路径(支持 URL 或本地文件)
  • --prompt / -p: 分析提示词
  • --model / -m: 模型名称(可选,默认免费版)
  • --detail / -d: 启用详细思考模式

方式二:直接 API 调用

import base64
from openai import OpenAI

client = OpenAI(
    api_key=os.environ.get("ZHIPU_API_KEY"),
    base_url="https://open.bigmodel.cn/api/paas/v4"
)

# 读取本地图片
with open("image.jpg", "rb") as f:
    img_base64 = base64.b64encode(f.read()).decode("utf-8")

response = client.chat.completions.create(
    model="glm-4.6v-flash",
    messages=[{
        "role": "user",
        "content": [
            {"type": "image_url", "image_url": {"url": img_base64}},
            {"type": "text", "text": "请描述这张图片"}
        ]
    }]
)
print(response.choices[0].message.content)

方式三:URL 图片

response = client.chat.completions.create(
    model="glm-4.6v-flash",
    messages=[{
        "role": "user",
        "content": [
            {"type": "image_url", "image_url": {"url": "https://example.com/image.jpg"}},
            {"type": "text", "text": "分析这张图片"}
        ]
    }]
)

工作流程

  1. 接收图片: 用户发送图片,保存到临时目录
  2. 构建请求: 将图片转为 base64 或使用 URL
  3. 调用 API: 发送到 GLM-4.6V 模型
  4. 返回结果: 解析并展示分析结果

支持的图片格式

  • JPEG / JPG
  • PNG
  • GIF(静态)
  • WebP
  • BMP

示例用法

基础图片描述

python3 ~/.claude/skills/glm-vision/scripts/analyze_image.py \
  -i "/tmp/screenshot.png" \
  -p "描述这张截图的内容"

详细分析

python3 ~/.claude/skills/glm-vision/scripts/analyze_image.py \
  -i "/tmp/photo.jpg" \
  -p "分析这张图片的构图、色彩和主题" \
  --detail

OCR 文字提取

python3 ~/.claude/skills/glm-vision/scripts/analyze_image.py \
  -i "/tmp/document.png" \
  -p "提取图片中的所有文字,保持原有格式"

URL 图片分析

python3 ~/.claude/skills/glm-vision/scripts/analyze_image.py \
  -i "https://example.com/image.jpg" \
  -p "这张图片展示的是什么?"

注意事项

  1. API Key 安全: 不要在代码中硬编码 API Key
  2. 图片大小: 建议图片小于 10MB,过大的图片会增加延迟
  3. 网络连接: 需要稳定的网络访问智谱 API
  4. 并发限制: 免费用户并发数为 5

参考资源

  • references/api-reference.md - 完整 API 参考文档
  • scripts/analyze_image.py - 图片分析辅助脚本

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Browser automation CLI for AI agents. Use when needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. TRIGGER when user requests to "open a website", "fill out a form", "click a button", "take a screenshot", "debug this in browser", "scrape data from a page", "test this web app", "login to a site", "frontend UI/UX aesthetics", "automate browser actions", or any task requiring programmatic web interaction.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

archibate/dotfiles-opencode1082026년 4월 29일 업데이트

Review common AI slops of defensive programming patterns, avoid silent errors. TRIGGER when reviewing code for defensive anti-patterns, writing fail-fast code, or auditing error handling quality.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

archibate/dotfiles-opencode1082026년 4월 29일 업데이트

ast-grep

무료

Guide for writing ast-grep rules to perform structural code search and analysis. This skill should be used when users need to search codebases using Abstract Syntax Tree (AST) patterns, find specific code structures, or perform complex code queries that go beyond simple text search, or when a simple grep/glob search is insufficient for structural code pattern matching.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

archibate/dotfiles-opencode1082026년 4월 29일 업데이트

Best practices for AI-driven English-to-Chinese translation. This skill should be used when the user asks to "translate to Chinese", "update the Chinese translation", "improve Chinese translation", "fix translation quality", "review Chinese translation", or when translating any English text into Chinese. Also applies when polishing an existing Chinese translation of English content.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

archibate/dotfiles-opencode1082026년 4월 29일 업데이트

This skill should be used when the user asks to "use bilibili API", "download bilibili video", "get bilibili user info", "list bilibili favorites", "send bilibili danmaku", "upload video to bilibili", "monitor bilibili live room", "search bilibili", "get bilibili comments", or needs guidance on the bilibili_api Python library usage, authentication, API endpoints, or workflow patterns.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

archibate/dotfiles-opencode1082026년 4월 29일 업데이트

This skill should be used when sending images, files, or notifications back to the user via messaging platforms (Discord, Feishu, Telegram, etc.) through cc-connect. TRIGGER when agent generates a plot/chart/screenshot and wants to show the user; agent creates a report/PDF/file the user should receive; agent needs to proactively notify the user (e.g. task completed, alert, reminder); user asks to "send image", "show me the chart", "notify me", "send the file", "send to Telegram", "show plot in Discord".

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

archibate/dotfiles-opencode1082026년 4월 29일 업데이트

archibate의 스킬 모두 보기

이 스킬의 문제 신고