context-optimizer

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

Updated Mar 9, 2026
One-click install
npx skills add https://github.com/pazdedav/my-infraops-project --skill context-optimizer-pazdedav
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: context-optimizer
Source: https://github.com/pazdedav/my-infraops-project/tree/main/.github/skills/context-optimizer
Command: npx skills add https://github.com/pazdedav/my-infraops-project --skill context-optimizer-pazdedav

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill addresses the problem of inefficient context window usage by AI agents, which leads to increased latency, higher costs, and potential degradation in response quality due to token limits.

Core Features & Use Cases

  • Debug Log Analysis: Parses Copilot Chat debug logs to identify patterns of context window consumption.
  • Token Waste Detection: Pinpoints redundant file reads, oversized instructions, and inefficient prompt structures.
  • Optimization Reporting: Generates prioritized recommendations for improving context efficiency, such as narrowing instruction globs or extracting tasks into subagents.
  • Use Case: An agent is consistently taking over 30 seconds to respond. This Skill can analyze its debug logs to reveal that it's repeatedly loading large instruction files or attaching entire codebases to its context, then suggest specific files to exclude or a more granular approach to information retrieval.

Quick Start

Analyze the latest Copilot Chat debug logs to identify context optimization opportunities.

Frequently Asked Questions about context-optimizer

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

FAQPage Schema
How do I optimize agent context window usage from Copilot Chat debug logs?

Optimizing agent context window usage involves parsing Copilot Chat debug logs to profile token consumption, detect redundant file reads, and generate prioritized recommendations for narrowing instruction globs or extracting tasks into subagents.

Why does my LLM agent experience high latency and take over 30 seconds to respond?

High LLM agent latency frequently results from inefficient context window usage, such as repeatedly loading large instruction files or attaching entire codebases, which causes token waste and performance degradation.

What is the best way to detect token waste and redundant file reads in AI agents?

Detecting token waste effectively requires auditing debug logs to pinpoint redundant file reads, oversized instructions, and inefficient prompt structures that consume unnecessary context window space.

Do I need Python 3.10+ to parse debug logs for context optimization?

Yes, Python 3.10+ is required to run the log parsing scripts that analyze Copilot Chat debug logs and profile token consumption for identifying context optimization opportunities.

What limitations exist when analyzing hand-off gaps and context window usage?

A key limitation is the strict dependency on accessing VS Code Copilot Chat debug logs and a Python 3.10+ environment, meaning agent behavior and token efficiency cannot be analyzed without these specific log inputs.