context-optimizer

Parses Copilot Chat debug logs to profile token consumption and detect redundancy.

Updated Mar 16, 2026
One-click install
npx skills add https://github.com/batuhanysv/sdx-agentic-infraops --skill context-optimizer-batuhanysv
Or copy as Structured Prompt for Agentâ–¼
Please help me install this Agent Skill.
Skill: context-optimizer
Source: https://github.com/batuhanysv/sdx-agentic-infraops/tree/main/.github/skills/context-optimizer
Command: npx skills add https://github.com/batuhanysv/sdx-agentic-infraops --skill context-optimizer-batuhanysv

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill tackles the challenge of inefficient AI context window usage, which leads to increased costs and slower response times by identifying and eliminating token waste.

Core Features & Use Cases

  • Debug Log Analysis: Parses Copilot Chat debug logs to pinpoint token consumption patterns.
  • Token Waste Identification: Detects redundant file reads, oversized instructions, and inefficient prompt structures.
  • Optimization Reporting: Generates actionable recommendations to reduce context window usage and costs.
  • Use Case: An agent is consistently slow and expensive. Use this Skill to analyze its debug logs, identify that it's repeatedly loading large, unnecessary instruction files, and receive a report recommending how to narrow the applyTo globs for those instructions.

Quick Start

Analyze the Copilot Chat debug logs in your VS Code directory to identify context window inefficiencies.

Frequently Asked Questions about context-optimizer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I optimize Copilot Chat context window token usage?â–¼

Optimize Copilot Chat context window token usage by parsing debug logs to profile consumption, detect redundant file reads, and generate actionable recommendations to reduce waste. It audits your agent's context window to pinpoint inefficient prompt structures and oversized instructions.

Why does my AI agent consistently consume too many tokens and run slowly?â–¼

Your AI agent consumes too many tokens and runs slowly due to redundant file reads and oversized instructions. Analyzing debug logs profiles token consumption patterns and identifies hand-off gaps, generating a report to eliminate this waste.

What is the best way to analyze Copilot Chat debug logs for token waste?â–¼

The best way to analyze Copilot Chat debug logs for token waste is using a Python 3.10+ script that parses the logs to detect redundant file reads and inefficient prompt structures, outputting an optimization report with recommendations.

Does context window optimization support multi-agent systems and hand-off gaps?â–¼

Context window optimization supports multi-agent systems by profiling token consumption and identifying hand-off gaps. It is applicable for reducing token waste and optimizing agent performance across complex multi-agent workflows.

Do I need Python 3.10 to parse debug logs for token optimization?â–¼

Yes, you need Python 3.10 or higher to run the log parsing scripts required for token optimization. This environment is necessary to audit context window usage and generate actionable optimization reports.