Agent skill

Scenario Refine Loop

by scenario-labs in scenario-labs/skills

A skill your agent uses 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…

MITAuto-check passedProduct & Project Management

Install Scenario Refine Loop

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

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install scenario-labs/skills scenario-refine-loop --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/scenario-labs/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/scenario-refine-loop .claude/skills/scenario-refine-loop && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
scenario-refine-loop
GitHub stars
931
Token cost
~1.8k tokens
SKILL.md length
805 words
Files
1
Skills in repo
143
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses 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…

  • Works in 5 steps: Rubric from the brief, five lines:… → Generate four, one model_run each per… → One asset_analyze call with all four ids… → …
  • A Scenario output must be checked and improved rather than accepted first roll: iterating a generation until it matches the brief
  • SKILL.md covers Overview, Quick reference, The two rules that keep the… and Worked example: four icons…, plus 1 more section
  • Calls npx

What it does

Scenario Refine Loop is an agent skill from scenario-labs/skills. 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.

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Product & Project Management, covering User stories. The repository describes itself as: Get production-ready images, video, audio, and 3D from any AI agent: skills that pick the right model, price before spending, and keep characters and brands consistent through… The licence is MIT.

When your agent uses it

  • 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

Example prompts

  • “/scenario-refine-loop”

Requirements

  • Node.js

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  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…
  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…
  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…

What it can do on your machine

Read from SKILL.md and the folder at commit 91caa01. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npx

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npx, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Scenario Refine Loop loads about 1.8k tokens when it runs. Until then it costs about 123 tokens; SKILL.md has 805 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~123
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from scenario-labs/skills at commit 91caa01, republished under its MIT licence (© scenario-labs). 805 words, ~1,837 tokens.

