К основному содержанию
скилл CX Codex

scenario-refine-loop — скилл для Claude Code: цикл проверки генераций

Скилл для Claude и других агентов: превращает приёмку генераций Scenario в повторяемый цикл с рубрикой, вердиктами и точечными правками.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add scenario-labs/skills --skill scenario-refine-loop -a claude-code
Открыть на GitHub

Что делает scenario-refine-loop

Скилл задаёт порядок работы с генерациями Scenario, когда первый прогон не годится. Сначала бриф превращается в рубрику из строк «прошло/не прошло», которые можно проверить глазами, потом запускается минимальная партия, потом критик разбирает каждый ассет и выносит вердикт по строкам рубрики. Только после этого идут правки.

Маршрутизация правок идёт от самого дешёвого варианта: локальный дефект чинится маскированным inpaint, ровный финиш (грейд, тон, кроп) правится детерминированным проходом инструмента, неверный контент или композиция — правкой пункта в промпте с перезапуском от утверждённой базы. Дрейф личности или стиля лечится уточнением перечисления и ролями референсов. Если проваливаются все строки, меняется модель, а промпт остаётся.

За раунд меняется одна переменная. Иначе непонятно, что дало улучшение, и следующая ошибка обнуляет счёт. Цикл останавливается на чистом раунде; три раунда без него или одна строка, провалившаяся дважды под разными правками, означают отчёт, а не новый прогон. Скилл опирается на соседние: scenario, scenario-asset-analysis, scenario-consistency, scenario-image-editing. Если их нет в наборе, попросите пользователя поставить нужный (npx skills add scenario-labs/skills --skill <name>), а в автономном режиме работайте по схемам инструментов и отметьте пробел.

Какие задачи решает

  • превратить бриф в проверяемые строки рубрики до первой генерации
  • разобрать партию ассетов и записать вердикт по каждому
  • выбрать самую дешёвую правку под конкретный провал
  • удержать дрейф стиля при повторных прогонах
  • решить, когда останавливать цикл и писать отчёт

Примеры запросов агенту

  • собери рубрику из брифа и прогони четыре иконки, потом разбери их через asset_analyze
  • иконка 2 вышла не по палитре — поправь пункт промпта и перезапусти от базы
  • одна строка рубрики провалилась дважды — хватит прогонов, собери отчёт

Как установить scenario-refine-loop

1Через Skills CLI (Vercel)

npx skills add scenario-labs/skills --skill scenario-refine-loop -a claude-code

2Вручную: положить файлы

~/.claude/skills/scenario-refine-loop/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/scenario-refine-loop/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о scenario-refine-loop

Как установить scenario-refine-loop в Claude?

Выполните npx skills add scenario-labs/skills --skill scenario-refine-loop -a claude-code. Скилл встанет в ~/.claude/skills/scenario-refine-loop/SKILL.md.

Что делает scenario-refine-loop?

Ведёт генерации Scenario по циклу: рубрика до запуска, малая партия, вердикт по каждому ассету, точечная правка под провал и жёсткий лимит раундов.

Что нужно для работы скилла?

Он опирается на соседние скиллы scenario, scenario-asset-analysis, scenario-consistency и scenario-image-editing. Если какого-то нет, скилл просит поставить его командой npx skills add scenario-labs/skills --skill <name>.

Исходный текст

SKILL.md · MIT
---
name: scenario-refine-loop
description: "Use when a Scenario output must be checked and improved rather than accepted first roll: iterating a generation until it matches the brief, fixing a batch that came back off-brief, retrying failed shots methodically, wiring an automated generate, review, revise loop, or deciding whether to re-prompt, swap references, inpaint, post-process, or change model. Keywords: refine, iterate, critique, review loop, QA, self-correction, verify, acceptance criteria, retry, drift."
license: MIT
---

# Scenario Refine Loop

## Overview

