Context Lens
v1.0.8AST Scan: 0 CriticalSource PublicCLI v2.1.287+ TestedInteractive token distribution breakdown by system instructions, MCP tools, and codebase buffers.
claude plugin uninstall context-lens@marketplaceProblem Solved & Architectural Motivation
Renders an interactive terminal breakdown showing exact token percentages consumed by system prompts, MCP tool schemas, conversation history, and project files. Alerts when prompt caching expires.
Zero-Time AST Interception
Evaluates tool payloads prior to kernel fork.
0-100 Impact Index
Weighted heuristic scoring: files touched, git dirty state, env scope.
Native CLI Hook
Zero proxy daemon required; hooks straight into Claude tool calls.
Lifecycle Architecture & Hook Flow
Manifest Schema (plugin.json)
{
"name": "context-lens",
"version": "1.0.8"
}Hook Implementation (register.js)
export default function setup(lens) {
lens.on('turn.before', (metrics) => {
lens.ui.printContextBar({
system: metrics.systemTokens,
tools: metrics.mcpTokens,
user: metrics.conversationTokens
});
});
}Static heuristic checks only. Not a formal commercial certification or warranty. Review source before installing.