image-generator-sd-webui
БесплатноЗапускает вложенные скриптыНе проверенGenerate images via the Stable Diffusion WebUI / Forge HTTP API (AUTOMATIC1111-compatible `/sdapi/v1/*`). Use when the user wants to (1) discover or pick a…
от jim60105★ 22 звезды на GitHubОб этом скилле
Image Generator (sd-webui API)
Overview
Drive a Stable Diffusion WebUI / Forge server through its REST API to enumerate available resources, run txt2img, poll progress, and interrupt jobs. Shell entrypoints under scripts/ share one curl client. Generation file mode uses a Python 3 helper to decode and validate PNG files and save metadata, returning only a compact path manifest.
Server connection
Before doing anything, confirm the server URL (and optional HTTP Basic Auth) with the user. Pass them as environment variables to every script:
export SD_WEBUI_URL="http://localhost:7860" # required, no trailing slash
export SD_WEBUI_USER="" # optional, HTTP Basic Auth
export SD_WEBUI_PASS="" # optional
If unset, scripts default to http://localhost:7860 with no auth.
Quick connectivity test (returns OK <url> on success, exits non-zero on failure):
scripts/probe.sh
Workflow
- Probe — Verify the server is reachable (
scripts/probe.sh). On failure, ask the user for the correct URL / credentials. - Enumerate & choose — List the resources to pick (models, modules, samplers, schedulers, styles) and ask the user to choose. Capture their choice verbatim in the API's English
name/title/model_name— sd-webui matches exactly, do not translate or rename. - Prompt — Obtain the positive prompt, negative prompt, and any extra params (steps, CFG, size). See "Prompt engineering" for sourcing these.
- Generate — Call
scripts/generate.shwith a request JSON file and--output-dirpointing to an absolute directory under the caller's session staging directory. It saves images and metadata locally and returns a compact path manifest. - (Optional) Track progress — While generation is running (in another shell / background), call
scripts/progress.shto printprogress(0–1),eta_relative, andstate. - (Optional) Cancel — Call
scripts/cancel.shto interrupt the current job.
Tasks
Listing available resources
| User wants | Command | API endpoint |
|---|---|---|
| Checkpoints (models) | scripts/list.sh models |
GET /sdapi/v1/sd-models → array of {title, model_name, hash, ...} |
| Extra modules (TE / VAE, Forge-only) | scripts/list.sh modules |
GET /sdapi/v1/sd-modules → array of {model_name, ...} |
| Samplers | scripts/list.sh samplers |
GET /sdapi/v1/samplers → array of {name, aliases} |
| Schedulers | scripts/list.sh schedulers |
GET /sdapi/v1/schedulers → array of {name, label} |
| Style presets | scripts/list.sh styles |
GET /sdapi/v1/prompt-styles → array of {name, prompt, negative_prompt} |
| Upscalers | scripts/list.sh upscalers |
GET /sdapi/v1/upscalers |
| LoRAs | scripts/list.sh loras |
GET /sdapi/v1/loras |
| Embeddings | scripts/list.sh embeddings |
GET /sdapi/v1/embeddings |
scripts/list.sh <kind> prints the canonical English identifier for each entry, one per line — pipe to column, fzf, etc. Add --json for the raw JSON.
After listing, present the options to the user (use ask_user with an enum if the list is short). For models, prefer the full title (which embeds the hash suffix, e.g. anima/animaika_v36.safetensors [d50fb5b9a0]) over model_name because the title is unambiguous — if the user supplies a bare filename without the hash, verify it via list.sh models and substitute the exact title before sending it to the API. For schedulers, list.sh schedulers prints the human-readable label (e.g. Beta); both label and the lowercase name (beta) are accepted by the txt2img scheduler field.
Generating an image (txt2img)
- Build a JSON request. Required field:
prompt. Recommended:negative_prompt,steps,cfg_scale,width,height,sampler_name,scheduler,styles(array of style names), andoverride_settings.sd_model_checkpoint(model title) /override_settings.forge_additional_modules(array of module names, Forge only). Seereferences/txt2img-parameters.mdfor every field. - Run:
scripts/generate.sh "/absolute/session/request.json" --output-dir "/absolute/session/generated" - Read the compact stdout manifest:
{"image_paths":["/absolute/session/generated/generation.ABC1234567/image-0001.png"],"metadata_path":"/absolute/session/generated/generation.ABC1234567/metadata.json"} - Use every
image_pathsentry as an absolute path for subsequent file processing or delivery. Readmetadata_pathonly when generation details are needed. Metadata contains all API response fields exceptimages, preservinginfounchanged (normally a JSON-encoded string).
File mode requires Python 3 in addition to curl and jq. It saves every returned image, including grids, in response order. Each invocation creates a private, uniquely named batch subdirectory, so repeated or concurrent calls do not overwrite files. Paths containing spaces are supp
Установить image-generator-sd-webui в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл image-generator-sd-webui?
Generate images via the Stable Diffusion WebUI / Forge HTTP API (AUTOMATIC1111-compatible `/sdapi/v1/*`). Use when the user wants to (1) discover or pick a model / extra module (TE/VAE) / sampler / scheduler / style preset from a running sd-webui server, (2) generate an image with a given prompt (txt2img), (3) check generation progress, (4) cancel/interrupt an in-flight generation, (5) inspect or change a global sd-webui option (e.g. active checkpoint), or (6) test connectivity. This skill talks to a *generic* sd-webui-compatible server (AUTOMATIC1111, Forge, reForge, sd-webui-forge-classic). Do NOT trigger for requests that are purely writing the prompt itself.
Как установить скилл image-generator-sd-webui?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл image-generator-sd-webui запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic