scenario-refine-loop

scenario-refine-loop is a skill for Claude Code from scenario-labs/skills. It costs 105 tokens per session (1,237 once invoked), scanned A, original, MIT.

A guide for checking generated images against a written brief and improving them through a limited series of targeted revisions.

In plain words
What is it for?
Use it to define pass-or-fail checks, generate a small test batch, review assets, diagnose problems, and apply focused fixes.
Why use it?
It prevents accepting unsuitable first attempts or wasting resources on endless rewording and retries.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the 07.-reviewing-and-organizing-output plugin — 3 skills shipped together

Good fit Use it to define pass-or-fail checks, generate a small test batch, review assets, diagnose problems, and apply focused fixes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/scenario-labs/skills/scenario-refine-loop
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add scenario-labs/skills --skill scenario-refine-loop
Clone the repo
git clone --depth 1 https://github.com/scenario-labs/skills

Made for: Claude Code.

Or install 07.-reviewing-and-organizing-output, the plugin that ships this one along with the rest of its 3 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for scenario-refine-loop

README.md
[![agentmods](https://agentmods.dev/badge/skills/scenario-labs/skills/scenario-refine-loop/github.svg)](https://agentmods.dev/skills/scenario-labs/skills/scenario-refine-loop)
Your own site
<a href="https://agentmods.dev/skills/scenario-labs/skills/scenario-refine-loop"><img src="https://agentmods.dev/badge/skills/scenario-labs/skills/scenario-refine-loop/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for scenario-refine-loop

Your own site · 80×15
<a href="https://agentmods.dev/skills/scenario-labs/skills/scenario-refine-loop"><img src="https://agentmods.dev/badge/skills/scenario-labs/skills/scenario-refine-loop.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 105 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,237 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00105 $0.01237
Opus 5 $0.00053 $0.00619
Sonnet 5 $0.00021 $0.00247
Haiku 4.5 $0.00011 $0.00124

Measured 10d ago against content hash 4f1ef4ae0e23, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

scenario-refine-loop scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/scenario-refine-loop/SKILL.md · 58 lines

How it starts

The opening of the file, as written. The whole thing — 58 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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

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).

Read the full file on GitHub · 58 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 58 lines · 105 tokens per session scan A 4f1ef4ae0e23

Subscribe to this mod's changes

scenario-refine-loop is a skill published in the GitHub repository scenario-labs/skills (11 stars, last pushed 6d ago), licensed MIT. It adds 105 tokens to every session and 1,237 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

Video Generation

Implement AI-powered video generation capabilities using the z-ai-web-dev-sdk. Use this skill when the user needs to generate videos from text prompts or images, create video content programmatically, or build applications that produce video outputs. Supports asynchronous task management with status polling and result…

jjyaoao/HelloAgents · 58 tokens

video-understand

Implement specialized video understanding capabilities using the z-ai-web-dev-sdk. Use this skill when the user needs to analyze video content, understand motion and temporal sequences, extract information from video frames, describe video scenes, or perform video-based AI analysis. Optimized for MP4, AVI, MOV, and…

jjyaoao/HelloAgents · 68 tokens

TTS

Implement text-to-speech (TTS) capabilities using the z-ai-web-dev-sdk. Use this skill when the user needs to convert text into natural-sounding speech, create audio content, build voice-enabled applications, or generate spoken audio files. Supports multiple voices, adjustable speed, and various audio formats.

jjyaoao/HelloAgents · 64 tokens

image-generation

Implement AI image generation capabilities using the z-ai-web-dev-sdk. Use this skill when the user needs to create images from text descriptions, generate visual content, create artwork, design assets, or build applications with AI-powered image creation. Supports multiple image sizes and returns base64 encoded…

jjyaoao/HelloAgents · 69 tokens

Podcast Generate

Generate podcast episodes from user-provided content or by searching the web for specified topics. If user uploads a text file/article, creates a dual-host dialogue podcast (or single-host upon request). If no content is provided, searches the web for information about the user-specified topic and generates a podcast.…

jjyaoao/HelloAgents · 113 tokens

image_generate

An image-generation skill whose detailed work and output rules come from the Lime project.

limecloud/lime · 44 tokens