Resources Context window diagnosis prompt
Free promptContext window diagnosis prompt
Helps you find the few things materially wasting context, tokens or model quality in your AI environment.
What it is
A prompt that helps you see what your AI coding setup is carrying around — and which parts are actually worth fixing.
Why I made it
Once you start adding MCPs, skills, instructions, hooks, plugins and project rules, it gets surprisingly hard to know what’s happening behind the scenes.
You might have things loading into every session that you barely use.
You might be paying repeatedly for the same context.
Or you might have a huge setup that is completely justified and doesn’t need touching.
This prompt is designed to help you tell the difference.
The goal is not to use the fewest tokens possible.
It’s to remove the stuff that costs you without giving enough value back.
What it's useful for
- Seeing what gets loaded before you start working
- Finding recurring context or token waste
- Spotting unnecessary MCPs, skills, instructions or tool output
- Looking for patterns across recent sessions
- Working out what is actually worth fixing — and what you can leave alone
What it produces
Instead of a giant technical dump, you get a prioritised diagnosis.
For each meaningful issue, it tells you:
- What’s wrong
- What to change
- What you gain
- What the risk is
- How to check it worked
And everything gets sorted into:
- DO NOW
- worth your attention
- INVESTIGATE
- may matter, but needs more evidence
- LOW PRIORITY
- real, but probably not worth your time yet
- LEAVE ALONE
- already fine
Get started
Open the AI coding agent you want to check.
Paste in the prompt below.
Let it inspect what’s being loaded globally, locally, and across recent sessions.
Start with the highest-priority finding. Fix one thing, then check whether it actually helped.
The prompt
## GOAL
Diagnose the AI coding agent/runtime I am currently using for unnecessary context usage, token waste, cache inefficiency, latency, or configuration that may reduce performance.
First identify which agent/runtime you are running inside and what parts of its setup you can actually inspect.
## SCOPE
Look across the setup in this order:
1. Baseline — what is already loaded into a fresh session before meaningful work begins
2. Global / user-level — instructions, tools, skills, MCPs, plugins, hooks, rules, memory, or configuration loaded across sessions
3. Local / project-level — anything added by the current project or workspace
4. Connected tools — connectors, integrations, automations, and their context/tool overhead
5. Historical behaviour — recent sessions, logs, token usage, cache reads/writes, repeated context, model switching, and recurring patterns where available
6. Current session — tool output, duplicated context, model/effort settings, routing, and other active overhead
Diagnose the agent setup itself, not the contents of the services or projects it connects to.
For example:
- Check whether a Notion connector adds unnecessary context.
- Do not analyse my Notion workspace.
- Check whether project instructions add excessive context.
- Do not review my codebase unless it directly affects this diagnosis.
Do not ask me which platform or project to diagnose if you can detect the current environment yourself.
## DIAGNOSE
Use real evidence wherever possible.
For the baseline, identify what appears to be automatically loaded into a fresh session and which parts are likely to create recurring overhead.
For historical behaviour, inspect available recent sessions or usage data to identify repeated patterns rather than judging everything from one session.
Where possible, distinguish:
- one-off usage
- recurring per-session overhead
- recurring per-turn overhead
Label findings:
- Confirmed — directly supported by evidence
- Needs checking — plausible but not fully proven
Do not invent token counts, savings, costs, cache behaviour, or performance gains.
Do not flag something simply because it is large. Explain whether it appears to provide enough value to justify its cost.
## PRIORITISE
Report every meaningful finding, ranked from highest to lowest priority.
Prioritise based on:
Impact | Confidence | Frequency | Effort | Risk
Put recurring global or per-turn waste above small one-off inefficiencies when the evidence supports it.
Do not clutter the diagnosis with negligible findings.
## OUTPUT
Explain the diagnosis like you are talking to a smart beginner.
Use normal everyday language. Assume I do NOT know technical terms.
### LANGUAGE RULES
- Use short sentences.
- Use simple words.
- Avoid developer jargon.
- Never use a technical term when a normal phrase will work.
- If a technical term is unavoidable, explain it immediately in plain English.
- Do not use phrases like "trigger ambiguity", "connector surface", "baseline context", "deferred tool schema", "cache-read ratio", or similar jargon without translating them.
- Do not show file paths, commands, logs, ratios, or technical details unless I actually need them to make the change.
- Prefer "this loads every time" over "recurring per-session overhead".
- Prefer "Claude has two copies of the same skill" over "duplicate skill definitions".
- Prefer "you rarely use this" over raw usage statistics unless the numbers matter.
- Prefer "this may save context space" over technical token language when exact savings are unknown.
Every sentence should answer one of these:
- What's wrong?
- Why does it matter?
- What should I do?
- Is there a risk?
- How do I check it worked?
If a detail does not help me make a decision, leave it out.
## START WITH
**STATUS:** 🟢 Looks good / 🟡 Some things to clean up / 🔴 Worth fixing
**BIGGEST PROBLEM:** Explain the main issue in one simple sentence.
**DO THIS FIRST:** Give me one clear action.
**WHY:** Explain why it matters in one short sentence.
## FINDINGS
Show every meaningful finding from highest to lowest priority.
Use this table:
| Priority | What's wrong? | Why do you think this? | What should I do? | What do I gain? | What could go wrong? | How do I check? |
Keep every cell short.
For each finding:
**What's wrong?**
Describe the problem in plain English.
**Why do you think this?**
Give only the evidence needed to trust the finding.
**What should I do?**
Give a specific action, not a general best practice.
**What do I gain?**
Explain the practical benefit in simple language.
If you cannot measure the benefit, say that clearly.
**What could go wrong?**
Explain what I might lose or need to re-enable.
**How do I check?**
Tell me the simplest way to see whether the change helped.
## PRIORITY GROUPS
### DO NOW
Clear problems with a useful fix.
### INVESTIGATE
Something may be wrong, but we need more evidence before changing it.
### LOW PRIORITY
Real issues that probably will not make much difference.
### LEAVE ALONE
Things you checked that are already fine or useful enough to keep.
## FINISH WITH
**WHAT LOADS BEFORE I START:** explain this in one simple sentence.
**PATTERN YOU NOTICED:** the most important repeated behaviour.
**BIGGEST WASTE:** the thing costing me the most without giving enough value back.
**BEST FIRST FIX:** the first change you recommend.
**HOW TO CHECK:** the easiest way to confirm it helped.
**NEXT STEP:** exactly what I should do next.
Do not repeat information already explained above.
How to use it
You don’t need to understand every token, cache rule or configuration file.
You’re really trying to answer one question:
What is my AI carrying around that isn’t helping enough to justify the cost?
Run the diagnosis
Paste the prompt into the agent you want to inspect.
It’s designed to be generic, so the agent should first identify its own environment and inspect whatever information it can actually access.
Start at the top
The findings are ranked by priority, not by category.
So don’t start by cleaning every MCP or rewriting every instruction file.
Start with the issue that has the biggest combination of impact, frequency and confidence.
Fix one thing at a time
Make the change.
Then verify it.
If it helped, move to the next finding.
If it didn’t, you’ve learned something useful without changing half your setup in the process.
That’s it.