Ralphifier rewrites ordinary text as Ralph Wiggum would say it, using six distinct childlike reasoning mechanisms. Every level keeps the original meaning and the original speech act — a question stays a question, a warning stays a warning — and only changes how far Ralph's reasoning sits from an adult reading. It ships as a web app and as an installable Claude skill, both built from one contract.
Unofficial fan-made parody project. Not affiliated with or endorsed by Disney, Fox, or The Simpsons. See Assets and trademarks.
You paste some text, pick a Ralphiness level, and get a rewritten version back. The result is shown in a comic-style speech bubble next to Ralph artwork, ready to copy.
The rewrite must still communicate the input. Concretely, every level:
- preserves the central meaning — you can act on the rewrite the way you would have acted on the source
- preserves the speech act — questions stay questions, refusals stay refusals, warnings keep the warning
- preserves semantic anchors — subject, action, negation, addressee, stated reason
- carries protected values through verbatim — names, dates, times, money, URLs, commands, code, file paths, technical identifiers
- stays concise, and keeps short input short
- never invents an unrelated scene, and never pads with generic childish filler
That last pair matters: a rewrite that wanders into a cafeteria is the failure mode this project exists to prevent, not a feature of the style.
Two layers enforce it. The prompt states the contract, and src/lib/rewrite/fidelityGuard.ts re-derives the checks from your input at request time — if a rewrite drops the negation, the question mark, the apology, or a protected value, the request is retried with a targeted correction rather than returned broken.
It is still a language model. Higher levels are deliberately less literal, so re-read the output before using it anywhere that facts matter.
Each level is one reasoning mechanism, not a dial for how much of the message survives.
| Level | API id | Mechanism | What Ralph does |
|---|---|---|---|
| Gold Star | gold-star |
literal reading | Takes one word at face value and still delivers the message |
| Super Special | super-special |
proud simplification | Restates it in the smallest words and is proud of knowing it |
| The Berries Taste Like Burning | berries-burning |
sensory misattribution | Reports the situation as a body sensation and finds it interesting |
| I Think I Wet My Bed | wet-bed |
consequence misreading | Spots a real consequence and blames a much smaller, innocent cause |
| The Deep End of the Sandbox | sandbox-deep-end |
invisible premise | Adds one unseen adviser or secret rule and trusts it completely |
| I'm in Danger | in-danger |
cheerful alarm | Understands exactly how bad it is and is delighted anyway |
in-danger is the most factually faithful level, not the least: the joke is Ralph reading the situation correctly and reacting with the wrong emotion.
Famous lines are used as level names and stylistic reference points. Generated output is original parody text, not authentic Simpsons dialogue, and no level requires a catchphrase ending.
Input: Please restart the router.
| Level | Output |
|---|---|
gold-star |
Please restart the router. It has been awake this whole time and nobody ever told it to stop. |
super-special |
Turn the router off and then on again. I know both of the ways to fix things and that is both of them. |
berries-burning |
Please restart the router. It is making the warm humming smell again, which means it is thinking too hard. |
wet-bed |
Please restart the router. The internet went away, and I think I used up too much of it. |
sandbox-deep-end |
Please restart the router. The little man inside can only count to the internet once, then he has to begin again. |
in-danger |
Please restart the router. Nothing works and nobody can call anybody for help. This is the best day. |
Every row is still a request, still about the router, still two sentences.
git clone https://github.com/jdepew88/Ralphifier.git
Set-Location .\Ralphifier
npm install
npm run devVite prints the local URL when it starts — typically http://localhost:5173, though the port changes if that one is taken.
npm run dev also serves POST /api/rewrite using the same handler as production, proxied to your Cloudflare account's Workers AI binding. That part needs npx wrangler login; without it the endpoint returns a clear ai_binding_missing error while the rest of the UI still works.
To run the built site against the real Cloudflare Pages Functions runtime:
npm run dev:cfnpm test
npm run build
npm run lint
npm run format:check
npm run typecheck
npm run validate:skill
npm run audit:distSkill-specific gates:
| Command | Checks |
|---|---|
npm run sync:skill |
Copies the canonical skill into skill-package/ |
npm run check:skill-sync |
Fails if the packaged copy has drifted from the canonical source |
npm run build:skill-zip |
Syncs, then rebuilds public/downloads/ralph-wiggum-rewriter.zip |
npm run verify:skill-zip |
Extracts the ZIP and byte-compares SKILL.md against the source |
npm run validate:skill |
Checks both skill copies against the rewrite contract |
npm run test:installer |
Runs install.ps1 / uninstall.ps1 against a temporary fake home |
npm run evaluate:ralph |
Scores the recorded rewrite outputs from both surfaces |
npm run build runs build:skill-zip and verify:skill-zip, so a build cannot ship a stale or unsynchronized archive.
The canonical skill lives at:
.claude\skills\ralph-wiggum-rewriter\SKILL.md
skill-package\ralph-wiggum-rewriter\SKILL.md and the downloadable ZIP are generated copies of that file, and CI fails if they drift.
The skill is not "make it sound childish." It is the same rewrite contract the website enforces:
- preserves the original intent and central meaning
- preserves the speech act, including negation in warnings and refusals
- applies exactly one level-specific reasoning mechanism per rewrite
- keeps protected values — names, dates, times, money, URLs, commands, code, paths — intact
- refuses to invent unrelated scenes or insert generic school/cafeteria/crayon filler
- returns concise, original dialogue and nothing else — no preamble, no explanation
- ships its own invocation contract, so it works standalone with no website, UI labels, or hidden application state
Accepted level identifiers:
gold-star
super-special
berries-burning
wet-bed
sandbox-deep-end
in-danger
With no level supplied it defaults to gold-star. There is no seventh level; retired ids such as special and very-special are rejected.
Because the skill lives under .claude/skills/, it is available automatically to Claude Code sessions started inside this repository. The two methods below install it for all your projects.
Set-Location .\skill-package
.\install.ps1install.ps1 copies skill-package\ralph-wiggum-rewriter\SKILL.md to:
%USERPROFILE%\.claude\skills\ralph-wiggum-rewriter\SKILL.md
If a previous installation exists, it is moved aside to a timestamped ralph-wiggum-rewriter.backup.<yyyyMMdd-HHmmss> folder first. To remove it again, run .\uninstall.ps1 from the same folder (it prompts for confirmation; pass -Force to skip the prompt).
Download public/downloads/ralph-wiggum-rewriter.zip. The archive contains exactly one file:
ralph-wiggum-rewriter\SKILL.md
Extract it into your user-level Claude skills directory — the same destination the installer uses — so the skill folder lands at %USERPROFILE%\.claude\skills\ralph-wiggum-rewriter\:
Expand-Archive -Path .\ralph-wiggum-rewriter.zip -DestinationPath "$HOME\.claude\skills" -ForceRestart Claude Code afterwards so the new skill is picked up.
Rewrite this using the ralph-wiggum-rewriter skill at gold-star level:
The server will restart at 3:00 PM.
The server will restart at 3:00 PM, which is when it gets to lie down for a second.
Ralphify this at sandbox-deep-end level:
Run npm install before starting the development server.
Run npm install before you start the development server. The little librarian in there says she cannot hand out any of the parts until somebody asks her first.
Ralphify this at wet-bed level:
I don't want to.
I don't want to. My legs already sat down, so I think they heard me before I said it.
Note what survives in each: 3:00 PM and npm install are reproduced exactly, the instruction is still an instruction, and the refusal is still a refusal. A rewrite that dropped any of those would fail npm run evaluate:ralph.
- React 19 + TypeScript UI
- Vite for dev server and production builds
- Vitest + Testing Library for unit and component tests
- Cloudflare Pages Functions (
functions/api/rewrite.ts) calling Workers AI for the rewrite endpoint - Shared rewrite core in
src/lib/rewrite/used by both the Pages Function and the tests - Claude skill packaging under
skill-package/, zipped byscripts/build-skill-zip.mjsand checked byscripts/validate-skill-package.mjs
The rewrite rules exist in exactly two authored places, and everything else is generated from or tested against them:
| File | Role |
|---|---|
.claude/skills/ralph-wiggum-rewriter/SKILL.md |
Canonical skill. The packaged copy and ZIP are generated from it. |
src/lib/rewrite/contract.ts |
Canonical prose for the production system prompt. |
scripts/skill-contract.mjs |
Machine-readable clause list both are tested against. |
scripts/skill-contract.mjs is imported by the validators, the ZIP verifier, and the Vitest suites, so the same clause list is checked against the API prompt, the source skill, the packaged skill, and the SKILL.md extracted from the published ZIP. A rule added to one surface and forgotten on another fails CI.
Runtime enforcement lives in src/lib/rewrite/fidelityGuard.ts; offline scoring of recorded outputs lives in src/lib/rewrite/evaluation.ts and evaluation/.
The rewrite model is @cf/meta/llama-4-scout-17b-16e-instruct. The earlier @cf/meta/llama-3.2-3b-instruct default could not hold the contract — it dropped speech acts, invented unrelated scenes, and inverted a safety warning. See evaluation/README.md for the recorded evidence and the cost trade-off.
Turnstile verification and rate limiting exist as documented, unimplemented hooks in the request handler.
Ralphifier is Cloudflare-compatible: wrangler.jsonc defines a Pages project named ralphifier with a Workers AI binding, and npm run deploy wraps wrangler pages deploy dist.
There is no production deployment, and no live URL is provided. Deploying is left to you: build the site, then publish dist/ to a Cloudflare Pages project you own, with the AI binding configured. Do not deploy over the sibling Excellentifier project.
The repository ships only processed WebP runtime assets, all under public/assets/ralph/. There is no tracked assets/ source folder:
- Original source captures are not included in the repository, and
/assets/is git-ignored so a local scratch folder cannot be committed by accident. - Animated source material was converted to animated WebP — frame order, per-frame delays, and infinite looping preserved. Nothing was flattened to a static first frame. Every level also has a
-stillWebP used on mobile and underprefers-reduced-motion. - No
.gif,.jpg,.jpegor.pngis served at runtime.npm run audit:distandsrc/config/ralphAssets.test.tsfail the build if one appears.
To regenerate the artwork, point the scripts at a source directory you control:
python .\scripts\convert-ralph-animations.py --input "<your source folder>"
python .\scripts\process-ralph-assets.py --input "<your source folder>"Both default to writing into public\assets\ralph; pass --output to change that. Contributors should commit the generated WebP files only — never the raw captures.
- Ralph Wiggum and The Simpsons are third-party intellectual property.
- This is an unofficial fan-made parody project.
- It is not affiliated with or endorsed by Disney, Fox, or The Simpsons.
- Character artwork in
public/assets/ralph/is not covered by the MIT license. Image rights are entirely separate from the code license. - Redistribution rights for those images may be limited. If you fork this repository, review your own rights before republishing the artwork.
- The MIT license covers the original project code only.
Details: ASSET_LICENSES.md and NOTICE.md.
Original source code is licensed under the MIT License — see LICENSE. That license is subject to the separate third-party asset notice above.
See CONTRIBUTING.md and SECURITY.md.