Docs/Skills and code/skill meme-fetcher
.claude/skills/meme-fetcher/SKILL.md
Given a situation (for example "people rolling in cash", "founder ignores the warnings"), search for memes and recognisable internet or Indian pop-culture clips that fit it, and add each new one to the meme template library…
name: meme-fetcher
description: Given a situation (for example "people rolling in cash", "founder ignores the warnings"), search for memes and recognisable internet or Indian pop-culture clips that fit it, and add each new one to the meme template library (research/meme-library) with use-when and don't-use-when metadata, skipping any meme already in the library. Use when the user asks for a meme, reaction image or clip for a situation, or to grow the meme library.
Meme fetcher
Finds memes for a situation and adds them to research/meme-library/catalogue.json without duplicating what is already there. The tool is scripts/library.cjs (Node, no dependencies; it is .cjs because the project is ESM). Paths below are relative to the repo root.
node .claude/skills/meme-fetcher/scripts/library.cjs search "<situation words>"
node .claude/skills/meme-fetcher/scripts/library.cjs exists --name "X" [--alias "Y"] [--url U] [--image-url U]
node .claude/skills/meme-fetcher/scripts/library.cjs add entry.json
node .claude/skills/meme-fetcher/scripts/library.cjs list
node .claude/skills/meme-fetcher/scripts/library.cjs validate
Exit code 2 means duplicate: nothing was written. Dedupe matches on name or alias, any shared source or image URL, and identical image bytes.
Steps
- Get the situation. One sentence from the user. If it is missing or too vague to tag ("something funny"), ask. Do not invent a company or story. If the user names a video beat, note it as
found_for. - Search the library first. Run
searchwith the situation words, and try a second wording. If a good entry already exists, report it and stop unless the user wants more options. Say plainly when the library has nothing. - Find candidates. Use several sources and do not trust any one:
- Google AI Mode (skill
google-ai-mode): ask for candidates with name, origin, feeling, format and owner, and for Indian and global options. Use it for names and leads only. It has invented scenes and misattributed songs before (seeresearch/video-production/sources/google-ai-mode-money-everywhere-memes-2026-11-02.md). - Know Your Meme (
https://knowyourmeme.com/memes/<slug>, via WebFetch): origin, date, meaning and the main image URL. Best source for "what it means". - Imgflip
https://api.imgflip.com/get_memes(free, about 100 popular templates): good for stills of common templates. Search needs Premium, so grep the list by name. - Wikimedia Commons for anything with a free licence.
- Google AI Mode (skill
- Verify each candidate before adding. Check the origin and the scene on at least one page that is not AI Mode (a Know Your Meme page, the film or show page, a reputable article). If you cannot, add it only with
UNVERIFIEDinnotes, an honestowner, andsources: []. Never write a source URL you have not opened. - Dedupe each candidate.
exists --name ... --alias ... --url ...(and--image-url). If it printsEXISTS as <id>, skip it and say which entry matched. Check variants: a meme often has two names. - Tier it.
- A: static image macro or template (caption is ours). May be fetched.
- B: clip from a film, TV show or music video. Catalogue only.
- C: creator reel or viral video with one owner. Catalogue only, and only if the clip is the thing under discussion.
- D: a private person's face (a viral kid, a stranger, a bystander, a "disappointed fan"). Never add. The tool refuses it, but it cannot tell, so check who is in the image before you write the entry. A politician or celebrity is not D, but note it in
notesand indont_use_when.
- Write the entry JSON in the scratchpad (not in the library), with:
name,aliases,tier,format,origin,owner(say how sure you are; never "public domain" unless a licence page says so),feeling,situations(5 to 8 lowercase tags a picker can match, in the words someone would say about a scene),use_when,dont_use_when,sources,notes, optionallyfound_forandimage_url(a direct image link, stills only).use_when: the kind of beat it fits, and what the voice-over should be doing.dont_use_when: at least two misfires: when it would mock real harm to people, when the number must be taken seriously, when it implies something false, when it needs a political reading, or when the clip would sit long on screen (claim risk).- Put problems in
notes: watermarks, logos, a copy that is low resolution, a rights holder named only by AI Mode.
- Add it.
add entry.json. For a still,image_urlmakes the tool download it (jpeg, png, gif or webp, 5 MB cap, rejected if not an image) intomedia/. Then open the saved file with Read and check it is the meme you meant, and add anything you see (watermark, logo, text) tonotesby editing the entry. Video clips are never downloaded by this skill: no YouTube downloaders, no re-uploads. They are catalogue-only until the user decides a source. - Rebuild the gallery.
node .claude/skills/meme-fetcher/scripts/gallery.cjsrewritesresearch/meme-library/index.htmlfrom the catalogue.addaccepts a JSON array too, so a batch for several situations goes in one call. Setfound_for(for example "Videocon v1-short B7 'The day the court came'") so the gallery's beat map shows where each meme sits. The page is only for viewing: if you want to look at it, serve the folder on localhost (the browser tool refusesfile://) and stop the server after. - Report. Per candidate: added, skipped as duplicate (which entry), or rejected (why). Say what was verified and what was not. Finish with
validate. Do not call a meme "cleared":clearancestaysunchecked; only the user changes it.
Rules
- Do not commit.
media/is gitignored: found images are not ours to commit. - Do not remove or overwrite existing entries; this skill only adds. To change an entry, edit the JSON by hand and run
validate. - Tier B and C entries mean the clip would be claimed or struck in practice. The video rules are being revisited; do not treat any tier as approved for a video.
- Do not use a download tool on a video platform, and do not take images from a site that forbids it.
- The Federal Reserve seal, broadcaster logos and stock-photo watermarks in an image are flagged in
notes.
Show the raw text
---
name: meme-fetcher
description: Given a situation (for example "people rolling in cash", "founder ignores the warnings"), search for memes and recognisable internet or Indian pop-culture clips that fit it, and add each new one to the meme template library (research/meme-library) with use-when and don't-use-when metadata, skipping any meme already in the library. Use when the user asks for a meme, reaction image or clip for a situation, or to grow the meme library.
---
# Meme fetcher
Finds memes for a situation and adds them to `research/meme-library/catalogue.json` without duplicating what is already there. The tool is `scripts/library.cjs` (Node, no dependencies; it is `.cjs` because the project is ESM). Paths below are relative to the repo root.
```
node .claude/skills/meme-fetcher/scripts/library.cjs search "<situation words>"
node .claude/skills/meme-fetcher/scripts/library.cjs exists --name "X" [--alias "Y"] [--url U] [--image-url U]
node .claude/skills/meme-fetcher/scripts/library.cjs add entry.json
node .claude/skills/meme-fetcher/scripts/library.cjs list
node .claude/skills/meme-fetcher/scripts/library.cjs validate
```
Exit code 2 means duplicate: nothing was written. Dedupe matches on name or alias, any shared source or image URL, and identical image bytes.
## Steps
1. **Get the situation.** One sentence from the user. If it is missing or too vague to tag ("something funny"), ask. Do not invent a company or story. If the user names a video beat, note it as `found_for`.
2. **Search the library first.** Run `search` with the situation words, and try a second wording. If a good entry already exists, report it and stop unless the user wants more options. Say plainly when the library has nothing.
3. **Find candidates.** Use several sources and do not trust any one:
- Google AI Mode (skill `google-ai-mode`): ask for candidates with name, origin, feeling, format and owner, and for Indian and global options. Use it for names and leads only. It has invented scenes and misattributed songs before (see `research/video-production/sources/google-ai-mode-money-everywhere-memes-2026-11-02.md`).
- Know Your Meme (`https://knowyourmeme.com/memes/<slug>`, via WebFetch): origin, date, meaning and the main image URL. Best source for "what it means".
- Imgflip `https://api.imgflip.com/get_memes` (free, about 100 popular templates): good for stills of common templates. Search needs Premium, so grep the list by name.
- Wikimedia Commons for anything with a free licence.
4. **Verify each candidate before adding.** Check the origin and the scene on at least one page that is not AI Mode (a Know Your Meme page, the film or show page, a reputable article). If you cannot, add it only with `UNVERIFIED` in `notes`, an honest `owner`, and `sources: []`. Never write a source URL you have not opened.
5. **Dedupe each candidate.** `exists --name ... --alias ... --url ...` (and `--image-url`). If it prints `EXISTS as <id>`, skip it and say which entry matched. Check variants: a meme often has two names.
6. **Tier it.**
- A: static image macro or template (caption is ours). May be fetched.
- B: clip from a film, TV show or music video. Catalogue only.
- C: creator reel or viral video with one owner. Catalogue only, and only if the clip is the thing under discussion.
- D: a private person's face (a viral kid, a stranger, a bystander, a "disappointed fan"). Never add. The tool refuses it, but it cannot tell, so check who is in the image before you write the entry. A politician or celebrity is not D, but note it in `notes` and in `dont_use_when`.
7. **Write the entry JSON** in the scratchpad (not in the library), with: `name`, `aliases`, `tier`, `format`, `origin`, `owner` (say how sure you are; never "public domain" unless a licence page says so), `feeling`, `situations` (5 to 8 lowercase tags a picker can match, in the words someone would say about a scene), `use_when`, `dont_use_when`, `sources`, `notes`, optionally `found_for` and `image_url` (a direct image link, stills only).
- `use_when`: the kind of beat it fits, and what the voice-over should be doing.
- `dont_use_when`: at least two misfires: when it would mock real harm to people, when the number must be taken seriously, when it implies something false, when it needs a political reading, or when the clip would sit long on screen (claim risk).
- Put problems in `notes`: watermarks, logos, a copy that is low resolution, a rights holder named only by AI Mode.
8. **Add it.** `add entry.json`. For a still, `image_url` makes the tool download it (jpeg, png, gif or webp, 5 MB cap, rejected if not an image) into `media/`. **Then open the saved file with Read and check it is the meme you meant**, and add anything you see (watermark, logo, text) to `notes` by editing the entry. Video clips are never downloaded by this skill: no YouTube downloaders, no re-uploads. They are catalogue-only until the user decides a source.
9. **Rebuild the gallery.** `node .claude/skills/meme-fetcher/scripts/gallery.cjs` rewrites `research/meme-library/index.html` from the catalogue. `add` accepts a JSON array too, so a batch for several situations goes in one call. Set `found_for` (for example "Videocon v1-short B7 'The day the court came'") so the gallery's beat map shows where each meme sits. The page is only for viewing: if you want to look at it, serve the folder on localhost (the browser tool refuses `file://`) and stop the server after.
10. **Report.** Per candidate: added, skipped as duplicate (which entry), or rejected (why). Say what was verified and what was not. Finish with `validate`. Do not call a meme "cleared": `clearance` stays `unchecked`; only the user changes it.
## Rules
- Do not commit. `media/` is gitignored: found images are not ours to commit.
- Do not remove or overwrite existing entries; this skill only adds. To change an entry, edit the JSON by hand and run `validate`.
- Tier B and C entries mean the clip would be claimed or struck in practice. The video rules are being revisited; do not treat any tier as approved for a video.
- Do not use a download tool on a video platform, and do not take images from a site that forbids it.
- The Federal Reserve seal, broadcaster logos and stock-photo watermarks in an image are flagged in `notes`.
Shown as it is in the repository at build time (2026-11-03); the home directory appears as <home>. If this page and the file differ, the file is right. Back to the catalogue.