- name
- simpsons-search
- description
- Search and reference Simpsons episode scripts using Springfield! Springfield! as the source, with an optional local episode index for faster lookups. Use when a user asks for Simpsons quotes, wants to identify an episode by line or scene, compare recurring jokes or characters, or find short script excerpts and source links.
Simpsons Search
Use this skill to find Simpsons quotes and episode scripts without stuffing a giant corpus into context.
Source
Primary source:
https://www.springfieldspringfield.co.uk/episode_scripts.php?tv-show=the-simpsons
Preferred approach:
- keep a local episode index with titles + URLs
- optionally build a local searchable corpus cache for better quote accuracy
- fetch individual script pages when needed or while building the corpus
- return short excerpts plus the source link
Default to the index first. Build the corpus when the user wants stronger quote/scene search quality.
Workflow
- Read the local index at
references/simpsons-episodes.jsonif it exists. - If the index is missing or stale, refresh it with
scripts/build_index.py. - Search the index by episode title when the user asks for a known episode.
- Search the website or fetched script text when the user asks for:
- a quote fragment - a scene description - a character/topic pattern
- When the user wants a character voice or impression, read
references/simpsons-characters.jsonor use the helper scripts first. - Return:
- episode title or character name - script URL when relevant - a short excerpt, summary, or character brief - note when the match is approximate
Files
references/simpsons-episodes.json— local metadata index of episode titles and URLsreferences/cache/— cached fetched script pagesreferences/simpsons-corpus.json— optional local searchable corpus cachereferences/simpsons-characters.json— grounded character briefs for impressions and style matchingreferences/simpsons-character-evidence.json— script-derived evidence lines and episode presence for seeded charactersreferences/simpsons-character-dossiers.json— richer auto-built dossiers with top terms, related characters, and candidate catchphrasesscripts/build_index.py— rebuild the episode index from the source pagescripts/build_corpus.py— fetch/cache scripts and build a local searchable corpusscripts/build_search_index.py— build a lightweight inverted index for faster quote lookupsscripts/build_character_dossiers.py— synthesize richer character dossiers from the corpusscripts/find_episode.py— fuzzy local search over the indexscripts/find_quote.py— quote/topic search using the search index + local corpus when available, otherwise cached fetched pagesscripts/find_character.py— fuzzy character lookup over the local character briefsscripts/character_brief.py— human-readable character brief and imitation promptscripts/extract_character_evidence.py— derive character evidence snippets from the local script corpusscripts/rewrite_as_character.py— build a rewrite/imitation prompt package for a target characterscripts/speak_as_character.py— assemble a direct style guide package for replying as a chosen character
Common tasks
Find by title
Run:
python3 scripts/find_episode.py "steamed hams"Then fetch the matched page if needed.
Find by quote fragment or topic
Run:
python3 scripts/find_quote.py "steamed hams"Behavior:
- Prefer the local corpus if
references/simpsons-corpus.jsonexists. - Otherwise use the local index to shortlist candidates and fetch/cache likely script pages.
- Rank matches by phrase hit, term coverage, and term frequency.
- Return short excerpts with source links.
To build the stronger corpus cache:
python3 scripts/build_corpus.py
python3 scripts/build_search_index.pyFind a character voice
Run:
python3 scripts/find_character.py "mr burns"
python3 scripts/character_brief.py "mr burns"Use the returned brief before writing in-character text. Base the imitation on role, traits, rhythm, themes, and recurring attitudes.
To ground the brief with script evidence:
python3 scripts/extract_character_evidence.pyTo generate a rewrite prompt package:
python3 scripts/rewrite_as_character.py "moe" "i can't believe this meeting is still going"To build richer dossiers:
python3 scripts/build_character_dossiers.pyTo get a direct speaking-style package:
python3 scripts/speak_as_character.py "mr burns" "complain about modern coffee shops"Notes
- The local index is for discovery, not full-text script storage.
- The corpus improves quote accuracy but still depends on script-source quality.
- Character briefs are grounded style guides, not a claim of perfect canon simulation.
- If a quote search needs broader coverage, search the web first, then fetch the specific script page.
- Be explicit when the source appears user-maintained or imperfect.
- Keep excerpts short and useful.