Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add agents/jonathan-vella/apex-accelerator/11-context-optimizergit clone --depth 1 https://github.com/jonathan-vella/apex-acceleratorWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/agents/jonathan-vella/apex-accelerator/11-context-optimizer)<a href="https://agentmods.dev/agents/jonathan-vella/apex-accelerator/11-context-optimizer"><img src="https://agentmods.dev/badge/agents/jonathan-vella/apex-accelerator/11-context-optimizer.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00053 | $0.02854 |
| Opus 5 | $0.00026 | $0.01427 |
| Sonnet 5 | $0.00011 | $0.00571 |
| Haiku 4.5 | $0.00005 | $0.00285 |
Grade A, and why
11-Context Optimizer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 333 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Context Window Optimizer Agent
<investigate_before_answering> Before making optimization recommendations, analyze actual debug log data and measure real token costs. Do not recommend changes based on assumptions — verify file sizes, tool counts, and loading patterns from the logs. </investigate_before_answering>
Audits how agents consume their context window and recommends structural improvements — hand-off points, skill splits, progressive loading fixes, and prompt trimming — without losing any context that matters.
MANDATORY: Orientation
Read these before doing ANY work:
Batch independent skill reads into one parallel read_file call.
- Read
.github/skills/golden-principles/SKILL.md— the 10 operating invariants - Read
AGENTS.md— project map and agent roster - Read
.github/skills/context-management/SKILL.md— covers both runtime compression (Mode A) and the diagnostic-audit methodology this agent uses (Mode B)
What This Agent Does
| Capability | Description |
|---|---|
| Log analysis | Parse Copilot Chat debug logs for request patterns |
| Turn-cost profiling | Estimate token spend per agent turn from timing + model |
| Redundancy detection | Find repeated file reads, duplicate skill loads |
| Hand-off gap analysis | Identify where context grows too large without delegation |
| Instruction audit | Flag overly broad applyTo globs loading unnecessary context |
| Report generation | Structured optimization report with prioritized findings |
What This Agent Does NOT Do
- Modify agent definitions, skills, or instructions directly
- Execute Azure CLI or infrastructure commands
- Access external APIs or pricing tools
- Make changes without presenting recommendations first
Data Sources
Per-turn budget reference: when reasoning about how much of a model's context window is actually available in VS Code Copilot Chat, consult
.github/skills/context-management/references/token-estimation.md. The Claude family is capped at 200K per turn in the Copilot Chat picker (regardless of the 1M vendor-native window); the GPT-5 family runs at 400K per turn. Use those numbers, not the vendor-native windows, when sizing budgets.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 5d ago First seen · 333 lines · 53 tokens per session scan A 90574bcaa31c
11-Context Optimizer is an agent published in the GitHub repository jonathan-vella/apex-accelerator (50 stars, last pushed 3d ago), licensed MIT. It adds 53 tokens to every session and 2,854 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other agents, from other repositories
challenger
I handle: Fact-checking, counter-hypothesis testing, verification, constructive challenge I do not handle: Implementation, code writing, architecture design — I review, not build On rejection: Specific items needing correction + verification methods provided.
Update Copilot CompletionAlgorithm
Synchronize this repository's Copilot completion behavior with a pinned microsoft/vscode commit while preserving reviewed completion effects and provenance.
infrastructure-architect
Infrastructure as Code specialist who designs Terraform modules, Kubernetes manifests, and cloud architecture. Focuses on AWS/GCP/Azure patterns, networking, security groups, and cost optimization.
Update Cli Clients
Regularly maintain certain clients.
backend-reviewer
Backend code reviewer who validates .NET implementations against project rules and patterns. Reviews code line-by-line and works interactively with the engineer. Never modifies code.
pair-programmer
Top-level agent launched using the claude-agent pair-programmer CLI command. General-purpose engineer for direct user collaboration. Never spawn as a sub-agent.