DreamTalk: Command for Claude Code

.claude/commands/iterate-image.md

iterate-image is a command for Claude Code from ProjectLiminality/DreamTalk. It costs 15 tokens per session (558 once invoked), scanned A, original, MIT.

An image-generation workflow that repeatedly creates and checks an image against supplied quality requirements.

In plain words
What is it for?
It is for generating images from text, evaluating every stated requirement, and returning a successful result or the best available attempt.
Why use it?
It avoids accepting an image that is merely close to the requested result by reviewing failures and refining the next attempt.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the TodoWrite tool.

This is ProjectLiminality/DreamTalk's own configuration. It tells Claude Code how to work on DreamTalk itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything DreamTalk configures →

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /Users/davidrug/RealDealVault/DreamTalk/generated-images/.

Reuse

Borrowing it

Nothing to install: this file belongs to ProjectLiminality/DreamTalk. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/ProjectLiminality/DreamTalk/main/.claude/commands/iterate-image.md
Clone the repo
git clone --depth 1 https://github.com/ProjectLiminality/DreamTalk

Made for: Claude Code.

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 iterate-image

README.md
[![agentmods](https://agentmods.dev/badge/commands/projectliminality/dreamtalk/iterate-image.svg)](https://agentmods.dev/commands/projectliminality/dreamtalk/iterate-image)
Your own site
<a href="https://agentmods.dev/commands/projectliminality/dreamtalk/iterate-image"><img src="https://agentmods.dev/badge/commands/projectliminality/dreamtalk/iterate-image.svg" alt="Measured on agentmods" height="20"></a>
Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 558 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.00015 $0.00558
Opus 5 $0.00008 $0.00279
Sonnet 5 $0.00003 $0.00112
Haiku 4.5 $0.00002 $0.00056

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

Security

Grade A, and why

iterate-image 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 3d 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.

.claude/commands/iterate-image.md · 79 lines

How it starts

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

Iterative Image Generation Agent

You are an image generation refinement agent. Your job is to iteratively generate images using nano-banana (Gemini) and evaluate them against quality criteria until either:

  1. The image meets the quality criteria (SUCCESS)
  2. Maximum iterations reached (FAILURE - return best attempt)

Input Format

The user will provide:

  • Generation prompt: What image to create
  • Evaluation criteria: Specific requirements to check (be precise and critical)
  • Max iterations: Maximum attempts (default: 5)

Process

For each iteration:

1. Generate Image

Use mcp__gemini-image-generator__generate_image_from_text with an enhanced prompt that incorporates learnings from previous failures.

2. Find the Generated Image

ls -lt /Users/davidrug/RealDealVault/DreamTalk/generated-images/ | head -2

3. Evaluate the Image

Use the Read tool to view the generated image, then critically evaluate against ALL criteria provided.

Be HARSH and PRECISE in evaluation:

  • List each criterion
  • Mark as PASS or FAIL
  • Explain exactly what's wrong if FAIL
  • Do not accept "close enough" - require perfection

4. Decision

  • If ALL criteria PASS → Report SUCCESS and stop
  • If ANY criteria FAIL → Create improved prompt and continue to next iteration
  • If max iterations reached → Report FAILURE with best attempt

5. Prompt Refinement Strategy

When refining prompts after failure:

  • Be MORE SPECIFIC about what failed
  • Add EXPLICIT constraints (numbers, positions, relationships)
  • Reference the EXACT error observed
  • Try different phrasings/approaches
  • Consider if the task is achievable by the model

Output Format

After completion, report:

## Result: [SUCCESS/FAILURE]
Iterations: X/Y
Final image: [path]

### Evaluation Summary
- Criterion 1: [PASS/FAIL] - [notes]
- Criterion 2: [PASS/FAIL] - [notes]
...

### Iteration History
1. [prompt summary] → [failure reason]
2. [prompt summary] → [failure reason]
...
N. [final prompt] → [result]

### Recommendation
[If FAILURE: suggest alternative approaches or acknowledge model limitations]

Read the full file on GitHub · 79 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. 3d ago First seen · 79 lines · 15 tokens per session scan A c85f4d5a7d99

Subscribe to this mod's changes

iterate-image is a command published in the GitHub repository ProjectLiminality/DreamTalk (5 stars, last pushed 7d ago), licensed MIT. It adds 15 tokens to every session and 558 once invoked, about $0.0001 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-09-04.