
The tool we rebuilt
Magical is a text expansion and automation tool. You define shortcuts like /intro that expand into full text snippets — email intros, meeting follow-ups, support replies, anything you type repeatedly. Type the shortcut anywhere on the web (Gmail, Slack, LinkedIn, support tools), Magical replaces it with the full expansion. There's also a richer "Sheet automation" tier that does data filling from spreadsheets, but the core feature is text expansion.
Pricing: $10/month Personal, $25/month Team. The free tier limits you to 10 shortcuts. Premium removes the cap and adds team-shared shortcuts.
Text expansion is one of those tools where the cost gap between "what the tool charges" and "what the engineering actually costs" is the largest. It's pure local browser logic — detect the shortcut as the user types, replace with the expansion. No AI, no API, no backend. The reason Magical can charge $10/month is brand and polish, not technical complexity.
The rebuild is fast (8 minutes), the cost is the $29 PlugThis subscription with no ongoing API costs, and the result is identical functionality with full ownership.
What I built
A Chrome extension that watches every text input on the web (textarea, contenteditable, input fields). When the user types a configured shortcut like /intro followed by a space or tab, the extension replaces it with the configured expansion text in the same field.

Snippets are managed in a clean library view: list of shortcuts and their expansions, edit/delete actions, search across shortcuts and expansions, categories for organization.
Variables work too: an expansion can contain {{date}}, {{recipient_first_name}}, {{current_url}} that get filled in dynamically at expansion time.
It took 8 minutes. Output: 4 files, about 240 lines of code. No external dependencies.
The prompt I used
Notes on the prompt:
Trigger character requirement. Without a leading character, the extension would have to check every word the user types against the trigger list. With a leading /, it only checks words starting with /. Performance impact is huge — sub-millisecond detection vs noticeable lag.
Variables prompt inline. Magical's approach is to prompt for variables in a small popup near the cursor. The rebuild matches this — when a variable like {{recipient_first_name}} is used, a tiny prompt appears asking for the value, the user types it, the expansion completes. This makes templates with personalization actually usable.
Starter library pre-loaded. Empty-state for text expanders is a usability disaster. Users open the extension, see no snippets, don't know what to do. Pre-loading 15 useful templates means the user can see the value immediately and start customizing.
Per-site enable/disable. Some sites (like password fields, code editors) shouldn't have text expansion active. The setting lets users exclude these to avoid surprises.
How it works
Content script is the workhorse, running on every webpage. On page load, it:
- Reads all configured snippets from chrome.storage.local
- Builds an efficient lookup structure (a trie keyed by trigger characters)
- Attaches keyboard event listeners to all text input elements on the page
When the user types, the content script:
- Checks if the last word typed starts with the trigger character (default
/) - If yes, looks up the word in the trie
- If a match is found and the user typed a terminator (space, tab, or Enter), triggers expansion
Expansion happens via document.execCommand('insertText', false, expansionText) for contenteditable fields and direct value mutation for textarea/input. The original trigger text is removed first via cursor manipulation.
Variable substitution happens before insertion:
function substituteVariables(expansion) {
return expansion
.replace('{{date}}', new Date().toLocaleDateString())
.replace('{{time}}', new Date().toLocaleTimeString())
.replace('{{current_url}}', window.location.href)
.replace('{{page_title}}', document.title);
// Custom variables (like {{recipient_first_name}}) are handled separately
}
For variables that require user input ({{recipient_first_name}}), the content script:
- Detects unfilled variables in the expansion
- Pauses the expansion
- Shows a small inline popup near the cursor with a text input for each variable
- On submit, fills in the variables and completes the expansion
This is the trickiest part of the rebuild. The popup positioning, focus management, and keyboard handling all need to feel native. The first generation got it 80% right; one follow-up prompt to PlugThis ("the popup should auto-focus the first input and submit on Enter") brought it to 100%.
Snippets library page is the management UI. Standard CRUD: list snippets with search, add/edit modal, delete confirmation. About 100 lines of vanilla JavaScript.
Background worker is nearly empty — just initializes storage with the starter library on first install.
MutationObserver handles dynamic content. Modern webapps add text inputs dynamically (Gmail compose windows, Slack message inputs, dynamic forms). The content script uses MutationObserver to detect new inputs and attach listeners to them as they appear.
That's the whole extension. The performance characteristic matters: keyboard event handling has to be sub-millisecond or users notice the lag. The trie-based matching achieves this even with hundreds of snippets configured.
Cost breakdown

