一键导入
generate-section-images
Analyze a QMD file and generate images for sections that would benefit from visual aids (diagrams, charts, infographics, flowcharts).
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Analyze a QMD file and generate images for sections that would benefit from visual aids (diagrams, charts, infographics, flowcharts).
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Critique book prose in the author's voice using patterns learned from his own git edit history (not a hand-written rubric). Use when asked to "voice-check", "punch up", "make this sound like me / like Vonnegut / like Cunk", or to review whether a passage is too pompous / cute / self-aware. Catches what the regex scanner (voice-check.py, ~1.4% of real edits) misses.
Review and improve QMD chapter writing quality by replacing boring/consultant text with Wishonia's deadpan alien voice, consolidating redundancy, and reducing word count. Use when asked to fix voice, make content funnier, remove jargon, or enforce the book's writing style.
Spawns parallel agents to review all paperback QMD files. Reads variable-resolved previews, flags judgment-required issues with REVIEW comments.
Automated book maintenance. Runs health checks, prioritizes work, and systematically fixes issues. Use when you want Codex to autonomously improve the book.
Check GitHub Actions workflow status, diagnose failures, fetch logs, and fix common build issues. Use when builds fail, deploys break, or you need to investigate CI/CD problems.
Critically analyze a calculated parameter for academic rigor. Checks methodology, identifies weaknesses, suggests improvements for economist audiences.
| name | generate-section-images |
| description | Analyze a QMD file and generate images for sections that would benefit from visual aids (diagrams, charts, infographics, flowcharts). |
| allowed-tools | ["Bash","Read","Glob","AskUserQuestion"] |
Analyze a QMD file with Gemini and automatically generate images for sections that would benefit from visual aids.
/generate-section-images knowledge/economics/1-pct-treaty-impact.qmd
/generate-section-images @knowledge/appendix/invisible-graveyard.qmd
/generate-section-images (uses current context or recent git changes)
Priority order:
knowledge/economics/1-pct-treaty-impact.qmd)@knowledge/appendix/file.qmd)git diff --name-only HEAD~3 | grep "\.qmd$" | head -1If no file found, ask user to specify.
Use AskUserQuestion to confirm settings:
Style:
bw-academic (Recommended) - Clean black and white scientific illustrationretro-futuristic - Fun retro style with large textAspect Ratio:
1:1 (Recommended) - Square, consistent with manual generations3:4 - Portrait, book-friendly16:9 - Landscape, presentation-friendlyMode:
Generate (Recommended) - Analyze and generate imagesDry run - Show recommendations without generatingForce regenerate - Delete existing section images and regenerate allnpx tsx scripts/images/generate-section-images.ts <file.qmd> [options]
Options:
--retro-futuristic - Use retro style instead of bw-academic--aspect <ratio> - Aspect ratio: 1:1, 3:4, 9:16, 16:9--dry-run - Show recommendations without generating--force - Delete existing and regenerate allExamples:
# Default: bw-academic style, 1:1 aspect
npx tsx scripts/images/generate-section-images.ts knowledge/economics/1-pct-treaty-impact.qmd
# With options
npx tsx scripts/images/generate-section-images.ts knowledge/economics/1-pct-treaty-impact.qmd --aspect 3:4
# Dry run first
npx tsx scripts/images/generate-section-images.ts knowledge/economics/1-pct-treaty-impact.qmd --dry-run
# Force regenerate
npx tsx scripts/images/generate-section-images.ts knowledge/economics/1-pct-treaty-impact.qmd --force
After generation, check the prompt log:
cat image-prompts.log
This shows for each image:
Report:
assets/images/<qmd-basename>/Images are saved to: assets/images/<qmd-basename>/
Example:
knowledge/economics/1-pct-treaty-impact.qmdassets/images/1-pct-treaty-impact/Requires GOOGLE_GENERATIVE_AI_API_KEY environment variable.
Images not inserted:
[SKIP] messages)Images look wrong:
image-prompts.log to see what prompts were sentTo regenerate specific images:
assets/images/<qmd-basename>/![...]() reference from the QMD file