ebook-writer: Skill for Claude Code

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

image-generator is a skill for Claude Code, Codex 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 CodeCodex

Written for Claude Code and Codex: installed under .claude/, but also reads ~/.codex or $CODEX_HOME. Also seen: reads .claude/ paths; mentions Codex.

This is lowtidebuild/ebook-writer's own configuration. It tells Claude Code and Codex 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, Codex.

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.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.svg" alt="Measured on agentmods" 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 $0.00000 $0.00622
Sonnet 5 $0.00000 $0.00249
Haiku 4.5 $0.00000 $0.00124

Measured 7d ago against content hash 909d1bafe45d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-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 7d 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. 7d 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 (5 stars, last pushed 2mo 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

Other skills, from other repositories

webgl-holographic-foil

A self-contained WebGL2 hero: thin-film interference over a crushed-foil surface whose palette shifts with the viewing angle; move the cursor to tilt the film.

nexu-io/open-design · 41 tokens

general-video

Author or edit a custom HyperFrames composition when no specialized workflow fits, or when BRIEF.md sets flow: companion. Use for longer or multi-scene pieces, brand and sizzle reels, montages, static loops, static title cards, footage remixes, and freeform builds. Use motion-graphics instead for a short unnarrated…

heygen-com/hyperframes · 92 tokens

html-ppt-hermes-cyber-terminal

OpenDesign + BYOK: choosing and wiring your own model, hands-on — cost, quality, and the routing decision. Built as a decision-grade AI literacy deck for engineers, IT, applied-AI teams.

nexu-io/open-design · 53 tokens

html-ppt-taste-brutalist

16:9 HTML deck in tactical-telemetry / CRT-terminal taste. Deactivated-CRT charcoal slides, white-phosphor monospace, hazard-red accent, scanline overlay, ASCII syntax, density over decoration. Distilled from Leonxlnx/taste-skill brutalist-skill (Tactical Telemetry mode).

nexu-io/open-design · 78 tokens

diagnostic-stem-delivery

Audio production with diagnostic analysis, timecode parsing from documents, and verified export workflow.

HKUDS/OpenSpace · 23 tokens

chengfeng-check-updates

An environment manager for a video-editing system. It checks whether its skills and runtime—the software needed to run them—are installed and compatible.

Agentchengfeng/chengfeng-videocut-skills · 120 tokens