From jack-tar-ollama
Generate an image and report the file path. When `--iterations` is greater than 1, run an iterative review-refine loop using your native vision to evaluate each image and improve the prompt between iterations.
How this skill is triggered — by the user, by Claude, or both
Slash command
/jack-tar-ollama:imageThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Generate an image and report the file path. When `--iterations` is greater than 1, run an iterative review-refine loop using your native vision to evaluate each image and improve the prompt between iterations.
Generate an image and report the file path. When --iterations is greater than 1, run an iterative review-refine loop using your native vision to evaluate each image and improve the prompt between iterations.
Consult the ollama-image-expert agent for all domain knowledge: scoring rubric, prompt engineering strategies, mutation rules, and convergence criteria.
Parse $ARGUMENTS for:
--prompt-file PATH to read a prompt from a filex/ prefix)output/YYYYMMDD-HHMMSS.png)If --prompt-file is specified, read the file contents as the prompt using the Read tool.
If no prompt and no --prompt-file is provided, stop and tell the user to provide a prompt.
Save the original prompt — you will need it if a full rewrite is required during refinement.
If no --model is specified, or to validate the user's model choice, discover available image generation models:
ollama list
Filter the output for models with the x/ prefix — these are image generation models. Examples: x/z-image-turbo, x/flux2-klein.
--model is specified: verify it appears in the list. If not, tell the user it's not available, show them the available x/ models, and suggest ollama pull MODEL.--model is NOT specified: default to x/z-image-turbo if available. If not, use the first available x/ model. If NO x/ models are available, tell the user to pull one: ollama pull x/z-image-turbo.If --steps was not explicitly provided, set defaults based on the model:
x/z-image-turbo: 8 steps (timeout auto-set to 120s)x/flux2-klein or other flux models: 20 steps (timeout auto-set to 600s)The helper script auto-detects timeouts per model. You do NOT need to pass --timeout unless the user explicitly requests it.
Before running any Python scripts, discover the plugin root:
PLUGIN_ROOT=$(python3 -c "
from pathlib import Path
import sys, os
if os.environ.get('JACK_TAR_OLLAMA_ROOT'):
print(os.environ['JACK_TAR_OLLAMA_ROOT']); sys.exit()
home = Path.home()
for base in [home / '.claude' / 'plugins' / 'cache']:
for p in base.rglob('jack-tar-ollama/.claude-plugin/plugin.json'):
print(str(p.parent.parent)); sys.exit()
dev = Path.cwd() / 'plugins' / 'jack-tar-ollama'
if dev.exists():
print(str(dev)); sys.exit()
print('NOT_FOUND')
" 2>/dev/null)
if [ -z "$PLUGIN_ROOT" ] || [ "$PLUGIN_ROOT" = "NOT_FOUND" ]; then
echo "ERROR: jack-tar-ollama plugin not found. Set JACK_TAR_OLLAMA_ROOT or install the plugin."
exit 1
fi
curl -s http://localhost:11434/api/tags
If this fails, tell the user: "Ollama is not running. Start it with: ollama serve" and stop.
If iterations is 1 (the default), run a single generation with no review:
python3 "$PLUGIN_ROOT/src/generate_image.py" --prompt "THE PROMPT" --model "THE MODEL" --output "THE PATH" --width WIDTH --height HEIGHT --steps STEPS [--seed SEED]
Run the generate-review-refine loop. Track iteration state as you go:
Determine the output path for this iteration. If --output was specified, use it for iteration 1 and append -iter-N for subsequent iterations (e.g., fox.png, fox-iter-2.png, fox-iter-3.png). If no --output, use output/YYYYMMDD-HHMMSS-iter-N.png.
Run the helper script with the current prompt:
python3 "$PLUGIN_ROOT/src/generate_image.py" --prompt "CURRENT PROMPT" --model "MODEL" --output "ITER PATH" --width WIDTH --height HEIGHT --steps STEPS
If the helper fails, report the error and stop.
Read the generated image using the Read tool — you can see it natively.
Evaluate the image against the original user prompt (not the refined prompt) using the scoring rubric from the ollama-image-expert agent. Score each of the 6 dimensions (1-10):
Calculate the weighted score. Be honest and critical.
Record this iteration in your history.
Check the convergence rules from the ollama-image-expert agent, in this priority order:
Identify the weakest-scoring dimension. Apply the mutation strategy from the ollama-image-expert agent based on the current score band:
Apply model-specific prompt structure from the agent (Z-Image Turbo structure vs FLUX spatial hierarchy).
The refined prompt becomes the current prompt for the next iteration. Loop back to Step 1.
On completion (whether one-shot or iterative), report:
For one-shot mode:
For iterative mode:
Do not ask follow-up questions. Do not offer to continue refining. Report and stop.
npx claudepluginhub stevegjones/jack-tar-deckhand --plugin jack-tar-ollamaCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.