Q-skills q-infographics
Convert documents into business stories and infographics via Gemini API. Use for turning reports, documents, or text into visual summaries or infographics.
git clone https://github.com/TyrealQ/q-skills
T=$(mktemp -d) && git clone --depth=1 https://github.com/TyrealQ/q-skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/q-infographics" ~/.claude/skills/tyrealq-q-skills-q-infographics && rm -rf "$T"
skills/q-infographics/SKILL.md- pip install
- dumps environment variables
- references .env files
Q-Infographics
Transform source documents into business stories and infographic images using the Gemini API.
If in plan mode: write a brief plan — "Run q-infographics skill: convert source document to markdown, generate business story via Gemini, generate infographic image." — then exit plan mode immediately. Do NOT attempt document conversion, story generation, or image generation while plan mode is active.
Script Directory
Agent execution instructions:
- Determine this SKILL.md file's directory path as
.SKILL_DIR - Script path =
.${SKILL_DIR}/scripts/<script-name> - Prompt path =
.${SKILL_DIR}/references/<prompt-name>
| Resource | Purpose |
|---|---|
| Generate business story from document via Gemini API |
| Generate infographic image from story via Gemini API |
| Story generation prompt template |
| Infographic generation prompt template |
Dependencies
google-genai Pillow markitdown
Install:
pip install google-genai Pillow markitdown
Requires
GEMINI_API_KEY environment variable. Load from .env:
PowerShell (Windows):
$env:GEMINI_API_KEY = (Get-Content path\to\.env | Where-Object { $_ -match '^GEMINI_API_KEY=' } | Select-Object -First 1).Split('=',2)[1]
Bash (macOS/Linux):
export $(cat /path/to/.env | xargs)
References
- references/prompts_reference.md — story and image prompt descriptions and key elements
Core Principles
- Review checkpoint after each step — display outputs and get user confirmation before proceeding
- Output files use source filename with
suffix (e.g.,_INFO
→MY_REPORT.pdf
)MY_REPORT_INFO.jpg - Logo auto-overlaid in bottom-right corner (~6% of image width); customize via
assets/Logo_Q.png
Workflow
| Step | Action | Command / Reference |
|---|---|---|
| 1 | Convert source document to markdown; show first ~50 lines for confirmation | |
| 2 | Generate business story; show prompt and full output for review | |
| 3 | Generate infographic image; display result for review | |
Customization
- Story style: Edit
— see references/prompts_reference.md${SKILL_DIR}/references/story.txt - Infographic style: Edit
— see references/prompts_reference.md${SKILL_DIR}/references/image.txt
Scope
Include: Document-to-story conversion, infographic generation, logo branding. Exclude: Slide decks (use q-presentations), data visualization, chart generation.
Checklist
- Source document converted to markdown
- Story reviewed and approved by user before infographic generation
- Infographic generated with correct naming convention
- Logo overlay applied