ebook-writer: Skill for Claude Code

.claude/skills/image-generator/SKILL.md

image-generator is a skill for Claude Code from lowtidebuild/ebook-writer. It costs 0 tokens per session (1,244 once invoked), scanned A, original, Apache-2.0.

A pipeline that finds image markers in generated chapter files, creates the requested images, and inserts them into the Markdown chapters.

In plain words
What is it for?
Use it to create diagrams or illustrations through the configured image providers and place the results back into chapter files.
Why use it?
It removes the manual work of matching generated images to placeholders and reports entries that could not be completed.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: reads .claude/ paths; reads ~/.codex paths; mentions Codex.

This is lowtidebuild/ebook-writer's own configuration. It tells Claude Code how to work on ebook-writer 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 ebook-writer configures →

Reuse

Borrowing it

Nothing to install: this file belongs to lowtidebuild/ebook-writer. 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/lowtidebuild/ebook-writer/main/.claude/skills/image-generator/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/lowtidebuild/ebook-writer

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/lowtidebuild/ebook-writer/image-generator/github.svg)](https://agentmods.dev/skills/lowtidebuild/ebook-writer/image-generator)
Your own site
<a href="https://agentmods.dev/skills/lowtidebuild/ebook-writer/image-generator"><img src="https://agentmods.dev/badge/skills/lowtidebuild/ebook-writer/image-generator/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 image-generator

Your own site · 80×15
<a href="https://agentmods.dev/skills/lowtidebuild/ebook-writer/image-generator"><img src="https://agentmods.dev/badge/skills/lowtidebuild/ebook-writer/image-generator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,244 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.01244
Opus 5.5 $0.00000 $0.00498
Sonnet 5.5 $0.00000 $0.00249
Haiku 4.5 $0.00000 $0.00124

Measured 2mo ago against content hash 909d1bafe45d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

image-generator 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 2mo ago.

The scan reads SKILL.md. This mod also ships 4 executable files (scripts/extract_markers.py, scripts/generate_images.py, scripts/generate_prompts.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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/skills/image-generator/SKILL.md · 80 lines

How it starts

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

Image Generator Skill

Purpose

Extract [IMAGE: ...] markers from generated chapter files, generate matching images via a per-entry image provider, and insert the resulting images back into the markdown chapters. Four providers are supported and each entry is routed by image_type:

  • diagram (default for text-heavy diagrams: architecture, process_flow, comparison_table) — deterministic local SVG renderer. No API key, network, or private backend required.
  • gemini (default for illustrative types: concept_diagram, metaphor) — Google Gemini multimodal image output. Cheap, stable.
  • openai (explicit override only) — paid OpenAI Images API (gpt-image-*). Available when callers want the supported public API.
  • codex (explicit override only) — routes through god-tibo-imagen using local Codex CLI auth (~/.codex/auth.json). Backend is unsupported by OpenAI and may break without warning.

Failed entries remain blocking in final preflight. Insertion uses a neutral caption fallback instead of a visible [이미지 생성 실패] production artifact.

Pipeline

The skill operates as a 4-step script pipeline executed in order:

Step 1: Extract Markers (extract_markers.py)

Scans all .md chapter files for [IMAGE: description] patterns and produces an image_manifest.json listing every marker with its location, description, and a pending status.

.venv/bin/python3 .claude/skills/image-generator/scripts/extract_markers.py output/chapters/ko/ output/images/image_manifest.json

Step 2: Classify & Generate Prompts (generate_prompts.py)

The orchestrator first classifies each marker's image_type (concept_diagram, process_flow, comparison_table, architecture, metaphor) based on the description. Then generate_prompts.py applies type-specific prompt templates from references/prompt_templates/ to generate prompts, assigns each entry a provider, and fills output_path with the provider-specific extension. Set IMAGE_PROVIDER=diagram|codex|gemini|openai to override globally.

Read the full file on GitHub · 80 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. 2mo ago First seen · 80 lines · 0 tokens per session scan A 909d1bafe45d

Subscribe to this mod's changes

image-generator is a skill published in the GitHub repository lowtidebuild/ebook-writer (6 stars, last pushed 4mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 1,244 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.

Related

image-generator compared with skills from other repositories

image-generator next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
image-generatorlowtidebuild/ebook-writerSkill64mo agoApache-2.0A0Claude Code
imagegenopenai/codexSkill133kyesterdayApache-2.0A113Codex
playwright-climicrosoft/playwrightSkill99kyesterdayApache-2.0A19Claude Code
local-ai-agentsmicrosoft/ai-agents-for-beginnersSkill79k4d agoMITA200Claude Code, Codex
systematic-debuggingobra/superpowersSkill313k3d agoMITA21Claude Code
next-cache-components-adoptionvercel/next.jsSkill143kyesterdayMITA95Claude Code
next-partial-prefetching-adoptionvercel/next.jsSkill143kyesterdayMITA103Claude Code