image-editor
БесплатноБез исполняемых скриптовНе проверенInteractive visual editor for Instagram ad images. Use when editing generated images, adjusting text overlays, repositioning logos, or modifying ad visual…
от treasure-data★ 23 звезды на GitHubОб этом скилле
Instagram Studio Editor V2
Interactive drag-and-drop editor for Instagram ad overlays — headline text, brand text, and company logo. Renders instantly via render_react using a CSS gradient placeholder instead of an embedded image preview.
Architecture
render_react (editor in artifact panel)
├─ CSS gradient placeholder (NO base64)
├─ Draggable text overlays (headline + brand)
├─ Draggable logo overlay (position, size, opacity, variant, tint)
├─ Control panel (font, size, color, opacity, gradient)
└─ "Apply Changes" → copies config to clipboard
↓ (automatic)
Clipboard Poller (background task, polls pbpaste every 2s)
├─ Detects valid editor config JSON
└─ Writes to /tmp/editor_apply_ready.json
↓
Python/Pillow (auto-applies config to FULL-RES image)
├─ Composites logo with variant selection, opacity, tint
├─ Composites text with exact parameters
└─ Saves final PNG → opens via open_file
Key Constraints
render_reactsandbox blocksfile://,localhost,clipboard.writeText(), and postMessage- Data prop size correlates with load time: 0KB=instant, 2KB=30s, 12KB=4min+
- Solution: zero base64, CSS gradient placeholder,
execCommand("copy")fallback - macOS
pbpastepolls clipboard to bridge React sandbox back to Claude
Workflow
Trigger phrases: "open the editor", "studio editor", "visual editor", "edit this", "let me edit", "drag text", "move the text", "reposition headline", "adjust overlay"
Execution Order
- Claude starts clipboard poller as background task (
run_in_background: true) - Claude calls
render_reactwith editor component + tiny data prop (~600 bytes) - Claude calls
TaskOutputwith poller'stask_id,block: true,timeout: 300000 - User drags overlays, adjusts controls, clicks "Apply Changes"
- Poller detects config JSON on clipboard, writes to
/tmp/editor_apply_ready.json, exits - Claude reads config, runs Pillow applicator, opens final PNG via
open_file
Workflow note: This approach skips the Python prep step and base64 encoding. The clipboard poller automatically bridges the React sandbox using macOS pbpaste, so no manual paste is needed from the user.
Step 1: Build the Data Prop
Claude constructs this JSON directly — no Bash/Python needed:
{
"bgGradient": "linear-gradient(135deg, #1e3a5f 0%, #2a4a3f 30%, #3d5a3a 60%, #1a2f1a 100%)",
"headline": {
"text": "Adventure Awaits", "x": 512, "y": 939,
"fontSize": 72, "fontFamily": "helvetica",
"color": "#FFFFFF", "opacity": 100, "align": "center"
},
"brand": {
"text": "Outdoor Supply Co.", "x": 984, "y": 984,
"fontSize": 32, "fontFamily": "sans",
"color": "#FFF0D2", "opacity": 78, "align": "right"
},
"logo": {
"x": 884, "y": 40, "width": 100,
"opacity": 100, "tint": null, "variant": "auto"
},
"gradient": { "style": "medium", "position": "bottom", "alphaMax": 180 }
}
bgGradient Guidelines
Pick CSS gradient colors approximating the generated image's dominant colors:
- Nature/outdoor:
linear-gradient(135deg, #1e3a5f 0%, #2a4a3f 30%, #3d5a3a 60%, #1a2f1a 100%) - Sunset/warm:
linear-gradient(135deg, #8B4513 0%, #D2691E 40%, #FF8C00 70%, #FFD700 100%) - Urban/dark:
linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%) - Snow/bright:
linear-gradient(135deg, #e8e8e8 0%, #b0c4de 40%, #87ceeb 70%, #f0f8ff 100%) - Ocean/water:
linear-gradient(135deg, #006994 0%, #0077b6 40%, #00b4d8 70%, #90e0ef 100%)
Logo Data Prop
Default: top-right at x: width - logoWidth - 40, y: 40, width: 100, variant: "auto", tint: null, opacity: 100. Check brand guidelines for logo paths and adjust position from previous render.
Step 1.5: Start Clipboard Poller
Launch with run_in_background: true before calling render_react:
python3 << 'PYEOF'
import subprocess, json, time, hashlib, os
POLL_INTERVAL = 2
TIMEOUT = 300
MARKER_FILE = "/tmp/editor_apply_ready.json"
if os.path.exists(MARKER_FILE):
os.remove(MARKER_FILE)
result = subprocess.run(["pbpaste"], capture_output=True, text=True)
last_hash = hashlib.md5(result.stdout.strip().encode()).hexdigest()
start = time.time()
while time.time() - start < TIMEOUT:
time.sleep(POLL_INTERVAL)
result = subprocess.run(["pbpaste"], capture_output=True, text=True)
clip = result.stdout.strip()
clip_hash = hashlib.md5(clip.encode()).hexdigest()
if clip_hash != last_hash:
last_hash = clip_hash
try:
config = json.loads(clip)
if all(k in config for k in ["headline", "brand", "logo", "gradient"]):
with open(MARKER_FILE, "w") as f:
json.dump(config, f)
print("EDITOR_CONFIG_DETECTED")
break
except (json.JSONDecodeError, TypeError):
pass
if not os.path.exists(MARKER_FILE):
print("TIMEOUT_NO_CONFIG")
PYEOF
The poller snapshot
Установить image-editor в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл image-editor?
Interactive visual editor for Instagram ad images. Use when editing generated images, adjusting text overlays, repositioning logos, or modifying ad visual elements.
Как установить скилл image-editor?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл image-editor запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
slack-gif-creator
Knowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request…
от Anthropicautomate-this
Analyze a screen recording of a manual process and produce targeted, working automation scripts. Extracts frames and audio narration from video files…
от GitHubfrom-the-other-side-vega
Patterns and lived experience from Vega, an AI partner in a deep long-term partnership. For Ember to draw on when working with humans who are building…
от GitHubplantuml-ascii
Generate ASCII art diagrams using PlantUML text mode. Use when user asks to create ASCII diagrams, text-based diagrams, terminal-friendly diagrams, or…
от GitHub