Download SKILL.mdSave it as .claude/skills/scenario-refine-loop/SKILL.md (or your agent's skills folder).
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

StepDo
1. RubricBefore generating, turn the brief into pass/fail lines a viewer can check ("subject centered on a plain field"), never taste words
2. GenerateThe 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. Critiqueasset_analyze: up to 10 images per call, one instruction embedding the rubric and a fixed per-image output shape
4. FixRoute every fail line to the cheapest fix that addresses it (table below)
5. StopA 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 saysFix
One local defect on a keeperMasked 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 paletteEdit the delta clause, re-run from the approved baseline
Identity or style driftTighten the enumeration, add or re-role references (scenario-consistency)
Every line failingChange 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.

Show full SKILL.md (344 more words)Show less

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. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/scenario-refine-loop of scenario-labs/skills.

Open the folder on GitHubat commit 91caa01

Compare with similar skills

Scenario Refine Loop next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Scenario Refine Loop compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Scenario Refine Loop this skillscenario-labs/skills931—~1.8kAutomated safety check: PassMIT
Story ReadinessDonchitos/Claude-Code-Game-Studios26k—~6.9kAutomated safety check: PassMIT
User Story Writerdeanpeters/Product-Manager-Skills7.2k2 repos~2.9kAutomated safety check: PassCustom licence
Ralph Tui Create Beadssubsy/ralph-tui2.5k1 repos~2.6kAutomated safety check: PassMIT
Agile Product Owneralirezarezvani/claude-skills28k3 repos~3.2kAutomated safety check: PassMIT
Ralph Tui Create Beads Rustsubsy/ralph-tui2.5k1 repos~2.8kAutomated safety check: PassMIT

Similar skills

  • Story Readiness

    Donchitos/Claude-Code-Game-Studios

    Is a story implementation-ready?. An agent skill from Donchitos/Claude-Code-Game-Studios.

    26k GitHub stars~6.9k tokensUpdated yesterday
    Product & Project ManagementAuto-check passed
  • User Story Writer

    deanpeters/Product-Manager-Skills

    Writes user stories in Mike Cohn's format with Gherkin acceptance criteria, turning user needs into development-ready work with testable conditions.

    7.2k GitHub starsUsed in 2 repos~2.9k tokens
    Product & Project ManagementAuto-check passed
  • Ralph Tui Create Beads

    subsy/ralph-tui

    Convert PRDs to beads for ralph-tui execution. An agent skill from subsy/ralph-tui.

    2.5k GitHub starsUsed in 1 repo~2.6k tokens
    Product & Project ManagementAuto-check passed
  • Agile Product Owner

    alirezarezvani/claude-skills

    Writes INVEST-checked user stories with acceptance criteria, splits epics, plans sprints from velocity and ranks the backlog with a weighted score.

    28k GitHub starsUsed in 3 repos~3.2k tokens
    Product & Project ManagementAuto-check passed
  • Convert PRDs to beads for ralph-tui execution using beads-rust (br CLI).

    2.5k GitHub starsUsed in 1 repo~2.8k tokens
    Product & Project ManagementAuto-check passed
  • To Spec

    bestofjs/bestofjs

    Turn the current conversation into a spec and publish it to the project issue tracker — no interview, just synthesis of what you've already discussed.

    3.1k GitHub starsUsed in 21 repos~757 tokens
    Product & Project ManagementAuto-check passed

More from scenario-labs/skills

All 143 skills in this repo
  • Scenario Blender Grease Pencil

    scenario-labs/skills

    A skill your agent uses when drawing or animating with Grease Pencil in Blender 5.x from Python: 2D or 2.5D illustration, frame-by-frame animation, a cutout or part-based 2D character, strokes with…

    931 GitHub stars~4.5k tokensUpdated yesterday
    Auto-check passed
  • Scenario Blender Hair

    scenario-labs/skills

    A skill your agent uses when grooming hair or fur in Blender with hair curves, such as a character hairstyle, animal fur, procedural fur in geometry nodes, or hair cards and mesh hair for games.

    931 GitHub stars~4.7k tokensUpdated yesterday
    Auto-check passed
  • A skill your agent uses when lighting, rendering or compositing in Blender: light a character, product or hero shot, interior at dusk or night, three-point or motivated lighting, sun and sky, HDRI…

    931 GitHub stars~5k tokensUpdated yesterday
    Auto-check passed
  • Scenario Godot Animation

    scenario-labs/skills

    A skill your agent uses when animating characters or scenes in Godot 4.7: AnimationPlayer clips and RESET, AnimationTree state machines and blend spaces built in code, Mixamo or glTF import, loop…

    931 GitHub stars~4.7k tokensUpdated yesterday
    Auto-check passed
  • Scenario Godot Audio

    scenario-labs/skills

    A skill your agent uses when adding or fixing sound in Godot 4.7: audio buses and effects, volume sliders, 'too many sounds', combat audio with hundreds of enemies, sounds clipping or distorting, 3D…

    931 GitHub stars~4.7k tokensUpdated yesterday
    Auto-check passed
  • Scenario Godot Multiplayer

    scenario-labs/skills

    A skill your agent uses when a Godot 4 game goes online or co-op: host and join with ENet, WebSocket for a web build, RPCs (@rpc, rpcid, anypeer), MultiplayerSpawner and MultiplayerSynchronizer…

    931 GitHub stars~5.1k tokensUpdated yesterday
    Auto-check passed

Questions about Scenario Refine Loop

What does Scenario Refine Loop do?

A skill your agent uses 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…. Scenario Refine Loop is an agent skill from scenario-labs/skills. 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.

When should I use Scenario Refine Loop?

Scenario Refine Loop fits situations like: 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.

How do I install Scenario Refine Loop in Claude Code?

Run `npx skills add scenario-labs/skills --skill scenario-refine-loop -a claude-code`. Or copy the skill folder (skills/scenario-refine-loop in scenario-labs/skills) into .claude/skills/scenario-refine-loop in your project. Claude Code loads it when a task matches its description.

How do I install Scenario Refine Loop in Codex?

Run `npx skills add scenario-labs/skills --skill scenario-refine-loop -a codex`. Or copy the skill folder (skills/scenario-refine-loop in scenario-labs/skills) into .agents/skills/scenario-refine-loop in your project. Codex loads it when a task matches its description.

Can I use Scenario Refine Loop in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add scenario-labs/skills --skill scenario-refine-loop -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/scenario-refine-loop, .gemini/skills/scenario-refine-loop, .github/skills/scenario-refine-loop and .opencode/skills/scenario-refine-loop in your project.

What does Scenario Refine Loop need to run?

Going by SKILL.md and its folder, Scenario Refine Loop needs the command-line tools its instructions call (npx). Our summary lists: Node.js.

Does Scenario Refine Loop access the network?

SKILL.md contains no URLs. Its commands use npx, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Scenario Refine Loop safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Scenario Refine Loop use?

Scenario Refine Loop is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Scenario Refine Loop use?

About 1.8k tokens (SKILL.md is roughly 7.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Scenario Refine Loop?

Skills that share tags, products or a category with Scenario Refine Loop: Story Readiness (Donchitos/Claude-Code-Game-Studios, 26k stars), User Story Writer (deanpeters/Product-Manager-Skills, 7.2k stars), Ralph Tui Create Beads (subsy/ralph-tui, 2.5k stars) and Agile Product Owner (alirezarezvani/claude-skills, 28k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Scenario Refine Loop?

scenario-labs (a GitHub organization) maintains it in scenario-labs/skills, which has 931 GitHub stars. The repository holds 143 skills in this directory. The repository was last updated on October 8, 2026.

Source: scenario-labs/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.