Skip to content

feat(skill): meme-generation — real image generator with Pillow#2344

Merged
teknium1 merged 3 commits intomainfrom
hermes/hermes-baa39faf
Mar 21, 2026
Merged

feat(skill): meme-generation — real image generator with Pillow#2344
teknium1 merged 3 commits intomainfrom
hermes/hermes-baa39faf

Conversation

@teknium1
Copy link
Contributor

Summary

Overhauls the meme-generation skill from a prompt-only concept brainstormer into an actual meme image generator. Produces real .png files with classic meme-style text overlay.

Cherry-picked original concept from PR #1771 by @adanaleycio, then overhauled with image generation.

What's included

  • Python script (generate_meme.py) using Pillow to overlay text on template images
  • 10 classic templates: Drake, This is Fine, Expanding Brain, Distracted Boyfriend, Two Buttons, Change My Mind, Woman Yelling at Cat, One Does Not Simply, Gru's Plan, Batman Slapping Robin
  • Auto-scaling font with pixel-accurate word wrapping (never breaks mid-word)
  • White text with black outline — classic meme style
  • Template image caching after first download from imgflip CDN
  • No API keys required — templates are public, rendering is local via Pillow

Moved to optional-skills

This is a niche creative skill — moved from skills/creative/ to optional-skills/creative/. Users install via:

hermes skills install official/creative/meme-generation

Usage

python generate_meme.py drake /tmp/meme.png "Writing unit tests" "Shipping straight to prod"
python generate_meme.py this-is-fine /tmp/meme.png "SERVERS ARE ON FIRE" "This is fine"
python generate_meme.py expanding-brain /tmp/meme.png "Level 1" "Level 2" "Level 3" "Level 4"
python generate_meme.py --list  # show all templates

Test plan

  • Full test suite passes (5744 passed)
  • Visually verified Drake, This is Fine, Expanding Brain, and Change My Mind templates
  • Text wrapping confirmed — no mid-word breaks
  • Font auto-scaling works for long text in narrow fields

@teknium1 teknium1 force-pushed the hermes/hermes-baa39faf branch from 4419f09 to 5ae0589 Compare March 21, 2026 17:02
@adanaleycio
Copy link
Contributor

Thanks for pulling this in and building on top of it. This started from my earlier PR #1771, where I added the initial meme-generation skill to the creative category and then followed up with a second pass focused on reducing prompt cost while keeping output quality intact. In that update, I tightened template selection into a more rule-based flow, kept optional overrides truly optional, shortened caption guidance, and explicitly discouraged over explanation. Glad to see both of those commits carried over here before the Pillow/image-generation expansion. Curious to see how you want the lightweight template-aware behavior from #1771 to coexist with the richer image-generation path going forward
@123mikeyd and I have been discussing and working on this issue for a while now, and we're still continuing.

Move from skills/creative/ to optional-skills/creative/ (niche skill,
not needed by default). Replace prompt-only meme concept brainstormer
with actual meme image generation:

- Python script using Pillow to overlay text on template images
- 10 curated templates with hand-tuned text positioning
- Dynamic access to ~100 popular imgflip templates via public API
- Custom image mode (--image): use AI-generated or any image as base
- Two text modes: overlay (white+outline on image) or bars (black bars)
- Vision verification workflow: use vision_analyze to QA the result
- Auto-scaling font with pixel-accurate word wrapping
- Template search via --search
- No API keys required

Original skill concept by adanaleycio (PR #1771), overhauled with
image generation and custom image support.
@teknium1 teknium1 force-pushed the hermes/hermes-baa39faf branch from 5ae0589 to 1f6c2b5 Compare March 21, 2026 19:47
@teknium1 teknium1 merged commit 1f1fa71 into main Mar 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants