context-optimizer

Audit agent context window usage via debug logs and token profiling.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/qprjack86/azure-agentic-infraops-builder --skill context-optimizer-qprjack86
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: context-optimizer
Source: https://github.com/qprjack86/azure-agentic-infraops-builder/tree/main/.github/skills/context-optimizer
Command: npx skills add https://github.com/qprjack86/azure-agentic-infraops-builder --skill context-optimizer-qprjack86

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill addresses the issue of inefficient AI context window usage, which leads to increased costs, slower response times, and degraded AI performance by identifying and reducing token waste.

Core Features & Use Cases

  • Token Waste Analysis: Audits agent context window usage through debug logs and token profiling.
  • Redundancy Detection: Identifies duplicate file reads and overlapping instructions.
  • Optimization Reports: Generates prioritized recommendations for improving context efficiency.
  • Use Case: An agent is consistently taking too long to respond and its debug logs show long processing times. This Skill can analyze the logs to pinpoint if excessive context is being loaded, suggest narrowing instruction file globs, or recommend extracting heavy tasks to subagents.

Quick Start

Analyze the VS Code Copilot Chat debug logs to identify token waste and suggest optimizations.

Frequently Asked Questions about context-optimizer

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

FAQPage Schema
How do I analyze agent context window usage and identify token waste?▼

You can analyze agent context window usage by parsing debug logs to profile tokens and detect redundancy, which identifies token waste and produces prioritized optimization reports.

What is context optimization and how does it improve LLM efficiency?▼

Context optimization improves LLM efficiency by auditing token usage, detecting duplicate file reads, and recommending hand-off points to reduce context waste and lower processing times.

How do I reduce token waste from duplicate file reads in agent instructions?▼

To reduce token waste from duplicate file reads, context optimization audits agent instructions to detect redundancy and suggests narrowing instruction file globs for more efficient loading.

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

Yes, you need Python 3.10 or higher to run the log parser script that audits debug logs, profiles tokens, and analyzes hand-off gaps for context optimization.

When should I extract heavy tasks to subagents to improve agent performance?▼

You should extract heavy tasks to subagents when debug logs show long processing times and excessive context loading, which this Skill identifies through token profiling and hand-off gap analysis.

What is the best way to pinpoint why an agent is taking too long to respond?▼

The best way to pinpoint slow agent response times is to audit debug logs for excessive context loading, which identifies token waste and generates prioritized optimization recommendations.