Agents fail generation QA in two symmetric ways: accepting the first roll, or rewording the whole
prompt and re-rolling until the budget dies. Both skip the same two artifacts, a written rubric and
a diagnosis. The loop that converges: rubric before generating, a small batch, a recorded verdict
per asset, the cheapest targeted fix per failure, a hard round cap. Connection and the core loop:
see the `scenario` skill. Critic tool contracts: `scenario-asset-analysis`. Baseline discipline:
`scenario-consistency`. If a sibling skill named here is missing from your available skills, ask the
user to install it (`npx skills add scenario-labs/skills --skill <name>`); unattended, proceed from
tool schemas and flag the gap.

## Quick reference

| Step        | Do                                                                                                                                                                           |
| ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 1. Rubric   | Before generating, turn the brief into pass/fail lines a viewer can check ("subject centered on a plain field"), never taste words                                           |
| 2. Generate | The smallest batch that tests the recipe, at the cheapest size or quality tier the schema offers on which every rubric line can still be judged; `dry_run` when cost matters |
| 3. Critique | `asset_analyze`: up to 10 images per call, one instruction embedding the rubric and a fixed per-image output shape                                                           |
| 4. Fix      | Route every fail line to the cheapest fix that addresses it (table below)                                                                                                    |
| 5. Stop     | A clean round ships; three rounds without one, or one line failing twice under different fixes, means report, not respin                                                     |

A tier change is a new generation, not the keeper enlarged: re-run only the keeper's recipe at
delivery tier and re-critique it, or keep what passed and upscale it with a fidelity upscaler found
by `search` `target="models"`, `filters={"tags": ["image-upscale"]}`, `public=true` (fidelity versus
creative picks and sizing in `scenario-image-editing`, video upscaling in `scenario-video`).

When the bar is the configured brand brief rather than a task rubric, and the team's Quality Gate
add-on is enabled, critique images with `asset_quality_gate_run` instead: its `reasons` and
`suggestions` feed the fix table directly (`scenario-quality-gate`; where the gate is missing it
degrades to this `asset_analyze` path).

Fix routing, cheapest first:

| The verdict says                                | Fix                                                                                                                                                                          |
| ----------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| One local defect on a keeper                    | Masked inpaint of that region; on a schema with no `mask` field, an instruction edit of the keeper naming that one change (`scenario-image`)                                 |
| A uniform finish off (grade, tint, crop)        | A deterministic tool pass (`scenario-image-editing`), not a re-roll                                                                                                          |
| Wrong content, composition, or rendered palette | Edit the delta clause, re-run from the approved baseline                                                                                                                     |
| Identity or style drift                         | Tighten the enumeration, add or re-role references (`scenario-consistency`)                                                                                                  |
| Every line failing                              | Change the model: re-discover with `recommend` (capability-shaped; `search` is for a name, a private model, or a tag-filtered lane such as `image-upscale`), keep the prompt |

Change one variable per round. A round that swaps prompt, references, and model at once cannot
attribute the improvement, so the next failure restarts from zero.

## The two rules that keep the loop honest

- **Verdicts cite the rubric, not taste.** Instruct the critic to answer per image, in order:
  `<index>: pass|fail, <the failed line>`. "Could be better" is not a verdict; a loop chasing better
  instead of the brief sands off exactly what made the direction distinctive and converges on
  generic output.
- **Regenerate from the baseline, never from the last attempt.** Fixes re-run from the approved
  reference and prompt; chaining output to output compounds drift (`scenario-consistency` explains
  why).

## Worked example: four icons against a brief

1. Rubric from the brief, five lines: single object, centered, plain field, palette #2A9D8F and
   #E9C46A only, no text.
2. Generate four, one `model_run` each per `scenario-image`, then `jobs_wait`.
3. One `asset_analyze` call with all four ids in `images` and the rubric-plus-shape instruction;
   answers land as text assets, `asset_download` them to read the verdicts.
4. Two fail. Icon 2 is off palette, which is rendered content rather than a finish: edit the delta
   clause by pinning the hex codes in the prompt and re-run from the baseline. Icon 4 has one
   smeared edge: masked inpaint of that corner. Icons 1 and 3 ship untouched.
