midjourney-cc-skill: Command for Claude Code

.claude/commands/log-iteration.md

log-iteration is a command for Claude Code from JustinPerea/midjourney-cc-skill. It costs 0 tokens per session (2,532 once invoked), scanned A, original, MIT.

A logging command for recording one Midjourney image-generation attempt, including its prompt, settings, result assessment, and user feedback. Midjourney is a tool that creates images from text instructions.

In plain words
What is it for?
Use it to save generation details, screenshots or other available evidence, assessments, and feedback to an active image-making session.
Why use it?
It keeps a history of what was tried and what worked or failed, so later sessions can learn from previous attempts.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: mentions subagents; mentions Claude Code.

This is JustinPerea/midjourney-cc-skill's own configuration. It tells Claude Code how to work on midjourney-cc-skill 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 midjourney-cc-skill configures →

Reuse

Borrowing it

Nothing to install: this file belongs to JustinPerea/midjourney-cc-skill. 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/JustinPerea/midjourney-cc-skill/main/.claude/commands/log-iteration.md
Clone the repo
git clone --depth 1 https://github.com/JustinPerea/midjourney-cc-skill

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 log-iteration

README.md
[![agentmods](https://agentmods.dev/badge/commands/justinperea/midjourney-cc-skill/log-iteration/github.svg)](https://agentmods.dev/commands/justinperea/midjourney-cc-skill/log-iteration)
Your own site
<a href="https://agentmods.dev/commands/justinperea/midjourney-cc-skill/log-iteration"><img src="https://agentmods.dev/badge/commands/justinperea/midjourney-cc-skill/log-iteration/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 log-iteration

Your own site · 80×15
<a href="https://agentmods.dev/commands/justinperea/midjourney-cc-skill/log-iteration"><img src="https://agentmods.dev/badge/commands/justinperea/midjourney-cc-skill/log-iteration.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,532 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.00000 $0.02532
Opus 5 $0.00000 $0.01266
Sonnet 5 $0.00000 $0.00506
Haiku 4.5 $0.00000 $0.00253

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

Security

Grade A, and why

log-iteration 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.

.claude/commands/log-iteration.md · 185 lines

How it starts

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

Log Iteration

Log a Midjourney generation attempt. This captures the prompt, parameters, result assessment, and user feedback for later pattern extraction.

Instructions

  1. Verify database access. Run SELECT COUNT(*) FROM sessions via sqlite-simple MCP. If the query fails, tell the user: "Database not available. Run claude mcp add sqlite-simple -- npx @anthropic-ai/sqlite-simple-mcp mydatabase.db then restart Claude Code." Do not proceed without database access.

  2. Check for an active session. Query the database:

    SELECT id, intent, total_iterations FROM sessions WHERE status = 'active' ORDER BY created_at DESC LIMIT 1
    
  3. If no active session exists, ask the user:

    • What are you trying to create? (intent)
    • Do you have a reference image to describe? (reference_description)
    • Then create a new session with a generated UUID.
  4. Determine what data is available. There are five scenarios:

    Scenario A: Browser automation capture (richest data path). If the generation was submitted via Playwright MCP (from /new-session or manual browser control):

    • Create the iteration screenshot directory:
      mkdir -p sessions/{session_id_first_8}/iter-{NN}/
      
    • Use batch capture via browser_run_code to capture all 4 images in one tool call (see "Batch Image Capture" in rules/auto-core-workflows.md). This saves ~40-50% context compared to individual navigate/screenshot calls:
      browser_run_code({
        code: `async (page) => {
          const jobId = '[JOB_ID]';
          const dir = 'sessions/[ID]/iter-[NN]';
          for (let i = 0; i < 4; i++) {
            await page.goto('https://www.midjourney.com/jobs/' + jobId + '?index=' + i);
            await page.waitForTimeout(3000);
            await page.screenshot({ path: dir + '/img-' + (i + 1) + '.png' });
          }
          return 'All 4 images captured';
        }`
      })
      
    • You already know the exact prompt and parameters (from the session)
    • Analyze all 4 images in the grid using the 7 standard scoring dimensions (subject, lighting, color, mood, composition, material, spatial) — see rules/core-assessment-scoring.md. Score every dimension for every image, even if "not applicable" (score 1.0).
      • Flag any dimensions where agent confidence is low (especially spatial_relationships)
      • Identify the best candidate and explain why
      • Note consistency patterns: if all 4 miss the same thing, it's a prompt-level issue; if they diverge, it's MJ interpretation variance
    • Formulate gap analysis per image and overall
    • Present scores as PRELIMINARY — ask the user to validate before logging, especially for low-confidence dimensions
    • After user confirms/corrects, recommend next action using the Iteration Action Decision Framework: Upscale best, Vary promising (specify which image), or prompt edit
    • If user approves an action, perform it via browser and capture the result

Read the full file on GitHub · 185 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 · 185 lines · 0 tokens per session scan A 93602209cc44

Subscribe to this mod's changes

log-iteration is a command published in the GitHub repository JustinPerea/midjourney-cc-skill (12 stars, last pushed 7mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,532 tokens. 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.