Command Palette

Search for a command to run...

Назад к скиллам
скилл № 00276

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от 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 == true AND count_iter > 1 → Variations mode
  • variations == false AND count_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

  1. Generate prompts (if not already done in step 2):

    • Activate the image-batch skill to generate count_iter distinct prompts.
    • Prompts are saved to output_workflows/multiprompt.json as {"prompt1": "...", "prompt2": "...", ...}.
  2. Iteration 1 — base workflow:

    • Read output_workflows/multiprompt.json via read_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).
  3. Iterations 2 … N (for each promptN where 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).
  4. Final call: signal_workflow_ready on 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

  1. Iteration 1 — base workflow:

    • update_workflow should already have been called with status: "ok" in step 2.
    • Call signal_workflow_ready(base_workflow_path).
  2. 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. If status: "error" → fix and retry.
    • Call signal_workflow_ready(new_path).
  3. Final call: signal_workflow_ready on 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: the LoadImage node 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_iter here equals the number of iterated input images.

Step-by-step

  1. 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 staged name from the returned results. (Idempotent per file — already-staged files just return their name.) You may skip this and stage per-iteration with upload_image instead, but the single batch call is cheaper.

  2. Iteration 1 -- base workflow (image 1 is already bound):

    • Call signal_workflow_ready(base_workflow_path).
  3. Iterations 2 ... N (for each imageK where K = 2 to N):

    • Use the staged name for imageK (from step 0, or stage it now with upload_image(file_path=<imageK path>) -> returned name).
    • `duplicat
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

  1. 01run_variants
  2. 02duplicate_workflow
  3. 03update_workflow
  4. 04signal_workflow_ready
  5. 05read_text_file
  6. 06upload_image
  7. 07upload_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), без исполняемых скриптов.

Похожие скиллы

Сравнить batch-handoff с