batch-handoff
Step-by-step procedure for handing off multi-iteration batch workflows to the Executor. Activate when count_iter > 1, or when applying the SAME workflow to…
от szprivate★ 53 звезды на GitHub
Установить batch-handoff в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Batch Handoff Multi-Iteration Procedure
Activate this skill when count_iter > 1 in the brainbriefing, or when the user asked to apply one workflow to several input images (Mode C).
Shortcut for independent variants. When the variants are independent (different prompts,
inputs or settings of the same workflow) and you want their outputs back in this turn, ONE
run_variants(workflow_path, variants=[{"label": "...", "set": {"<node id>.<input name>": value}}, ...])
does the whole duplicate -> patch -> validate -> queue below for all N at once (16 steps
become 1). The step-by-step modes below remain for hand-off at the end of the turn
(signal_workflow_ready) and for anything run_variants cannot express.
There are three batch modes. Determine the mode from the request / brainbriefing:
variations == trueANDcount_iter > 1→ Variations modevariations == falseANDcount_iter > 1→ Identical mode
Mode A: Variations (distinct prompts per iteration)
Each iteration gets a unique prompt from output_workflows/multiprompt.json, generated by the image-batch skill. This file must exist before starting handoff.
Step-by-step
Generate prompts (if not already done in step 2):
- Activate the
image-batchskill to generatecount_iterdistinct prompts. - Prompts are saved to
output_workflows/multiprompt.jsonas{"prompt1": "...", "prompt2": "...", ...}.
- Activate the
Iteration 1 — base workflow:
- Read
output_workflows/multiprompt.jsonviaread_text_file. - Call
update_workflow(base_workflow_path, patches=[{"node_id": "<positive_prompt_node_id>", "input_name": "text", "value": "<prompt1>"}]). - If
status: "error"→ fix patches and retry. - Call
signal_workflow_ready(base_workflow_path).
- Read
Iterations 2 … N (for each
promptNwhere N = 2 to count_iter):- Make all the copies in ONE call:
duplicate_workflow(base_workflow_path, count=N-1)→new_paths(one per iteration, in order). Do not call it once per iteration. - Call
update_workflow(new_path, patches=[{"node_id": "<positive_prompt_node_id>", "input_name": "text", "value": "<promptN>"}]). - If
status: "error"→ fix patches and retry. - Call
signal_workflow_ready(new_path).
- Make all the copies in ONE call:
Final call:
signal_workflow_readyon the last iteration MUST be your last tool call.
Mode B: Identical (same prompt, different seeds)
All iterations use the same assembled workflow. Seeds are randomised automatically by the Executor on each run.
Step-by-step
Iteration 1 — base workflow:
update_workflowshould already have been called withstatus: "ok"in step 2.- Call
signal_workflow_ready(base_workflow_path).
Iterations 2 … N (for N = 2 to count_iter):
- Make all the copies in ONE call:
duplicate_workflow(base_workflow_path, count=N-1)→new_paths. Do not call it once per iteration. - Call
update_workflow(new_path)to validate the duplicate. Ifstatus: "error"→ fix and retry. - Call
signal_workflow_ready(new_path).
- Make all the copies in ONE call:
Final call:
signal_workflow_readyon the last iteration MUST be your last tool call.
Mode C: Multiple input images (same workflow, swap the input per iteration)
Use this when the user asks to apply the SAME operation to several input images -- e.g. "apply the light from image 6 to the first 5 images", "upscale all of these", "relight each of these photos". Do NOT build a separate workflow per image; assemble ONE workflow, then swap only the iterated input image per copy.
Before this skill runs, the base workflow was assembled + validated ONCE, with
the FIRST iterated image bound to the source LoadImage node and any FIXED
reference input (e.g. a lighting/style reference such as "image 6") bound to its
own loader.
Identify from the assembled workflow:
source_node_id: theLoadImagenode whose image changes each iteration. If the template has more than one image loader, the FIXED reference loader must NOT change -- the other loader is the source.images: the ordered list of input files to iterate over (image 1 ... image N).count_iterhere equals the number of iterated input images.
Step-by-step
Stage all iterated images up front (one call): call
upload_image_multiple(file_paths=[<image2 path>, ..., <imageN path>])to stage images 2 ... N in a single tool call, and read each stagednamefrom the returnedresults. (Idempotent per file — already-staged files just return their name.) You may skip this and stage per-iteration withupload_imageinstead, but the single batch call is cheaper.Iteration 1 -- base workflow (image 1 is already bound):
- Call
signal_workflow_ready(base_workflow_path).
- Call
Iterations 2 ... N (for each imageK where K = 2 to N):
- Use the staged
namefor imageK (from step 0, or stage it now withupload_image(file_path=<imageK path>)-> returnedname). - `duplicat
- Use the staged
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
- 01
run_variants - 02
duplicate_workflow - 03
update_workflow - 04
signal_workflow_ready - 05
read_text_file - 06
upload_image - 07
upload_image_multiple
FAQ
Что делает скилл batch-handoff?
Step-by-step procedure for handing off multi-iteration batch workflows to the Executor. Activate when count_iter > 1, or when applying the SAME workflow to multiple input images (Mode C: swap the input image per iteration instead of building N separate workflows).
Как установить скилл batch-handoff?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл batch-handoff запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
AnthropicToolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
access
AnthropicManage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
configure
AnthropicSet 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…
access
AnthropicManage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…