openai-vision
БесплатноБез исполняемых скриптовНе проверенAnalyze images and multi-frame sequences using OpenAI GPT vision models
от benchflow-ai★ 1 941 звезда на GitHubОб этом скилле
OpenAI Vision Analysis Skill
Purpose
This skill enables image analysis, scene understanding, text extraction, and multi-frame comparison using OpenAI's vision-capable GPT models (e.g., gpt-4o, gpt-4o-mini). It supports single images, multiple images for comparison, and sequential frames for temporal analysis.
When to Use
- Analyzing image content (objects, scenes, colors, spatial relationships)
- Extracting and reading text from images (OCR via vision models)
- Comparing multiple images to detect differences or changes
- Processing video frames to understand temporal progression
- Generating detailed image descriptions or captions
- Answering questions about visual content
Required Libraries
The following Python libraries are required:
from openai import OpenAI
import base64
import json
import os
from pathlib import Path
Input Requirements
- File formats: JPG, JPEG, PNG, WEBP, non-animated GIF
- Image sources: URL, Base64-encoded data, or local file paths
- Size limits: Up to 20MB per image; total request payload under 50MB
- Maximum images: Up to 500 images per request
- Image quality: Clear, legible content; avoid watermarks or heavy distortions
Output Schema
Analysis results should be returned as valid JSON conforming to this schema:
{
"success": true,
"images_analyzed": 1,
"analysis": {
"description": "A detailed scene description...",
"objects": [
{"name": "car", "color": "red", "position": "foreground center"},
{"name": "tree", "count": 3, "position": "background"}
],
"text_content": "Any text visible in the image...",
"colors": ["blue", "green", "white"],
"scene_type": "outdoor/urban"
},
"comparison": {
"differences": ["Object X appeared", "Color changed from A to B"],
"similarities": ["Background unchanged", "Layout consistent"]
},
"metadata": {
"model_used": "gpt-4o",
"detail_level": "high",
"token_usage": {"prompt": 1500, "completion": 200}
},
"warnings": []
}
Field Descriptions
success: Boolean indicating whether analysis completedimages_analyzed: Number of images processed in the requestanalysis.description: Natural language description of the image contentanalysis.objects: Array of detected objects with attributesanalysis.text_content: Any text extracted from the imageanalysis.colors: Dominant colors identifiedanalysis.scene_type: Classification of the scenecomparison: Present when multiple images are analyzed; describes differences and similaritiesmetadata.model_used: The GPT model used for analysismetadata.detail_level: Resolution level used (low,high, orauto)metadata.token_usage: Token consumption for cost trackingwarnings: Array of any issues or limitations encountered
Code Examples
Basic Image Analysis from URL
from openai import OpenAI
client = OpenAI()
def analyze_image_url(image_url, prompt="Describe this image in detail."):
"""Analyze an image from a URL using GPT-4o vision."""
response = client.chat.completions.create(
model="gpt-4o",
messages=[
{
"role": "user",
"content": [
{"type": "text", "text": prompt},
{
"type": "image_url",
"image_url": {
"url": image_url,
"detail": "high"
}
}
]
}
],
max_tokens=1000
)
return response.choices[0].message.content
Image Analysis from Local File (Base64)
from openai import OpenAI
import base64
client = OpenAI()
def encode_image_to_base64(image_path):
"""Encode a local image file to base64."""
with open(image_path, "rb") as image_file:
return base64.standard_b64encode(image_file.read()).decode("utf-8")
def get_image_media_type(image_path):
"""Determine the media type based on file extension."""
ext = image_path.lower().split('.')[-1]
media_types = {
'jpg': 'image/jpeg',
'jpeg': 'image/jpeg',
'png': 'image/png',
'gif': 'image/gif',
'webp': 'image/webp'
}
return media_types.get(ext, 'image/jpeg')
def analyze_local_image(image_path, prompt="Describe this image in detail."):
"""Analyze a local image file using GPT-4o vision."""
base64_image = encode_image_to_base64(image_path)
media_type = get_image_media_type(image_path)
response = client.chat.completions.create(
model="gpt-4o",
messages=[
{
"role": "user",
"content": [
{"type": "text", "text": prompt},
{
"type": "image_url",
"image_url": {
"url": f"data:{media_type};b
Установить openai-vision в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл openai-vision?
Analyze images and multi-frame sequences using OpenAI GPT vision models
Как установить скилл openai-vision?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл openai-vision запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic