agent-browser
Browser automation CLI for AI agents. Use when needs to interact with websites, including navigating pages, filling forms,…
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.
$ npx -y skills add archibate/dotfiles-opencode --skill glm-vision --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/glm-visionContext preview
The summary Claude sees to decide when to auto-load this skill.
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.
name: glm-vision description: 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. version: 0.1.0
使用智谱 GLM-4.6V 多模态模型分析图片内容。支持:
当用户发送图片并提出以下类型问题时触发:
需要设置 `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"]
参数说明:
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)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. **返回结果**: 解析并展示分析结果
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
python3 ~/.claude/skills/glm-vision/scripts/analyze_image.py \ -i "/tmp/document.png" \ -p "提取图片中的所有文字,保持原有格式"
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
小彭老师现在改用claude code的开源替代opencode,满足了开源人士旺盛的定制需求x(其实opencode中也可以继续用claude的闭源模型,只是换成了开源的opencode客户端) 安装方法:SETUP.md
Browser automation CLI for AI agents. Use when needs to interact with websites, including navigating pages, filling forms,…
Review common AI slops of defensive programming patterns, avoid silent errors. TRIGGER when reviewing code for defensive…
Guide for writing ast-grep rules to perform structural code search and analysis. This skill should be used when users need to…
Best practices for AI-driven English-to-Chinese translation. This skill should be used when the user asks to "translate to…
This skill should be used when the user asks to "use bilibili API", "download bilibili video", "get bilibili user info", "list…
Interact with local Chrome browser session (only on explicit user approval after being asked to inspect, debug, or interact with…