optimize-claude-md

Analyze CLAUDE.md files and generate improvement reports with implementation plans.

9|Updated Aug 20, 2018
One-click install
npx skills add https://github.com/berlysia/dotfiles --skill optimize-claude-md
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: optimize-claude-md
Source: https://github.com/berlysia/dotfiles/tree/main/.skills/optimize-claude-md
Command: npx skills add https://github.com/berlysia/dotfiles --skill optimize-claude-md

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

CLAUDE.md often grows large and repetitive, making it hard for Claude to follow project conventions and causing token bloat. This Skill analyzes CLAUDE.md files to identify verbosity, structure gaps, and opportunities for modularization, enabling clearer guidance and reduced token usage.

Core Features & Use Cases

  • Analyze structure for readability and logical grouping, with recommendations to split lengthy CLAUDE.md into focused rules under .claude/rules.
  • Propose concrete, actionable edits with before/after examples to reduce token usage while preserving meaning.
  • Generate an implementation plan (with optional simplification) that can be reviewed or applied directly.

Quick Start

Run /optimize-claude-md full aggressive to optimize the project CLAUDE.md.

Frequently Asked Questions about optimize-claude-md

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

FAQPage Schema
How do I reduce token usage in my CLAUDE.md files?

You can reduce token usage in CLAUDE.md files by analyzing the structure and reducing verbosity while preserving meaning. This optimization process enforces modularity by splitting lengthy guidance into focused rules under .claude/rules.

What is the best way to organize a large CLAUDE.md file?

The best way to organize a large CLAUDE.md file is to analyze its logical grouping and split it into modular rules. Moving focused conventions into .claude/rules improves readability and ensures Claude can follow project instructions effectively.

Can I analyze my global CLAUDE.md and project CLAUDE.md at the same time?

Yes, you can analyze both global and project CLAUDE.md files at the same time. The optimization process applies to both scopes, including rules under .claude/rules, to evaluate structure, verbosity, and modularity across your entire configuration.

How do I simplify CLAUDE.md rules without losing project conventions?

You can simplify CLAUDE.md rules without losing project conventions by generating concrete edits with before/after examples. This ensures meaning is preserved while token usage is reduced, providing an actionable implementation plan for review.

Does optimizing CLAUDE.md support different analysis depths?

Yes, optimizing CLAUDE.md supports analyze, simplify, and full modes. You can run a full aggressive optimization to comprehensively streamline the project file, or use analyze mode to simply generate an improvement report.

Why does Claude fail to follow my repetitive CLAUDE.md instructions?

Claude may fail to follow repetitive CLAUDE.md instructions because large files cause token bloat and structural gaps. Optimizing the file for clarity, reducing verbosity, and enforcing modularity helps Claude process and adhere to conventions.