Audits agent context window usage via debug logs, token profiling, and redundancy detection. USE FOR: context optimization, token waste analysis, debug log parsing, hand-off gap analysis. DO NOT USE FOR: Azure infrastructure, Bicep/Terraform code, architecture design, deployments.
83
78%
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Passed
No known issues
Optimize this skill with Tessl
npx tessl skill review --optimize ./.github/skills/context-optimizer/SKILL.mdStructured methodology for auditing how GitHub Copilot agents consume their context window. Identifies waste, recommends hand-off points, and produces prioritized optimization reports.
applyTo glob patterns| Capability | Description |
|---|---|
| Log Parsing | Extract structured data from Copilot Chat debug logs |
| Turn-Cost Profiling | Estimate token spend per turn from timing and model metadata |
| Redundancy Detection | Find duplicate file reads, overlapping instructions |
| Hand-Off Gap Analysis | Identify agents that should delegate to subagents |
| Instruction Audit | Flag overly broad globs and oversized instruction files |
| Report Generation | Structured markdown report with prioritized recommendations |
.github/agents/*.agent.md (or equivalent)Copilot Chat writes debug logs automatically to the VS Code log directory. To find the latest logs:
find ~/.vscode-server/data/logs/ -name "GitHub Copilot Chat.log" -newer /tmp/marker 2>/dev/null \
| sort | tail -5For richer output, set github.copilot.advanced.debug.overrideLogLevels
in VS Code settings to capture verbose tool-call data.
📋 Reference: Read references/analysis-methodology.md for the complete methodology including:
ccreq line parsing, request types, latency heuristicsSee templates/optimization-report.md for the full output template.
This skill contains no project-specific logic. To use in another project:
.github/skills/context-optimizer/ to the target repo.github/agents/11-context-optimizer.agent.md.github/instructions/context-optimization.instructions.mdtools/scripts/snapshot-agent-context.sh and tools/scripts/diff-context-baseline.shtools/scripts/parse-chat-logs.py — Log parser producing structured JSONtemplates/optimization-report.md — Report output templatereferences/token-estimation.md — Detailed token cost heuristics| Reference | When to Load |
|---|---|
references/token-estimation.md | When estimating token counts for context optimization |
references/analysis-methodology.md | Log format, 5-step methodology, optimization patterns, baseline comparison |
ec7b8ff
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.