context-optimizer

Audits Claude Code context window usage and generates scored optimization reports with fixes for plugins, hooks, MCP servers, and zombie processes.

1|1|Updated Apr 1, 2026
One-click install
npx skills add https://github.com/LEON-gittech/claude-context-optimizer --skill context-optimizer-leon-gittech
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: context-optimizer
Source: https://github.com/LEON-gittech/claude-context-optimizer/tree/main/skills/context-optimizer
Command: npx skills add https://github.com/LEON-gittech/claude-context-optimizer --skill context-optimizer-leon-gittech

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Claude Code sessions often suffer from hidden context overhead caused by excessive plugins, redundant hooks, bloated CLAUDE.md cascades, unused MCP servers, and lingering zombie/ghost processes, leading to unexpectedly high token costs, slow session startup, and frequent context limit hits. This skill eliminates that waste with a structured, actionable optimization workflow.

Core Features & Use Cases

  • 9-Phase Context Audit: Systematically scores plugins, hooks, CLAUDE.md files, MCP servers, environment settings, and .claudeignore configuration to identify all sources of bloat.
  • Hidden Cost Detection: Uncovers easy-to-miss overhead like zombie Claude/MCP processes, ghost sessions from background daemons, subagent session accumulation, and stale persistent-mode state files.
  • Actionable Fixes: Generates a prioritized scored report with before/after token estimates, and applies approved fixes directly to your configuration files.
  • Use Case: For teams running agentic workflows (ralph, autopilot, ultrawork) with 10+ plugins, this skill can cut startup token overhead by 40-50% and eliminate thousands of dollars in wasted API spend from orphaned processes.

Quick Start

Use the context-optimizer skill to run a full audit of your Claude Code setup and receive a prioritized list of fixes to reduce token usage and eliminate hidden process overhead.

Frequently Asked Questions about context-optimizer

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

FAQPage Schema
How do I reduce Claude Code token usage caused by too many plugins and hooks?

To reduce Claude Code token usage, you can run a context audit to score plugins, hooks, and CLAUDE.md files, identifying redundant configurations to eliminate unnecessary token consumption and process overhead.

Why does my Claude Code session startup take so long or hit context limits?

Slow Claude Code startup and context limit hits are often caused by hidden overhead from bloated CLAUDE.md cascades, unused MCP servers, and lingering zombie or ghost processes consuming available context window space.

How do I clean up zombie Claude processes and ghost sessions draining API spend?

You can clean up zombie processes and ghost sessions by running an audit that detects hidden overhead from background daemons, subagent session accumulation, and stale persistent-mode state files, then applying targeted fixes.

Can I audit my CLAUDE.md cascades and MCP servers to cut context bloat?

Yes, a structured context audit systematically scores CLAUDE.md cascades, MCP servers, environment settings, and .claudeignore configurations to identify sources of bloat and generate actionable fixes for your setup.

What is the best way to optimize context windows for agentic workflows with 10+ plugins?

The best way to optimize context windows for agentic workflows is running a 9-phase audit that identifies excessive plugin overhead, cutting startup token overhead by up to 50% and eliminating wasted API spend from orphaned processes.

Does a Claude Code context audit apply fixes directly to configuration files?

Yes, the context audit generates a prioritized scored report with before and after token estimates, and applies approved optimization fixes directly to your Claude Code configuration files.