VS Code extension · Local-first

The linter for your AI configuration.

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.

ContextGuard: AI context audit Agent tools detected: Claude Code, Cursor, Copilot Instruction overhead: 3 files, ~6,212 tokens ≈ $27.95/month CLAUDE.md:41 "Use tabs for indentation" conflicts with "Always indent with spaces" in .cursorrules [conflicting-instruction] src/config.ts:8 OpenAI-style API key appears in file content [secret-content] CLAUDE.md:12 "Write tests for new code" also appears in AGENTS.md [duplicate-instruction] .mcp.json runtime tool schemas not counted; measure real overhead [mcp-runtime-context] 2 errors, 2 warnings · every warning is a rule, not a guess

See it work

Sixteen seconds, one real repository.

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

Bad AI configuration stays invisible until you put a number on it.

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.

💸

It taxes every request

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.

🔀

It drifts and contradicts

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.

🔑

It leaks

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."

22 toolsconfig conventions detected across Claude Code, Cursor, Copilot, Cline, Windsurf, Aider, Zed, and more
100% deterministicevery warning is a rule with a location, like ESLint. No AI needed to lint your AI
0 telemetryscans run entirely on your machine; Pro license validation is the only ContextGuard service call

What it does

Lint. Fix. Guard. Measure. Bundle.

Free proves the problem. Pro adds the fix-it and continuous-guard layer.

🔍

Lint

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.

🛠️

Fix PRO

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."

🛡️

Guard PRO

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 PRO

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.

📦

Bundle

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

Every warning is a rule, not a guess.

Deterministic, explainable, and consistent across the panel and save-time checks.

RuleWhat it catches
Large / Huge InstructionAI instruction files over 1.5k–6k tokens that tax every request
Duplicate Context / Rule PRORepeated 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 ContentAPI 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 UnknownMCP configs whose runtime schema overhead isn't counted anywhere
Large / Huge FileFiles over 3k / 8k tokens that would dominate a request
Generated / Noisydist/, lockfiles, logs, and snapshots that add high-token, low-signal context
Claude CodeCursorGitHub Copilot AGENTS.mdClineWindsurf Roo CodeGeminiCodex CLI AiderZedContinue JetBrains JunieAmazon QKilo Code GooseOpenHandsAmp Augment CodeFirebase StudioTrae

Pricing

Free proves it. Pro fixes it.

No account needed for Free. Early-access Pro is available below.

Free

$0
forever · no account
  • Core lint rules: size, secrets, sensitive paths, generated noise, MCP detection
  • Combined configuration footprint + monthly cost in the status-bar tooltip
  • On-save secret scan of instruction files + Workspace Security Audit, with file & line
  • Secret redaction in every exported bundle: keys, tokens & JWTs auto-scrubbed
  • Context bundles for any web AI, with budget tracking & noise removal
  • Workspace scans up to 50 files (secrets always scanned, even past the cap)
Install Free

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

Questions, answered.

Does my code leave my machine?

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.

Which AI tools does it understand?

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.

Why does it lint files that are gitignored?

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.

Are the "$ per month" numbers real?

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.

How does Pro licensing work?

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.

What's the refund policy?

Pro purchases are eligible for a full refund within 14 days of purchase.

Does it work offline?

Yes. Everything except license validation is offline by design, and Pro keeps working through a 7-day offline grace window between validations.