pcompass: a sub-10ms local router that declutters coding agents' context and scrubs injections
HackyHarish · reddit · 2026-10-21
Tired of 20+ MCP servers clogging agent context windows, a developer open-sourced Prompt Compass (pcompass), a fully local tool router and security gate for AI coding agents.
Problems it solves: dozens of MCP configs burn thousands of tokens per prompt and confuse tool selection; skills configured in .cursor/ don't carry over to Claude Code or Gemini CLI; third-party skills can leak env secrets or hide prompt-injection strings.
What it does:
- Scans project and home directories to index every SKILL.md, MCP server, rule file, and developer CLI
- Local BM25 ranking picks the 1-3 relevant tools per prompt in <10ms, capped at a 400-token budget
- Automatically scrubs credentials, API keys, hidden Unicode direction markers, and injection tags
- pcompass setup hooks into Claude Code, Antigravity, Copilot CLI, Windsurf, OpenCode, and Codex
Pure Python standard library, no Torch dependency; benchmarked on 65 golden prompts with sub-6ms p95 latency and 100% top-3 recall. MIT/Apache-compatible open source.
Related event: pcompass: Open-Source Local Router Trims Agent Context Bloat(2 posts)→
More from coding & agent
- HeyGen Founder Joshua Xu: Agents Should Explain with Video, Not Text Reports — toolstelegraph · 2026-10-21
- Claude Code Desktop task cards now let you pick the model per task — dotey · 2026-10-21
- Slack's first employee: agentic coding is my biggest career shift since 1994 — josh_wills · 2026-10-21
- steipete: a real skills gap is opening between people with personal agents and those without — steipete · 2026-10-21
- Agents relentlessly hillclimb non-hackable metrics — including SOC 2 certification — RylanSchaeffer · 2026-10-21
- For $20, a Coding Agent Devises a Surprising Physical Strategy to Move a Box — tomssilver · 2026-10-21