Meme factory skill
Generate memes using the memegen.link API.
by davila7·MIT license·★ 32,299 Stars on the repo·GitHub ↗
Use now
npx degit davila7/claude-code-templates/cli-tool/components/skills/creative-design/meme-factory#main ~/.claude/skills/meme-factoryChecked ·commit main
Files of Meme factory
SKILL.md
Show the full text332 lines
Meme Factory
Create memes using the free memegen.link API and textual meme formats.
Triggers
| Trigger | Description |
|---|---|
/meme-factory |
Manual invocation |
/meme-factory {template} {top} {bottom} |
Direct meme generation |
meme-factory: create a meme about X |
Natural language request |
Quick Reference
| Action | Format |
|---|---|
| Basic meme | https://api.memegen.link/images/{template}/{top}/{bottom}.png |
| With sizing | ?width=1200&height=630 |
| Custom background | ?style=https://example.com/image.jpg |
| All templates | https://api.memegen.link/templates/ |
| Interactive docs | https://api.memegen.link/docs/ |
Additional Resources:
- Markdown Memes Guide - 15+ textual meme formats
- Examples - Practical usage examples
- meme_generator.py - Python helper script
Quick Start
Basic Meme Structure
https://api.memegen.link/images/{template}/{top_text}/{bottom_text}.{extension}
Example:
https://api.memegen.link/images/buzz/memes/memes_everywhere.png
Result: Buzz Lightyear meme with "memes" at top and "memes everywhere" at bottom.
Text Formatting
| Character | Encoding |
|---|---|
| Space | _ or - |
| Newline | ~n |
| Question mark | ~q |
| Percent | ~p |
| Slash | ~s |
| Hash | ~h |
| Single quote | '' |
| Double quote | "" |
Popular Templates
| Template | Use Case | Example |
|---|---|---|
buzz |
X, X everywhere | bugs/bugs_everywhere |
drake |
Comparisons | manual_testing/automated_testing |
success |
Victories | deployed/no_errors |
fine |
Things going wrong | server_on_fire/this_is_fine |
fry |
Uncertainty | not_sure_if_bug/or_feature |
changemind |
Hot takes | tabs_are_better_than_spaces |
distracted |
Priorities | my_code/new_framework/current_project |
mordor |
One does not simply | one_does_not_simply/deploy_on_friday |
Template Selection Guide
| Context | Template | Why |
|---|---|---|
| Comparing options | drake |
Two-panel reject/approve format |
| Celebrating wins | success |
Positive outcome emphasis |
| Problems ignored | fine |
Ironic "everything is fine" |
| Uncertainty | fry |
"Not sure if X or Y" format |
| Controversial opinion | changemind |
Statement + challenge |
| Ubiquitous things | buzz |
"X, X everywhere" |
| Bad ideas | mordor |
"One does not simply..." |
Validation
After generating a meme:
- URL returns valid image (test in browser)
- Text is readable (not too long)
- Template matches the message context
- Special characters properly encoded
- Dimensions appropriate for platform
Platform Dimensions
| Platform | Dimensions |
|---|---|
| Social media (Open Graph) | 1200x630 |
| Slack/Discord | 800x600 |
| GitHub | Default |
Anti-Patterns
| Avoid | Why | Instead |
|---|---|---|
| Spaces without encoding | URL breaks | Use _ or - |
| Too much text | Unreadable | 2-6 words per line |
| Wrong template | Message mismatch | Match template to context |
| Missing extension | Invalid URL | Always include .png, .jpg, etc. |
| Unencoded special chars | URL breaks | Use ~q, ~s, ~p, etc. |
| Assuming template exists | 404 error | Check templates list first |
Verification
Meme generation is successful when:
- URL is valid - Returns HTTP 200
- Image renders - Displays correctly in markdown
- Text is visible - Properly formatted on image
- Context matches - Template fits the message
Test command:
curl -I "https://api.memegen.link/images/buzz/test/test.png"
# Should return: HTTP/2 200
Deep Dive: Advanced Features
Image Formats
| Extension | Use Case |
|---|---|
.png |
Best quality, default |
.jpg |
Smaller file size |
.webp |
Modern, good compression |
.gif |
Animated templates |
Dimensions
?width=800
?height=600
?width=800&height=600 (padded to exact)
Layout Options
?layout=top # Text at top only
?layout=bottom # Text at bottom only
?layout=default # Standard top/bottom
Custom Fonts
View available: https://api.memegen.link/fonts/
?font=impact (default)
Custom Images
Use any image as background:
https://api.memegen.link/images/custom/hello/world.png?style=https://example.com/image.jpg
Deep Dive: Contextual Memes
Code Reviews
Template: fry
https://api.memegen.link/images/fry/not_sure_if_feature/or_bug.png
Deployments
Template: interesting
https://api.memegen.link/images/interesting/i_dont_always_test/but_when_i_do_i_do_it_in_production.png
Documentation
Template: yodawg
https://api.memegen.link/images/yodawg/yo_dawg_i_heard_you_like_docs/so_i_documented_the_documentation.png
Performance Issues
Template: fine
https://api.memegen.link/images/fine/memory_usage_at_99~/this_is_fine.png
Successful Deploy
Template: success
https://api.memegen.link/images/success/deployed_to_production/zero_downtime.png
Deep Dive: Workflow Integration
Generating Memes in Response
Here's a relevant meme:

