Image candidate gallery

Generates several candidates per image slot, lets you choose side by side, and keeps the provenance of each.

#image generation#candidate review#pick gallery#provenance#ledger
Image pick gallery

WorkflowImage pick gallery

Creative & images CLI + local gallery

A CLI and Claude Code skill that, for each image slot or layout in a manuscript, produces several candidates with generative AI or tools, shows them side by side in a local gallery, and puts the author's pick back into the manuscript, all tracked in one ledger. You can later trace which candidate each image grew from.

Challenge

  • When one figure gets many versions from AI and by hand, nobody can tell which tool and which prompt produced which
  • Comparing means opening files one by one, and copying the chosen image back into the manuscript by hand invites mix-ups
  • Material that must not be published, or images of doubtful origin, can slip into a public target

Approach

  • Extract the image positions written in the manuscript as slots, write a brief per round and produce candidates: generated by Codex, ImageMagick or a Claude subagent, or registered from external tools
  • Record every candidate in a ledger (producer, model, where the prompt lives, parent candidate), show them side by side in a local gallery, and let the author pick by pressing submit there
  • Apply copies the chosen image into the manuscript's image folder, rewrites the reference, and commits and pushes once per job; before applying to a public target, privacy marks are checked

Outcome

  • "Where did this image come from?" is answered with a lineage (in use ← edited from ← original) plus the candidates rejected in the same round and why
  • Picks and applies are kept in the ledger, so an interrupted run can be finished with recovery commands
  • Only the author picks; an agent never picks on the author's behalf

This is for producing, comparing and choosing between many versions of the figures and chapter-opener layouts for a book manuscript, made with generative AI and by hand. The CLI (pickgal) holds all state in a ledger; the Claude Code skill only orchestrates the flow and holds no state of its own.

The flow is extract slots → write brief → produce candidates → compare and pick → apply to the manuscript. If no version is good enough, a new round is opened; the chosen one is committed into the manuscript automatically.

The full workflow

TaskWhoInputsOutputs
1. Extract slotspickgal CLIpickgalManuscriptSlots
2. Write briefpickgal CLIpickgalSlotsBrief
3. ProduceProducer + pickgal CLI + Image editorCodex or agent + pickgal + ImageMagickBriefCandidates
4. Show gallerypickgal CLIpickgalCandidatesGallery
5. Compare & pickAuthorauthorGalleryPick ledger
6. Applypickgal CLIpickgalPick ledgerUpdated draft
7. Tracepickgal CLIpickgalPick ledgerLineage
Image pick gallery

7 steps · 2 roles · started 2026-10-26 · 72 commits · 1,781 test functions

Image positions in the manuscript become slots; a brief is written, candidates are produced, the author picks in the gallery, and the CLI puts the pick back and commits it. Every stage is in the ledger.

  • All state lives in the CLI's ledger; the skill only directs the flow and remembers nothing
  • A person appears only when picking (5); a pick is recorded only when the author submits it or names a number clearly in conversation
  • Candidates come from an image model, a subagent or an image-editing tool; images made elsewhere can be registered too
  • Before anything is applied to a public target, it is checked for do-not-publish marks

Project folders involved (3)

This workflow does not live in one folder: it runs across projects.

pickgal (repository)
The CLI and gallery themselves, written with the standard library only
~/.claude/skills/pick-gallery
The skill that directs the flow (a link to the original kept in the CLI repository)
(private) book manuscript folder
A private book-manuscript folder: the manuscript the slots come from, plus the ledger and candidates
Extract slots

Step 1 · pickgal CLI

Extract slotsslots sync

Image positions written in the manuscript are pulled out as slots.

  • In the manuscript an image position is written as a placeholder image with an ID
  • The surrounding text is attached to the slot as context
  • A slot that is no longer needed is retired with a reason, not deleted
InputsManuscript
OutputsSlots
Write brief

Step 2 · pickgal CLI

Write briefbrief

A new round is opened and a brief says what to draw.

  • Without a brief, no candidates can be produced; the CLI stops and asks for the brief first
  • Briefs are kept per round, so you can see which instruction produced which candidate
  • The skill only reads the CLI's JSON output and reports back
InputsSlots
OutputsBrief
Produce

Step 3 · Producer + pickgal CLI + Image editor

Produceproduce

Candidates come from an image model, a subagent or an image editor.

  • A subagent gets a job ticket and may write only into one folder, with preset names and sizes
  • The CLI then validates content and size; candidates that fail cannot be picked
  • Each candidate records its producer, model, time, where the prompt lives and its parent

Claude CodeA subagent's result is taken as files, not as its report, and registered only after the CLI validates it

Common misconceptionA producer's opinion is never a pick; agents only produce candidates

InputsBrief
OutputsCandidates
Show gallery

Step 4 · pickgal CLI

Show galleryserve

Candidates are laid out side by side in a local gallery.

  • The gallery only reads the ledger and holds no state of its own
  • It is viewed through a local server started by the CLI, not by opening files directly
  • Badges on each card show whether it is picked and whether it is already in the manuscript
InputsCandidates
OutputsGallery
Compare & pick

Step 5 · Author

Compare & picksubmit

The author compares them side by side, picks one and submits.

  • A pick is recorded only from the author's submit or a clearly stated number in conversation
  • If it is unclear which slot a number belongs to, the session asks rather than guesses
  • If the gallery has gone stale, the author reloads and picks again
InputsGallery
OutputsPick ledger
Apply

Step 6 · pickgal CLI

Applyapply

The picked image goes back into the manuscript, committed and pushed.

  • It copies the image into the manuscript's image folder, rewrites the reference, and makes one commit per job
  • Each stage (write, commit, push) is recorded, so a stopped run can be finished with its own command
  • Places the author changed by hand are never silently overwritten

Common misconceptionA push also sends the author's own unpushed commits; that list is always reported to the author

InputsPick ledger
OutputsUpdated draft
Trace

Step 7 · pickgal CLI

Tracetrace

"Where did this image come from?" is answered from the ledger alone.

  • It shows the lineage: version in use ← edited from ← original
  • Candidates rejected in the same round are listed with their reasons
  • Anything not in the ledger is reported as not recorded, never filled in by guesswork
InputsPick ledger
OutputsLineage

Key points

Everything goes in the ledger. Each candidate records its producer, model, time, prompt location and parent, and candidates that fail validation cannot be picked. Questions about origin are answered from the ledger alone; anything not recorded is reported as not recorded.

People choose; machines carry. Agents and tools produce candidates, but a pick is recorded only when the author submits it in the gallery or names a number clearly in conversation. Putting it into the manuscript and into Git is done by the CLI automatically.

Interrupted runs can still finish. Apply records each stage (write files → commit → push) and shows where it stopped as a status. Each stage has a resume command, and places the author changed by hand are never silently overwritten.