ccx-context-optimizer

Audit and optimize Claude context files to reduce prompt length.

1|Updated Jan 13, 2023
One-click install
npx skills add https://github.com/theodrosyimer/.dotfiles --skill ccx-context-optimizer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ccx-context-optimizer
Source: https://github.com/theodrosyimer/.dotfiles/tree/main/claude/plugins/cc-expert/skills/ccx-context-optimizer
Command: npx skills add https://github.com/theodrosyimer/.dotfiles --skill ccx-context-optimizer

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Claude agents waste time and tokens processing unnecessary or redundant context files, leading to slower responses and higher inference costs.

Core Features & Use Cases

  • Audit Mode – Scans CLAUDE.md, .claude/rules, and nested context files, classifying each line for keep, delete, scope, move, or promote.
  • Evolve Mode – Captures friction from a session and proposes incremental context deltas.
  • Restructure Mode – Reorganizes context files into the optimal three‑layer architecture (root CLAUDE.md, scoped rules, on‑demand skills).
  • Create Rule Mode – Validates and adds new constraints with proper scoping and redundancy checks.
  • Research‑backed – Applies findings from ETH Zurich, Lulla et al., ACE framework, and Arize AI to keep only non‑discoverable, high‑signal information.

Quick Start

Audit my context files.

Frequently Asked Questions about ccx-context-optimizer

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

FAQPage Schema
How do I optimize Claude context files to reduce prompt length and inference cost?

Optimize Claude context files by auditing CLAUDE.md and nested rules to classify lines for keeping, deleting, or moving, which trims prompt length and cuts inference cost. The audit applies research-backed constraints to retain only high-signal information.

What is the best way to restructure Claude Code context files into a three-layer architecture?

Restructuring Claude Code context files into a three-layer architecture involves reorganizing them into a root CLAUDE.md, scoped rules, and on-demand skills. This optimal structure reduces redundancy and ensures context is loaded only when needed.

How do I create new Claude Code rules without duplicating existing context constraints?

Create new Claude Code rules by validating proposed constraints against existing context files for proper scoping and redundancy. The validation process checks for overlaps before adding the new rule to prevent context bloat.

Can I capture session friction and evolve my Claude context rules incrementally?

Yes, you can evolve Claude context rules incrementally by capturing friction from a session. The system proposes incremental context deltas to update rules based on real agent interactions and encountered issues.

Does the context audit work with nested .claude/rules files or only root CLAUDE.md?

The context audit works with both nested .claude/rules files and the root CLAUDE.md. It scans all nested context files, classifying each line to determine whether it should be kept, deleted, scoped, moved, or promoted.