5. `jobs_wait` the fix runs, then re-critique only the two new assets with the byte-identical
   instruction. Clean round: stop, file the keepers in a collection (`scenario-asset-analysis`).

## Common mistakes

- Judging by glancing at `asset_display` in chat: unrecorded impressions do not accumulate; verdicts
  do.
- Asking `asset_analyze` to improve or fix the image: it returns text only; every fix is a new run.
- Re-rolling the whole batch because one item failed: route per item.
- Writing the rubric after seeing the batch: it inherits the batch's flaws as the standard.
- Running the loop uncapped: failed jobs are reimbursed, unsatisfying ones are not. Gate rounds on
  the costs the runs themselves report (`dry_run` prices the next round ahead); `usage` totals lag
  and answer the report after the run, not the mid-run gate.
- Retrying a criterion a third time on the same model: two misses under two different fixes is
  evidence about the model, not bad luck.

© scenario-labs · MIT · scenario-labs/skills

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

Всё по теме «ИИ и ML» →
re0-loop LilMGenius Скилл организует циклическую разработку через вертикальные срезы, проверку на реальном интерфейсе и фиксацию выводов. Помогает избавляться от антипаттернов в долгих агентных проектах. CX Codex +1 1 200установок dream-loop achimala Автономно доводит графику игры или приложения до целевого рендера по скриншотам. Пригодится, когда нужна высокая детализация 3D-сцены. CX Codex +1 814установок sparc-refine ruvnet Скилл запускает фазы доработки и финализации методологии SPARC. Он проверяет код по спецификации, доводит покрытие тестами до 80% и готовит документацию. CX Codex +1 729установок research-refine-pipeline wanshuiyin Скилл связывает доработку исследовательской идеи и планирование экспериментов в один проход: от сырого направления до финального предложения и дорожной карты опытов. CX Codex +1 504установок research-refine wanshuiyin Превращает нечёткую тему научного исследования в конкретный план метода с итеративным рецензированием через Codex и сохранением промежуточных шагов. CX Codex +1 531установок om-auto-create-pr-loop open-mercato Создаёт PR по развёрнутому описанию задачи, ведёт план и фиксирует прогресс по шагам. Нужен для длинных изменений, которые важно продолжать без потери контекста. CX Codex +1 3 700установок

Из того же набора68

scenario-sprite-animation Скилл направляет задачи анимации 2D-спрайтов в Scenario: от циклов ходьбы до нарезки листа на кадры для движка. CX Codex +1 530установок scenario-3d Скилл для генерации 3D-моделей через MCP-сервер Scenario: из текста, картинки или готового меша — с текстурой, риггом и выгрузкой в Unity, Unreal, Godot или Blender. CX Codex +1 531установок scenario-image Скилл для работы с генерацией и редактированием изображений в Scenario через MCP: txt2img, img2img, инпейнтинг по маске, размеры и соотношения сторон. CX Codex +1 523установок scenario-textures Скилл настраивает генерацию бесшовных текстур, апскейл с сохранением тайлинга и сборку PBR-материалов через MCP-сервер Scenario. Пригодится при подготовке ассетов для игровых движков. CX Codex +1 500установок scenario-quality-gate Скилл оценивает готовую картинку Scenario и выдаёт вердикт pass, warn или fail со счётом от 0 до 100. Полезен, когда генерацию нужно проверить до публикации. CX Codex +1 461установок scenario-moderation Разбирает блокировки генераций в Scenario, находит причину фильтрации и подбирает альтернативные модели без переписывания промпта. CX Codex +1 445установок scenario-video Скилл подключает генерацию и монтаж видео через Scenario MCP. Помогает собирать ролики из текста, картинок и аудио прямо в диалоге с агентом. CX Codex +1 444установок scenario-image-editing Обрабатывает готовые изображения через MCP-модели Scenario: апскейлит картинки, правит цвета по LUT и удаляет водяные знаки. Пригодится для пакетного пост-процессинга без промптов. CX Codex +1 443установок

Спонсоры проекта

Компании, которые помогают держать аналитику открытой