Magical Personal
Free tier limited to 10 snippets
PlugThis Starter
API: $0/month — no API required
Storage-only; unlimited snippets, no caps
Magical Personal at $10/month vs PlugThis Starter at $29/month. The headline price is higher.
Where it tilts:
No usage caps. Magical's free tier limits snippets to 10. The rebuild has no cap.
Marginal cost is zero. If you're already on PlugThis Starter for another extension, this one is free. Magical stays at $10/month.
No service dependency. Magical syncs to their servers. If they shut down, your snippets go with them. The rebuild's snippets live in chrome.storage.local. Works as long as Chrome exists.
Team sharing tradeoff. Magical's Team tier ($25/month) supports team-shared snippet libraries. The rebuild has JSON export/import but no real-time team sync. For teams that want shared snippets, Magical's value holds.
For solo users with more than 10 frequently-used snippets, the rebuild's ownership and unlimited count beats the subscription model — even at the higher headline price.
Side-by-side feature comparison
Magical Personal subscription
- Text expansion across all websites
- Variable support with inline prompts
- Cross-device sync (web + desktop apps)
- Team-shared snippet libraries (Team tier)
- Polished UI and onboarding
- $10/month, free tier capped at 10 snippets
- Centralized service — depends on Magical's uptime
PlugThis-built extension
- Text expansion across all websites
- Variable support with inline prompts
- Chrome only (no cross-device sync)
- JSON export/import for sharing (no real-time sync)
- Functional UI, less polished
- $29 PlugThis, unlimited snippets
- Fully local — no service dependency
The cross-device sync and team sharing gaps are real. For teams who need shared libraries with real-time updates, Magical is the better choice. For solo users on Chrome, the rebuild covers the core functionality with no caps.
Customization ideas

AI-generated expansions. Add a snippet type that calls OpenAI on expansion. E.g., /draft-reply reads the current email thread, sends to GPT-4 for a reply draft, replaces the trigger with the AI-generated reply. Combines text expansion with AI writing.
Conditional snippets. Snippets that branch based on context. /greeting expands to "Good morning" before noon, "Good afternoon" after. Useful for time-sensitive templates.
Multi-step snippets. Expansions that include multiple variables in sequence. The popup prompts for each variable in order, with smart defaults from clipboard or context.
Snippet stacking. One snippet expansion can include other snippets. /full-intro expands to /greeting + name lookup + value-prop. Build complex templates from simple building blocks.
Cloud sync via Supabase. For users who need cross-device sync, replace chrome.storage.local with Supabase. About 30 minutes of additional work. Snippets sync across all Chrome installs signed in to the user's account.
Per-domain snippet sets. Different snippets active on Gmail vs Slack vs Salesforce. Lets one user have specialized libraries for each tool.
Snippet sharing via URL. Generate a shareable URL that imports a specific snippet library. Useful for teams or sales communities sharing best-practice templates.
Time-tracked savings. Calculate "you saved X minutes this week with text expansion." Display on the snippets library page. Motivation + ROI proof.
Each is a small addition. The base infrastructure supports them.
Try it yourself
Drop the prompt into PlugThis, load into Chrome. The starter library of 15 snippets means you can use it immediately — type /intro-formal in Gmail to see it work. About 10 minutes from prompt to working text expander.
The fastest snippets to add for personal use: your name and full signature (/sig), your meeting link (/cal), common questions you answer in support tickets, common Slack messages ("OOO until Friday").
Related reading
- Magical alternatives — structured comparison — competitor analysis
- I rebuilt WriteSeed in 8 minutes — AI-augmented writing alternative
- I rebuilt Closely in 14 minutes — outreach-specific text use case
- The complete Chrome extension building guide — extension architecture explained
The Magical rebuild is the cleanest functional match in the series — pure local logic, identical core behavior, no API dependencies. For solo users with substantial template libraries, the rebuild's unlimited snippets beat Magical's tiered pricing. For teams needing shared real-time libraries, Magical's subscription value holds.