Your agents each read their own config files — CLAUDE.md, AGENTS.md,
.cursorrules, Copilot instructions, MCP configs — but nothing reviews that layer. ContextGuard lints it
like ESLint lints code: deterministic rules for oversized instructions, secrets in
AI-visible files, and unmeasured token overhead. Pro adds duplicate-context and
contradicting-rule checks, then shows the monthly cost hiding in that context.
Entirely local. No telemetry, no analytics. Your code never leaves your machine. On the free tier, no network calls at all.
See it work
A workspace scan of the public Cline repo: the always-on instruction files found across every tool that loads them, the combined configuration footprint and its modeled monthly cost sitting in the status bar where you can't forget about it, and a paste-ready bundle with detected secrets redacted.
Recorded on the public Cline repository. ContextGuard is unaffiliated with Cline. Cost figures use the default assumptions: $3 per million input tokens at 50 requests/day.
The invisible problem
When your agent ignores an instruction, you blame the model, not the 6,000-token CLAUDE.md where your one important rule is buried under contradictions and a duplicated style guide. That layer is code: it changes model behavior on every request, and it drifts.
Instruction files and MCP schemas can ride along with every session for the tool that loads them. A 4k-token CLAUDE.md isn't free. ContextGuard shows the combined instruction footprint in your status bar; hover it for the monthly cost estimate.
Once a team uses more than one tool, CLAUDE.md and .cursorrules start disagreeing. "Use tabs" in one file, "use spaces" in another, and the agent gets both. Which wins is luck.
Agents happily read files git never sees. A gitignored .env is still AI-visible, and so is the API key someone pasted into a config "just for a second."
What it does
Free proves the problem. Pro adds the fix-it and continuous-guard layer.
Scan your active file, open tabs, or workspace. Free flags oversized instruction files, secrets, MCP configs, generated noise, and token bloat with file, line, and Jump To. Pro adds duplicate Markdown context, contradicting AI rules, and git diff review scans.
Optimize Instruction File turns warnings into edits: dedupe rules within and across files, pick-the-winner conflict resolution, and a receipt like "4.1k → 1.8k tokens, ≈ −$2.10/month."
Free already flags secrets in instruction files (CLAUDE.md, .cursorrules, …) on every save. Live Secret Guard extends that to every other AI-visible source and config file: the moment a key, token, JWT, or DB URL lands in one, you get a status-bar alert and a Problems entry with the exact line, before any agent reads it.
Measure MCP Overhead launches your stdio MCP servers (with consent), calls tools/list, and reports the real schema tokens each one injects per session. No other tool shows that number.
Package clean, paste-ready context for Claude, ChatGPT, or any web AI, with token counts per file, one-click noise removal, automatic secret redaction (free), and PR-review packs built from your git diff (Pro).
The rules
Deterministic, explainable, and consistent across the panel and save-time checks.
| Rule | What it catches |
|---|---|
| Large / Huge Instruction | AI instruction files over 1.5k–6k tokens that tax every request |
| Duplicate Context / Rule PRO | Repeated Markdown context or the same rule repeated across CLAUDE.md, .cursorrules, AGENTS.md, … |
| Conflicting Rule PRO | "Use tabs" in one file and "use spaces" in another, with Jump To navigation |
| Secret Content | API keys, tokens, JWTs, private keys, and credentialed DB URLs in AI-visible files |
| Sensitive Path | .env, *.pem, keystores, Terraform state, including safely gitignored files |
| MCP Unknown | MCP configs whose runtime schema overhead isn't counted anywhere |
| Large / Huge File | Files over 3k / 8k tokens that would dominate a request |
| Generated / Noisy | dist/, lockfiles, logs, and snapshots that add high-token, low-signal context |
Pricing
No account needed for Free. Early-access Pro is available below.
If ContextGuard trims even 500 tokens off your combined configuration footprint, it pays for itself in API costs. The first secret it stops from reaching a chat window is worth more than the subscription.
FAQ
No. Every scan, lint, and bundle runs locally. ContextGuard does not send code or scan contents to a service. On the free tier it makes no network calls at all. The only ContextGuard service call is activating, validating, or deactivating a Pro license through our licensing provider: activation sends your key plus an instance label (VS Code and the first 8 characters of VS Code's machineId) so we can enforce the per-key device limit, and that label is the only value ever derived from your machine ID. After that, ContextGuard re-validates on startup at most once every 7 days, sending the key and a server-issued instance ID instead, which identifies your installation to the licensing provider for as long as the license is active.
Our license server is a stateless proxy: it has no application database and does not intentionally write license keys, instance labels, or request bodies to logs. It runs on Cloudflare Workers. If Cloudflare Workers Logs are enabled, Cloudflare retains invocation logs containing request, response, and related metadata for 3 days on the free Workers plan or 7 days on paid plans. Lemon Squeezy stores the license key and activated instance record as needed to provide license validation and enforce the device limit, and may retain related information as described in its privacy policy. Measure MCP Overhead launches workspace-configured MCP commands only after consent; those servers may make their own normal network calls. There is no telemetry or analytics, and this website has no analytics or cookies either.
ContextGuard maintains a canonical registry of agent configuration conventions: 22 tools and counting, including Claude Code (CLAUDE.md, .mcp.json), the AGENTS.md standard, Cursor, GitHub Copilot, Cline, Windsurf, Roo Code, Gemini, Codex CLI, Aider, Zed, Continue, JetBrains Junie, Amazon Q, Goose, Amp, Augment Code, and more. When a tool ships a new convention, it gets a registry entry and every surface picks it up. Missing one? That's a bug; tell us.
Because .gitignore protects files from version control, not from AI tools. A gitignored .env can still be read by workspace-aware agents or bundled by accident. That gap is exactly what ContextGuard audits.
They're computed from your actual token counts under stated, conservative assumptions: Sonnet-class input pricing ($3/M tokens) at 50 requests/day. Both are settings, so point them at your real usage and model pricing and the estimates become your numbers. Prompt caching can move the dollar figure, but those tokens still occupy context in any tool that loads them. When a repo has several tool configs, ContextGuard reports the combined footprint — and says plainly that each tool loads only its own instructions.
Buy an early-access license from the Pro checkout, then activate it with ContextGuard: Activate Pro License from the Command Palette. One key supports up to 5 machines.
Pro purchases are eligible for a full refund within 14 days of purchase.
Yes. Everything except license validation is offline by design, and Pro keeps working through a 7-day offline grace window between validations.