{"skill":{"slug":"infographic-creator","displayName":"Infographic creator socials","summary":"Generate modern operator-style social-media infographics (Twitter, LinkedIn, Instagram) using OpenAI gpt-image-2. Use this skill whenever the user wants to m...","description":"---\nname: infographic\ndescription: >\n  Generate modern operator-style social-media infographics (Twitter, LinkedIn, Instagram) using OpenAI gpt-image-2.\n  Use this skill whenever the user wants to make an infographic, design a Twitter or LinkedIn visual, draft a cheat sheet, create a comparison graphic, build a branded image post, ship a content carousel, or produce a recurring weekly visual series. The skill owns the full pipeline: idea selection, layout choice, asset enrichment via Google favicons, copywriting refinement through targeted questions, and final rendering via the OpenAI images.edit endpoint with reference logos and avatar.\n  Trigger on: \"make an infographic\", \"design a Twitter visual\", \"draft a cheat sheet\", \"create a social graphic\", \"branded image post\", \"comparison graphic\", \"before/after visual\", \"ranked list image\", \"process flow infographic\", \"hero chart for tweet\", \"framework graphic\", \"carousel post\", \"weekly social series\", \"LinkedIn carousel\", \"Instagram graphic\", \"twitter image\", \"social card\".\n  Also trigger when a user asks to render any kind of designed image with text + structured layout for social distribution, even if they don't say \"infographic\" specifically — for instance \"I want to share these 5 lessons as a visual\" or \"turn this comparison into a graphic.\" This skill is designed to avoid the generic AI-image look and produce graphics that read as intentional, branded, and on-trend for product/founder/operator content.\nmetadata:\n  requires:\n    env:\n      - OPENAI_API_KEY\n    bins:\n      - python3\n      - curl\n    pip:\n      - openai\n      - cairosvg\n---\n\n# Infographic generator\n\nA pipeline for producing branded, operator-style infographics for social media. The design system is reverse-engineered from top product creators on LinkedIn — the look is clean grid structure + handwritten annotations + flanking emojis + signed footer. Outputs are ready for Twitter, LinkedIn, or Instagram.\n\nThe skill renders via OpenAI `gpt-image-2` using the `images.edit` endpoint so the user's logos, screenshots, and avatar are honored as visual references rather than hallucinated.\n\n---\n\n## What this skill produces\n\n- **Single-image infographics** in 4:5 portrait, 1:1 square, or 16:9 landscape\n- **Consistent visual identity** across posts via a saved theme color + avatar\n- **12 layout templates** (L1–L12) covering comparisons, before/after, stage flows, ranked lists, hero charts, framework grids, cheat sheets, ladders, myth/truth, process grids, visual metaphors, and annotated screenshots\n- **Reusable prompt patterns** so each new piece takes ~5 minutes from idea to PNG\n\n---\n\n## Project layout\n\nWhen the skill is first used in a project, it creates a working directory:\n\n```\ninfographics/\n├── style.json          # active theme (filled at runtime: accent color, handle, avatar path)\n├── assets/             # logos, screenshots, avatar (user-supplied)\n├── outputs/            # rendered PNGs\n└── prompts/            # one .py file per generated piece, kept for re-rendering\n```\n\nIf this directory already exists, reuse the existing `style.json` (don't re-ask theme questions every session).\n\n---\n\n## The 5-step workflow — always follow\n\nWhen the user asks for a new infographic, run these steps in order. Don't shortcut.\n\n### Step 1 — Find the idea\n\nIf the user gave a clear topic, skip ahead. Otherwise:\n- Surface 3–5 candidate ideas as a short table (idea title, why it'll resonate, suggested layout, suggested format).\n- Pull from what you know about the user's work, recent context, or industry. Avoid generic ideas — specificity drives engagement.\n- Recommend ONE pick with reasoning. Wait for confirmation.\n\n### Step 2 — Select layout + format\n\nPick one layout from `references/style-guide.md` (L1–L12). Justify briefly.\n\nThen pick a Twitter/LinkedIn format:\n\n| Format | gpt-image-2 size | When to use |\n|---|---|---|\n| **4:5 portrait** | `1024x1536` | Default. Dense data — comparison tables, cheat sheets, ranked lists. Highest engagement. |\n| **1:1 square** | `1024x1024` | Single hero metaphor, hooks, hero charts. Punchy in-feed. |\n| **16:9 landscape** | `1536x1024` | Process flows, timelines, before/after spreads. |\n\n**Rotation rule:** if the user is producing a series, alternate formats across posts to break feed monotony. Don't ship 5 portraits in a row.\n\n### Step 3 — Enrich with logos + images\n\nIdentify every brand, tool, or person mentioned in the idea. For each:\n\n1. **Brand favicons via Google's favicon service**:\n   ```\n   https://www.google.com/s2/favicons?domain=DOMAIN&sz=128\n   ```\n   This is the most reliable logo source. Download with `curl -sL <url> -o assets/<name>.png`.\n\n2. **SVG-only logos**: convert to PNG with `cairosvg`. Install inside a virtualenv to avoid touching the system Python:\n   ```bash\n   python3 -m venv .venv && source .venv/bin/activate\n   pip install --quiet \"openai>=1.0\" \"cairosvg>=2.7\"\n   python3 -c \"import cairosvg; cairosvg.svg2png(url='in.svg', write_to='out.png', output_width=512)\"\n   ```\n   If a venv isn't an option, ask the user before falling back to a system-wide install (e.g. `pip install --break-system-packages`) — it can affect their global Python environment.\n\n3. **User avatar**: ask the user once for a photo path; copy into `assets/avatar.png` and reference in `style.json`.\n\n4. **Verify each PNG visually with the Read tool** before proceeding. If a favicon came back as a generic globe (domain has no favicon), warn the user and either skip the logo or ask for an alternate URL.\n\n### Step 4 — Copywriting (ask the user)\n\nThe visual quality is bounded by the copy quality. Ask 3–5 targeted questions to fill the prompt. Tailor them to the chosen layout. Examples:\n\n- **Title** (≤6 words, declarative or metaphorical) — what's the punch?\n- **Subtitle** (handwritten line, one conversational sentence)\n- **Section/row labels** specific to the layout (e.g. for L1: column headers + 5–7 row criteria)\n- **The takeaway** (closing one-line rule that goes in the cream callout box)\n- **Tone**: declarative / contrarian / playful / operator-honest\n\nDo NOT generate copy yourself. Wait for the user. Their voice is the differentiator — the moment you write the copy, the post sounds AI-generated.\n\n### Step 5 — Generate\n\n1. **Compose the prompt**: open `references/prompt-templates.md`, pick the right layout template, fill in all `{{...}}` placeholders with the user's confirmed copy, accent color, and reference image filenames.\n2. **Save the prompt** as a `.py` file in `infographics/prompts/<slug>.py` so it's re-runnable.\n3. **Render via gpt-image-2**: call `scripts/generate.py` (see that file for the exact API contract).\n4. **Read the output** with the Read tool and show it to the user inline.\n5. **Note any rendering issues** + offer one tightening pass (e.g. \"Hostinger logo came out fuzzy — want me to swap to a cleaner source?\").\n\n---\n\n## Style invariants — never break these\n\nThese are what make the output look intentional rather than AI-slop. Skipping any one of them dilutes the whole brand.\n\n1. **Accent color carries the piece.** Frame, accent words in the title, handwritten subtitle, hand-drawn arrows — all use the user's chosen accent. Read `style.json` for the active hex; if not yet set, ask the user.\n\n2. **Two emojis flank the title** (top-left + top-right). One literal, one emotional. Use 3D Apple-style emojis, never flat ones.\n\n3. **Handwritten subtitle** in a darker shade of the accent color (~25% darker), Caveat or Patrick Hand font. One sentence, conversational.\n\n4. **Footer signature pill**: black rounded pill at bottom-center, small circular avatar (from `assets/avatar.png`) on the left, the user's handle on the right. Anchors the brand.\n\n5. **Closing panel is mandatory.** Every piece ends with either a cream callout box (\"rule of thumb\"), a mint \"final insight\" panel, or a handwritten one-liner. Never end on raw data.\n\n6. **Use `images.edit`, not `images.generate`.** This is what lets reference logos and the avatar be honored. `generate` will hallucinate them.\n\n7. **Don't say \"purple\" (or any color word) verbally in the prompt** if it conflicts with the chosen accent hex. Models weight words higher than hex codes. Always describe the accent as the actual color word the user picked, AND include the hex.\n\n---\n\n## Worked example — comparison infographic\n\nUser says: *\"Make a comparison infographic of Linear vs Jira.\"*\n\n**Step 1** — Idea is clear. Skip to step 2.\n\n**Step 2** — Layout: **L1 (comparison table)** — head-to-head naturally maps to a table. Format: **4:5 portrait** for density. Confirm with user.\n\n**Step 3** — Fetch logos:\n```bash\ncurl -sL \"https://www.google.com/s2/favicons?domain=linear.app&sz=128\" -o assets/linear.png\ncurl -sL \"https://www.google.com/s2/favicons?domain=atlassian.com&sz=128\" -o assets/jira.png\n```\nRead both back to confirm they look right.\n\n**Step 4** — Ask:\n- Title (≤6 words): your suggestion?\n- Subtitle (handwritten, one line): the human take\n- 5–7 comparison rows: which dimensions matter (speed, pricing, integrations, learning curve, mobile, ...)\n- Takeaway: which side you actually pick + why\n- Tone: declarative / contrarian / playful?\n\n**Step 5** — Compose the L1 prompt from `references/prompt-templates.md`, fill in placeholders, save to `infographics/prompts/linear-vs-jira.py`, render at `1024x1536`, show output, note quirks.\n\n---\n\n## Pitfalls to avoid\n\n- **Color word/hex conflict** — if the user picks `#006EFF` (blue), don't leave the word \"purple\" or \"violet\" anywhere in the prompt. The model weights words higher than hex codes.\n- **Text density above ~12 cells** — gpt-image-2 starts garbling. Shorten cell copy or split into two posts.\n- **Brand-name moderation** — celebrity names, \"Tesla\", \"Apple\" (and other major brands sometimes) trip the safety system on `images.edit`. If you get a `moderation_blocked` error, swap the brand reference for a generic descriptor and retry.\n- **SVG logos** — gpt-image-2 won't accept them. Always convert to PNG first.\n- **Outer frame missing** — gpt-image-2 frequently drops the top edge of the outer accent frame. If a clean frame matters, composite it in Figma post-render (5 min job). Don't burn iterations chasing it.\n- **Tiny favicon source** — Google's favicon API sometimes returns a 32px image. The model can still use it as a reference but the rendered logo may look fuzzy. Try `&sz=256` first; if still small, source from the brand's press kit.\n- **Avatar drift** — gpt-image-2 will sometimes alter the avatar photo. If brand consistency matters, composite the real avatar over the rendered output in Figma.\n\n---\n\n## Security notes\n\nThis skill writes images, reads reference files, and uploads them to OpenAI. A few things to be deliberate about:\n\n- **API key scoping**: `OPENAI_API_KEY` should be a project-scoped key with a spending limit. Image-2 calls are billable and can run up if the loop misfires.\n- **Reference images stay inside `assets_dir`**: `scripts/generate.py` rejects absolute paths and `..` segments in filenames. Don't try to work around the guard — if you need a logo from elsewhere, copy it into `infographics/assets/` first.\n- **Output names must be bare basenames**: `out_name` is validated for the same reason. Use names like `linear-vs-jira`, never paths.\n- **Prompt files**: when invoking the CLI with `python3 generate.py path/to/prompt.txt …`, treat the prompt file as user-authored. Don't let an upstream agent point this at unrelated local files (the contents will be sent to OpenAI).\n- **Confidential assets**: logos, screenshots, and avatars are uploaded to OpenAI under your account. Don't include private/internal product UI you wouldn't paste into ChatGPT.\n- **Persistent style state**: `infographics/style.json` stores the user's accent color, handle, and avatar path. Treat it as branding metadata only — never store secrets there.\n\n---\n\n## Reference files\n\nWhen you need details, read these:\n\n- **`references/style-guide.md`** — full visual rules: 12 layouts (L1–L12), color tokens, typography, recurring motifs, tone of writing\n- **`references/prompt-templates.md`** — fill-in-the-blank prompt scaffolds, one per layout\n- **`references/style.json`** — machine-readable design tokens, runtime-edited to record the user's theme\n\n---\n\n## When the user has used this skill before\n\n- Don't re-ask their theme color or handle — read `infographics/style.json` from their project.\n- Reuse logos already in `assets/` (don't re-fetch).\n- Ask if they want to keep the same format as last post (rotation rule) or switch.\n\n---\n\n## When to recommend Figma post-processing\n\nImage-2 is great for the *layout + composition* but has known weak spots:\n- Pixel-perfect outer frames\n- Brand logos at small sizes (favicons under 64px)\n- Specific typography (forcing a real font like Inter)\n- Avatar fidelity\n\nIf any of these matter for a high-stakes post (launch announcement, sponsored content), generate the layout in image-2, then do a 5-minute touch-up in Figma to composite real logos + avatar + frame. Tell the user when that's worth doing.\n","tags":{"latest":"1.0.2"},"stats":{"comments":0,"downloads":429,"installsAllTime":1,"installsCurrent":1,"stars":0,"versions":3},"createdAt":1778086772224,"updatedAt":1778492864292},"latestVersion":{"version":"1.0.2","createdAt":1778160543702,"changelog":"- Added compiled Python cache file: scripts/__pycache__/generate.cpython-313.pyc.\n- Updated SVG-to-PNG logo conversion instructions to recommend using a virtual environment for safer package installs, with fallback guidance if a system-wide install is needed.\n- No changes to logic or core workflow; documentation updated for improved package management safety.","license":"MIT-0"},"metadata":null,"owner":{"handle":"berthelol","userId":"s17f6chz9ajttj83mwkxy58z2h83kr1d","displayName":"berthelol","image":"https://avatars.githubusercontent.com/u/15127949?v=4"},"moderation":null}