TL;DR: A Context and a Variable resolve at different moments in the same prompt. Attaching a Context, whether through the toggle or a typed [c_id] shortcut, drops its full content into the prompt before Enhance ever runs. A {{variable}} stays literal through Enhance, and only becomes real text the instant you click Copy.
Most people learn Contexts and Variables one at a time: attach a context here, drop a {{tone}} token there. Combining contexts and variables in the same prompt is a different exercise, because the two features do not behave the same way once you click Enhance. One resolves immediately, server-side, before the AI ever sees your draft. The other stays exactly as you typed it, and only turns into real text the moment you click Copy. Get that order backward in your head and the setup looks broken even though nothing actually is.
This post is the mechanics, not the introduction. If you haven't used either feature yet, Global Variables Explained covers the {{name}} syntax on its own, and One Prompt System, Ten Clients covers Contexts and Variables together, but scoped to running one agency template across many clients. This post is the general setup: what each piece does when they're both in the same prompt, and the order they resolve in.
What's Actually Different Between a Context and a Variable?
A Context holds paragraph-length material: a brand voice guide, a project brief, a client's standing background. It's a block of prose you attach to a prompt rather than type inline. A Variable holds one atomic fact, a name, a rate, a tone word, referenced inline with {{name}} syntax. The plain test that holds up in practice: if you'd say the value out loud in one breath, it's a Variable; if you'd need to read it off a document, it's a Context.
That size difference is the whole reason both exist rather than one feature doing both jobs. A five-paragraph client overview crammed into a {{name}} slot reads like a wall of text wherever it's referenced inline. A single fact like a company name, stored as a Context, means opening and attaching a whole document just to get one word into a sentence. Contexts and Variables are sized for different problems, and the full setup described below uses each for the job it's actually built for.
How Do You Attach a Context to a Prompt?
There's no auto-injection. A Context only reaches a prompt one of two ways, both manual.
The first is the Personal Context toggle above the prompt box. Flip it on, and a picker opens showing every Context you own or your team has shared, each with a name and a content preview. Select one or more (your plan sets how many you can pick at once), close the picker, and every selected Context's full content rides along with your next Enhance, Refine, or Shorten call.
The second is the [c_id] shortcut token. Any Context can carry an optional short id, c_client_brief for example, and every Context that has one shows it as a small chip you can click to copy [c_client_brief] straight to your clipboard. Paste that token anywhere inside your prompt text, and the app resolves it server-side the moment you click Enhance, replacing the literal [c_id] with the Context's actual content before the request ever reaches the AI model. Reference the same id twice in one prompt and both occurrences resolve.
Either path is capped the same way: every Context's content field tops out at 5,000 characters, the identical number on every paid plan (CONTENT_MAX_LENGTH = 5000, hardcoded in the app's ContextModal.tsx, not a figure that scales with plan tier). Contexts also require Pro or above; the Free plan doesn't include a context library at all, so the combined setup in this post assumes at least a Pro account regardless of which plan gates your Variables.
Why Do Variables Behave Differently in the Same Prompt?
Everything above happens to Contexts before the AI model sees anything. Variables get the opposite treatment, and that's the part people combining the two features for the first time usually get backward.
A {{name}} token in your prompt is never substituted at Enhance time. The app scans your draft for variable tokens, looks up their current values, and passes those values to the model as a separate hidden instruction: treat these as one-off sample context so you understand what kind of value each placeholder represents, but keep every {{name}} literal in your response and never bake the sample value into the surrounding sentence. The result you see, and the version that gets saved to your history or library, still reads {{company_name}} in plain text.
Substitution happens exactly once, at the moment you click Copy, on the Improve Prompt result, a history row, or a saved library item. That single detail is the entire mechanism behind editing a variable once and having every prompt update: because the saved text stores the token and not the value, changing the variable changes what every prompt using it resolves to on its next copy, without you touching the saved prompt at all. Global Variables Explained walks through this half of the mechanism in full, including the team-sharing and MCP behavior; it applies unchanged whether or not a Context is also attached to the same prompt.
What Order Do Contexts and Variables Actually Resolve In?
Put both mechanisms in the same request and the order is fixed, not a choice you make:
Step 1 (Enhance click, server-side):
- Toggle-selected Contexts get attached in full.
- Any [c_id] shortcut in your typed prompt gets replaced with
that context's real content.
- If a toggle-selected context's id was ALSO resolved inline,
the toggle-selected copy is dropped so the AI doesn't see it twice.
Step 2 (same Enhance call, still server-side):
- {{name}} variable tokens in your prompt are left exactly as typed.
- Their current values go to the model separately, as background
only, so it can write around the placeholder sensibly.
Step 3 (Copy click, client-side, or immediate on an MCP call):
- Every {{name}} token in the result gets replaced with its
current value. This is the only step where a variable becomes
real text.
Practically, that means the prompt you enhance and the prompt you copy are never quite the same text. The Enhance result already has your Context's real content woven in (the AI wrote around real background), but still shows {{name}} literally wherever a variable belongs. Only Copy finishes the job.
This is verified directly against the app's own source, not against the public FAQ's looser description of variable timing. actions/ai.ts resolves [c_id] context tokens through resolveContextInputs before the AI call, and separately collects {{name}} variable ids only to build a hidden system instruction, never to substitute them into the prompt text itself. The substitution function that actually replaces {{name}} with a real value, resolveVars in lib/variables.ts, is only ever called from the client-side Copy handler.
The Full Setup: Combining a Library Template, a Context, and a Variable
Here's what the three-feature version looks like end to end, since a saved Library template is what turns this from a one-off prompt into something reusable.
- Create a Context with a shortcut id. Save your project brief, brand guide, or client background as a Context, and give it a short id like
c_project_briefin the same modal where you write the content. - Create a Variable for the one fact that changes per use. Something atomic:
{{audience}}or{{deliverable}}, a value you'll actually swap between runs rather than something that's true for the whole project. - Write the prompt once, referencing both. For example:
Using [c_project_brief], write a one-paragraph update for {{audience}} about {{deliverable}}.Save it to your Library so it's reusable, not a one-off draft. - Run Enhance. The
[c_project_brief]token resolves to your real project background immediately;{{audience}}and{{deliverable}}stay literal in the improved result. - Click Copy.
{{audience}}and{{deliverable}}resolve to whatever values you currently have saved, and the resolved text lands on your clipboard, ready to paste into ChatGPT, Claude, or wherever you're working. - Reuse it next week. Update the
{{audience}}variable to a different reader, or edit the Context when the project brief changes, and every future Copy of the same saved template reflects the update, without reopening the saved prompt.
| Mechanism | Attached via | Syntax | Resolves | Cap |
|---|---|---|---|---|
| Context (toggle) | Personal Context switch, then pick from a list | Full text, no inline token needed | At Enhance, server-side | 5,000 characters, Pro+ |
| Context (shortcut) | Typed inline | [c_id] | At Enhance, server-side | Same 5,000-character content |
| Variable | Typed inline | {{name}} | At Copy, client-side | Plan-dependent, not published |
| Variable via MCP | Passed through an MCP tool call | {{name}} | Immediately, no separate copy step | Same as web app |
What Goes Wrong the First Time You Combine Them?
A second thing that trips people up: expecting to see two copies of the same background when a Context is both toggled on and referenced by its [c_id] shortcut in the same prompt. It doesn't happen. The dedup rule described above drops the toggle-selected copy whenever its id was already resolved inline, so the AI receives the content exactly once regardless of which path (or both) you used to attach it.
A third: assuming a Variable resolved at Enhance time just because the improved prompt reads more naturally around it. It didn't resolve; the model was told to write generically around the placeholder using the sample value as a hint, which is a different thing from substitution. If you need to confirm a variable actually has a value set, check by clicking Copy, not by reading the Enhance result.
Does This Work the Same in the Chrome Extension and MCP?
The Chrome extension calls the identical enhance action the web app does, so the order above doesn't change: a toggled or [c_id]-referenced Context resolves before the request leaves your browser, and any {{name}} variable stays literal in the sidebar's result until you click its Copy button, on ChatGPT, Claude, Gemini, or any other platform the extension supports.
MCP is the one place a Variable behaves differently, not a Context. Because an MCP tool call (improve, refine, shorten, enhance) has no separate copy step for a client like Claude Desktop or Cursor to trigger, {{name}} tokens come back already substituted with real values instead of staying literal. Context resolution is unaffected either way, since it already happens server-side before the model runs, regardless of which client sent the request.
Why the Full Setup Is Worth Building
Prompt Architects' own usage data shows most customers never get this far. Contexts sit at 6.1% adoption and Variables at 2.0%, the two least-used named features behind the enhancer (69.7%) and the Library (23.8%); the average customer uses 1.16 of 7 features total (our customer data, July 2026, cited in CONTEXT.md). That same data names Library, Contexts, and MCP, specifically, as the three features that move retention the most when a customer adopts them together. Variables didn't make that named list, likely because so few people ever combine it with anything else to begin with, which is exactly the gap this post is written to close.
The setup above (a saved Library template, a Context for the paragraph-length background, a Variable for the one fact that actually changes) is what feature depth looks like in practice rather than as a statistic. None of the three pieces is complicated on its own. Combined, and understood in the right resolution order, they turn one saved prompt into something that survives a project changing shape without ever needing to be rewritten from scratch.
Stop rewriting prompts. Start shipping.
Works with ChatGPT, Claude, Gemini, Grok, Midjourney, Ideogram, Veo3 & Kling. 4.8★ on the Chrome Web Store.
Create An Account