New to Claude Skills? Learn how to install them →

nousresearch on GitHub

Meme Generation

Free

Create memes from templates with text overlays.

Get this skill

Free · Opens the source repo

What Meme Generation does

Meme Generation is a Python-based skill designed to create meme images using popular templates. By leveraging the Pillow library, this skill enables users to generate PNG files with customized text overlays. The skill supports approximately 100 popular templates from imgflip, allowing users to select a template that best fits their desired meme context. Additionally, there are 10 curated templates with hand-tuned text positioning for enhanced visual appeal.

To use the skill, users can specify a topic or situation, and the script will automatically select an appropriate template based on the theme. Users can provide captions for the meme, ensuring that the text is concise to maintain readability. The generated memes can be used in various contexts, from social media posts to internal communications, making it a versatile tool for both developers and designers who want to add humor or commentary to their work.

The skill operates in two modes: Classic Template and Custom AI Image. The Classic Template mode is straightforward, allowing users to pick from predefined templates, while the Custom AI Image mode provides flexibility for users wanting to create original memes that do not fit existing templates. This adaptability makes it suitable for a wide range of scenarios, from light-hearted jokes to commentary on serious topics.

Overall, Meme Generation is ideal for anyone looking to quickly create engaging and humorous content without needing extensive graphic design skills. It simplifies the meme creation process while ensuring that the output is visually appealing and contextually relevant.

When to use it

Use this skill when you need to generate a meme quickly based on a specific topic or situation.

When not to use it

This skill may not be suitable for creating memes that require highly customized graphics or intricate designs beyond the provided templates.

What you can build with it

Creating a meme for a team meeting

Generate a humorous meme to lighten the mood during a team meeting by selecting a relevant template and adding captions.

Social media engagement

Quickly create memes about trending topics to boost engagement on social media platforms.

Internal communications

Use memes to convey messages or feedback humorously within internal communications.

How to install Meme Generation

View source

1. Install with the skills CLI

npx skills add nousresearch/hermes-agent/meme-generation --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by nousresearch

Meme Generation

Generate actual meme images from a topic. Picks a template, writes captions, and renders a real .png file with text overlay.

When to Use

  • User asks you to make or generate a meme
  • User wants a meme about a specific topic, situation, or frustration
  • User says "meme this" or similar

Available Templates

The script supports any of the ~100 popular imgflip templates by name or ID, plus 10 curated templates with hand-tuned text positioning.

Curated Templates (custom text placement)

IDNameFieldsBest for
this-is-fineThis is Finetop, bottomchaos, denial
drakeDrake Hotline Blingreject, approverejecting/preferring
distracted-boyfriendDistracted Boyfrienddistraction, current, persontemptation, shifting priorities
two-buttonsTwo Buttonsleft, right, personimpossible choice
expanding-brainExpanding Brain4 levelsescalating irony
change-my-mindChange My Mindstatementhot takes
woman-yelling-at-catWoman Yelling at Catwoman, catarguments
one-does-not-simplyOne Does Not Simplytop, bottomdeceptively hard things
grus-planGru's Planstep1-3, realizationplans that backfire
batman-slapping-robinBatman Slapping Robinrobin, batmanshutting down bad ideas

Dynamic Templates (from imgflip API)

Any template not in the curated list can be used by name or imgflip ID. These get smart default text positioning (top/bottom for 2-field, evenly spaced for 3+). Search with:

python "$SKILL_DIR/scripts/generate_meme.py" --search "disaster"

Procedure

Mode 1: Classic Template (default)

  1. Read the user's topic and identify the core dynamic (chaos, dilemma, preference, irony, etc.)
  2. Pick the template that best matches. Use the "Best for" column, or search with --search.
  3. Write short captions for each field (8-12 words max per field, shorter is better).
  4. Find the skill's script directory:
    SKILL_DIR=$(dirname "$(find ~/.hermes/skills -path '*/meme-generation/SKILL.md' 2>/dev/null | head -1)")
    
  5. Run the generator:
    python "$SKILL_DIR/scripts/generate_meme.py" <template_id> /tmp/meme.png "caption 1" "caption 2" ...
    
  6. Return the image with MEDIA:/tmp/meme.png

Mode 2: Custom AI Image (when image_generate is available)

Use this when no classic template fits, or when the user wants something original.

  1. Write the captions first.
  2. Use image_generate to create a scene that matches the meme concept. Do NOT include any text in the image prompt — text will be added by the script. Describe only the visual scene.
  3. Find the generated image path from the image_generate result URL. Download it to a local path if needed.
  4. Run the script with --image to overlay text, choosing a mode:
    • Overlay (text directly on image, white with black outline):
      python "$SKILL_DIR/scripts/generate_meme.py" --image /path/to/scene.png /tmp/meme.png "top text" "bottom text"
      
    • Bars (black bars above/below with white text — cleaner, always readable):
      python "$SKILL_DIR/scripts/generate_meme.py" --image /path/to/scene.png --bars /tmp/meme.png "top text" "bottom text"
      
    Use --bars when the image is busy/detailed and text would be hard to read on top of it.
  5. Verify with vision (if vision_analyze is available): Check the result looks good:
    vision_analyze(image_url="/tmp/meme.png", question="Is the text legible and well-positioned? Does the meme work visually?")
    
    If the vision model flags issues (text hard to read, bad placement, etc.), try the other mode (switch between overlay and bars) or regenerate the scene.
  6. Return the image with MEDIA:/tmp/meme.png

Examples

"debugging production at 2 AM":

python generate_meme.py this-is-fine /tmp/meme.png "SERVERS ARE ON FIRE" "This is fine"

"choosing between sleep and one more episode":

python generate_meme.py drake /tmp/meme.png "Getting 8 hours of sleep" "One more episode at 3 AM"

"the stages of a Monday morning":

python generate_meme.py expanding-brain /tmp/meme.png "Setting an alarm" "Setting 5 alarms" "Sleeping through all alarms" "Working from bed"

Listing Templates

To see all available templates:

python generate_meme.py --list

Pitfalls

  • Keep captions SHORT. Memes with long text look terrible.
  • Match the number of text arguments to the template's field count.
  • Pick the template that fits the joke structure, not just the topic.
  • Do not generate hateful, abusive, or personally targeted content.
  • The script caches template images in scripts/.cache/ after first download.

Verification

The output is correct if:

  • A .png file was created at the output path
  • Text is legible (white with black outline) on the template
  • The joke lands — caption matches the template's intended structure
  • File can be delivered via MEDIA: path

Frequently asked questions about Meme Generation

Similar skills