Dynamic Generation (Python)
def generate_status_meme(status: str, message: str):
template_map = {
"success": "success",
"failure": "fine",
"review": "fry",
"deploy": "interesting"
}
template = template_map.get(status, "buzz")
words = message.split()
top = "_".join(words[0:3])
bottom = "_".join(words[3:6])
return f"https://api.memegen.link/images/{template}/{top}/{bottom}.png"
Using the Helper Script
from meme_generator import MemeGenerator
meme = MemeGenerator()
url = meme.generate("buzz", "features", "features everywhere")
print(url)
Deep Dive: API Reference
Endpoints
| Endpoint | Purpose |
|---|---|
/templates/ |
List all templates |
/templates/{id} |
Template details |
/fonts/ |
Available fonts |
/images/{template}/{top}/{bottom}.{ext} |
Generate meme |
API Characteristics
- Free and open-source
- No API key required
- No rate limiting (normal use)
- Stateless (all info in URL)
- Images generated on-demand
Error Handling
- Check template at https://api.memegen.link/templates/
- Verify text formatting (underscores for spaces)
- Check special character encoding
- Ensure valid extension
- Test URL in browser
References
| Document | Content |
|---|---|
| markdown-memes-guide.md | 15+ textual meme formats (greentext, copypasta, ASCII, etc.) |
| examples.md | Practical usage examples |
Scripts
| Script | Purpose |
|---|---|
| meme_generator.py | Python helper for meme generation |
Summary
Generate contextual memes to:
- Add humor to conversations
- Create social media visuals
- Make code reviews engaging
- Celebrate successes
Golden rule: Keep text concise, match template to context.
| 1 | |
| 2 | name meme-factory |
| 3 | description Generate memes using the memegen.link API. Use when users request memes, want to add humor to content, or need visual aids for social media. Supports 100+ popular templates with custom text and styling. |
| 4 | |
| 5 | |
| 6 | # Meme Factory |
| 7 | |
| 8 | Create memes using the free memegen.link API and textual meme formats. |
| 9 | |
| 10 | |
| 11 | |
| 12 | ## Triggers |
| 13 | |
| 14 | | Trigger | Description | |
| 15 | |---------|-------------| |
| 16 | | `/meme-factory` | Manual invocation | |
| 17 | | `/meme-factory {template} {top} {bottom}` | Direct meme generation | |
| 18 | | `meme-factory: create a meme about X` | Natural language request | |
| 19 | |
| 20 | |
| 21 | |
| 22 | ## Quick Reference |
| 23 | |
| 24 | | Action | Format | |
| 25 | |--------|--------| |
| 26 | | Basic meme | `https://api.memegen.link/images/{template}/{top}/{bottom}.png` | |
| 27 | | With sizing | `?width=1200&height=630` | |
| 28 | | Custom background | `?style=https://example.com/image.jpg` | |
| 29 | | All templates | https://api.memegen.link/templates/ | |
| 30 | | Interactive docs | https://api.memegen.link/docs/ | |
| 31 | |
| 32 | **Additional Resources:** |
| 33 | [Markdown Memes Guide] - 15+ textual meme formats |
| 34 | [Examples] - Practical usage examples |
| 35 | [meme_generator.py] - Python helper script |
| 36 | |
| 37 | |
| 38 | |
| 39 | ## Quick Start |
| 40 | |
| 41 | ### Basic Meme Structure |
| 42 | |
| 43 | |
| 44 | https://api.memegen.link/images/{template}/{top_text}/{bottom_text}.{extension} |
| 45 | |
| 46 | |
| 47 | **Example:** |
| 48 | |
| 49 | https://api.memegen.link/images/buzz/memes/memes_everywhere.png |
| 50 | |
| 51 | |
| 52 | Result: Buzz Lightyear meme with "memes" at top and "memes everywhere" at bottom. |
| 53 | |
| 54 | ### Text Formatting |
| 55 | |
| 56 | | Character | Encoding | |
| 57 | |-----------|----------| |
| 58 | | Space | `_` or `-` | |
| 59 | | Newline | `~n` | |
| 60 | | Question mark | `~q` | |
| 61 | | Percent | `~p` | |
| 62 | | Slash | `~s` | |
| 63 | | Hash | `~h` | |
| 64 | | Single quote | `''` | |
| 65 | | Double quote | `""` | |
| 66 | |
| 67 | |
| 68 | |
| 69 | ## Popular Templates |
| 70 | |
| 71 | | Template | Use Case | Example | |
| 72 | |----------|----------|---------| |
| 73 | | `buzz` | X, X everywhere | bugs/bugs_everywhere | |
| 74 | | `drake` | Comparisons | manual_testing/automated_testing | |
| 75 | | `success` | Victories | deployed/no_errors | |
| 76 | | `fine` | Things going wrong | server_on_fire/this_is_fine | |
| 77 | | `fry` | Uncertainty | not_sure_if_bug/or_feature | |
| 78 | | `changemind` | Hot takes | tabs_are_better_than_spaces | |
| 79 | | `distracted` | Priorities | my_code/new_framework/current_project | |
| 80 | | `mordor` | One does not simply | one_does_not_simply/deploy_on_friday | |
| 81 | |
| 82 | |
| 83 | |
| 84 | ## Template Selection Guide |
| 85 | |
| 86 | | Context | Template | Why | |
| 87 | |---------|----------|-----| |
| 88 | | Comparing options | `drake` | Two-panel reject/approve format | |
| 89 | | Celebrating wins | `success` | Positive outcome emphasis | |
| 90 | | Problems ignored | `fine` | Ironic "everything is fine" | |
| 91 | | Uncertainty | `fry` | "Not sure if X or Y" format | |
| 92 | | Controversial opinion | `changemind` | Statement + challenge | |
| 93 | | Ubiquitous things | `buzz` | "X, X everywhere" | |
| 94 | | Bad ideas | `mordor` | "One does not simply..." | |
| 95 | |
| 96 | |
| 97 | |
| 98 | ## Validation |
| 99 | |
| 100 | After generating a meme: |
| 101 | |
| 102 | [ ] URL returns valid image (test in browser) |
| 103 | [ ] Text is readable (not too long) |
| 104 | [ ] Template matches the message context |
| 105 | [ ] Special characters properly encoded |
| 106 | [ ] Dimensions appropriate for platform |
| 107 | |
| 108 | ### Platform Dimensions |
| 109 | |
| 110 | | Platform | Dimensions | |
| 111 | |----------|------------| |
| 112 | | Social media (Open Graph) | 1200x630 | |
| 113 | | Slack/Discord | 800x600 | |
| 114 | | GitHub | Default | |
| 115 | |
| 116 | |
| 117 | |
| 118 | ## Anti-Patterns |
| 119 | |
| 120 | | Avoid | Why | Instead | |
| 121 | |-------|-----|---------| |
| 122 | | Spaces without encoding | URL breaks | Use `_` or `-` | |
| 123 | | Too much text | Unreadable | 2-6 words per line | |
| 124 | | Wrong template | Message mismatch | Match template to context | |
| 125 | | Missing extension | Invalid URL | Always include `.png`, `.jpg`, etc. | |
| 126 | | Unencoded special chars | URL breaks | Use `~q`, `~s`, `~p`, etc. | |
| 127 | | Assuming template exists | 404 error | Check templates list first | |
| 128 | |
| 129 | |
| 130 | |
| 131 | ## Verification |
| 132 | |
| 133 | Meme generation is successful when: |
| 134 | |
| 135 | **URL is valid** - Returns HTTP 200 |
| 136 | **Image renders** - Displays correctly in markdown |
| 137 | **Text is visible** - Properly formatted on image |
| 138 | **Context matches** - Template fits the message |
| 139 | |
| 140 | **Test command:** |
| 141 | |
| 142 | curl -I "https://api.memegen.link/images/buzz/test/test.png" |
| 143 | # Should return: HTTP/2 200 |
| 144 | |
| 145 | |
| 146 | |
| 147 | |
| 148 | <details> |
| 149 | <summary><strong>Deep Dive: Advanced Features</strong></summary> |
| 150 | |
| 151 | ### Image Formats |
| 152 | |
| 153 | | Extension | Use Case | |
| 154 | |-----------|----------| |
| 155 | | `.png` | Best quality, default | |
| 156 | | `.jpg` | Smaller file size | |
| 157 | | `.webp` | Modern, good compression | |
| 158 | | `.gif` | Animated templates | |
| 159 | |
| 160 | ### Dimensions |
| 161 | |
| 162 | |
| 163 | ?width=800 |
| 164 | ?height=600 |
| 165 | ?width=800&height=600 (padded to exact) |
| 166 | |
| 167 | |
| 168 | ### Layout Options |
| 169 | |
| 170 | |
| 171 | ?layout=top # Text at top only |
| 172 | ?layout=bottom # Text at bottom only |
| 173 | ?layout=default # Standard top/bottom |
| 174 | |
| 175 | |
| 176 | ### Custom Fonts |
| 177 | |
| 178 | View available: https://api.memegen.link/fonts/ |
| 179 | |
| 180 | |
| 181 | ?font=impact (default) |
| 182 | |
| 183 | |
| 184 | ### Custom Images |
| 185 | |
| 186 | Use any image as background: |
| 187 | |
| 188 | |
| 189 | https://api.memegen.link/images/custom/hello/world.png?style=https://example.com/image.jpg |
| 190 | |
| 191 | |
| 192 | </details> |
| 193 | |
| 194 | <details> |
| 195 | <summary><strong>Deep Dive: Contextual Memes</strong></summary> |
| 196 | |
| 197 | ### Code Reviews |
| 198 | |
| 199 | |
| 200 | Template: fry |
| 201 | https://api.memegen.link/images/fry/not_sure_if_feature/or_bug.png |
| 202 | |
| 203 | |
| 204 | ### Deployments |
| 205 | |
| 206 | |
| 207 | Template: interesting |
| 208 | https://api.memegen.link/images/interesting/i_dont_always_test/but_when_i_do_i_do_it_in_production.png |
| 209 | |
| 210 | |
| 211 | ### Documentation |
| 212 | |
| 213 | |
| 214 | Template: yodawg |
| 215 | https://api.memegen.link/images/yodawg/yo_dawg_i_heard_you_like_docs/so_i_documented_the_documentation.png |
| 216 | |
| 217 | |
| 218 | ### Performance Issues |
| 219 | |
| 220 | |
| 221 | Template: fine |
| 222 | https://api.memegen.link/images/fine/memory_usage_at_99~/this_is_fine.png |
| 223 | |
| 224 | |
| 225 | ### Successful Deploy |
| 226 | |
| 227 | |
| 228 | Template: success |
| 229 | https://api.memegen.link/images/success/deployed_to_production/zero_downtime.png |
| 230 | |
| 231 | |
| 232 | </details> |
| 233 | |
| 234 | <details> |
| 235 | <summary><strong>Deep Dive: Workflow Integration</strong></summary> |
| 236 | |
| 237 | ### Generating Memes in Response |
| 238 | |
| 239 | |
| 240 | Here's a relevant meme: |
| 241 | |
| 242 |  |
| 243 | |
| 244 | |
| 245 | ### Dynamic Generation (Python) |
| 246 | |
| 247 | |
| 248 | def generate_status_meme(status: str, message: str): |
| 249 | template_map = { |
| 250 | "success": "success", |
| 251 | "failure": "fine", |
| 252 | "review": "fry", |
| 253 | "deploy": "interesting" |
| 254 | } |
| 255 | |
| 256 | template = template_map.get(status, "buzz") |
| 257 | words = message.split() |
| 258 | top = "_".join(words[0:3]) |
| 259 | bottom = "_".join(words[3:6]) |
| 260 | |
| 261 | return f"https://api.memegen.link/images/{template}/{top}/{bottom}.png" |
| 262 | |
| 263 | |
| 264 | ### Using the Helper Script |
| 265 | |
| 266 | |
| 267 | from meme_generator import MemeGenerator |
| 268 | |
| 269 | meme = MemeGenerator() |
| 270 | url = meme.generate("buzz", "features", "features everywhere") |
| 271 | print(url) |
| 272 | |
| 273 | |
| 274 | </details> |
| 275 | |
| 276 | <details> |
| 277 | <summary><strong>Deep Dive: API Reference</strong></summary> |
| 278 | |
| 279 | ### Endpoints |
| 280 | |
| 281 | | Endpoint | Purpose | |
| 282 | |----------|---------| |
| 283 | | `/templates/` | List all templates | |
| 284 | | `/templates/{id}` | Template details | |
| 285 | | `/fonts/` | Available fonts | |
| 286 | | `/images/{template}/{top}/{bottom}.{ext}` | Generate meme | |
| 287 | |
| 288 | ### API Characteristics |
| 289 | |
| 290 | Free and open-source |
| 291 | No API key required |
| 292 | No rate limiting (normal use) |
| 293 | Stateless (all info in URL) |
| 294 | Images generated on-demand |
| 295 | |
| 296 | ### Error Handling |
| 297 | |
| 298 | Check template at https://api.memegen.link/templates/ |
| 299 | Verify text formatting (underscores for spaces) |
| 300 | Check special character encoding |
| 301 | Ensure valid extension |
| 302 | Test URL in browser |
| 303 | |
| 304 | </details> |
| 305 | |
| 306 | |
| 307 | |
| 308 | ## References |
| 309 | |
| 310 | | Document | Content | |
| 311 | |----------|---------| |
| 312 | | [markdown-memes-guide.md] | 15+ textual meme formats (greentext, copypasta, ASCII, etc.) | |
| 313 | | [examples.md] | Practical usage examples | |
| 314 | |
| 315 | ### Scripts |
| 316 | |
| 317 | | Script | Purpose | |
| 318 | |--------|---------| |
| 319 | | [meme_generator.py] | Python helper for meme generation | |
| 320 | |
| 321 | |
| 322 | |
| 323 | ## Summary |
| 324 | |
| 325 | Generate contextual memes to: |
| 326 | Add humor to conversations |
| 327 | Create social media visuals |
| 328 | Make code reviews engaging |
| 329 | Celebrate successes |
| 330 | |
| 331 | **Golden rule:** Keep text concise, match template to context. |
| 332 |
Discussion
Browse more free Claude skills.