CtrlK
BlogDocsLog inGet started
Tessl Logo

optimize-claude-md

Audits CLAUDE.md files (root, nested, `.claude/rules/*.md`) for context bloat and emits ranked suggestions across two levers — (1) shrink inventory entries, (2) flag rarely-used agent-invokable skills that should become slash-only to drop their description from the always-on available-skills list. Triggers on Claude Code's "Large CLAUDE.md will impact performance" warning (> 40k chars), inventory entries duplicating harness-loaded skill descriptions, "CLAUDE.md is too big", "shrink CLAUDE.md", "optimize CLAUDE.md", "/optimize-claude-md". Three modes — `audit` (read-only ranked report + slash-conversion candidates), `trim` (interactive one-line hook + diff approval), `extract` (moves sections to linked files preserving content). Composes with `docs` (Placement Resolver) and `create-skill` (invocation matrix). Hard rules: refuses files < 10k chars; never deletes silently; never edits any skill's canonical `SKILL.md` frontmatter — routes to `/create-skill`.

66

Quality

83%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Passed

No findings from the security scan

SKILL.md
Quality
Evals
Security

Quality

Content

70%Weight 40%Scale 1-5

Reviews the quality of instructions and guidance provided to agents. Good implementation is clear, handles edge cases, and produces reliable results.

A well-structured, token-conscious index with an exemplary gated workflow, explicit validation, and clear checklists. Its two weaknesses are consequential: the bundle ships only references/bloat-patterns.md while the entire execution layer lives in rules/*.md files that are absent, leaving the skill an index to missing content, and there is moderate table-level redundancy.

Suggestions

Ship the rules/*.md files referenced by the Workflow and Required Reading tables (hard-rules, measurement, classification, invocation-review, and the three mode files) in the bundle — without them, Phases 1–3 have no executable detail and the load-on-demand design points at files that don't resolve.

Merge the 'Workflow' and 'Required Reading by Phase' tables into one table with columns for phase, rule file, gate, and load cue — they currently duplicate the same phase→file mapping and account for the largest avoidable repetition in the body.

Inline one-line fallbacks for the critical criteria (e.g. the token estimate formula and the 6-line paragraph threshold already appear; add the hot-path/cold-path definition in one line) so a basic audit run can proceed even when the rule files are unavailable.

DimensionReasoningScore

Conciseness

Efficient and dense — tables for modes and phases, a "thin index" note, and deliberate non-duplication ("References… token-economics.md and progressive-disclosure.md… do not duplicate that guidance here"). Minor trimmable redundancy: the Workflow and Required Reading tables repeat the same phase→rule-file mapping, and the <10k-chars / never-delete rules are stated in three places. Not 3 — nothing is padded or explains concepts Claude already knows.

4 / 5

Actionability

The orchestration layer is concrete (mode-detection table, exact output template "Mode: audit / Target: /abs/path/to/CLAUDE.md (43,012 chars / ~10,750 tokens)", gated phases, checklist), but the actual per-phase procedures are delegated to rules/*.md files that are not present in the bundle — "rules/measurement.md", "rules/classification.md", and the three mode files are all missing, so how to measure, classify, and run each mode is unavailable. Missing key details is more than the 'minor gaps' of level 4.

3 / 5

Workflow Clarity

Clear Phase 0–4 sequence with explicit validation and feedback loops: Phase 4 "Before/after metrics shown; no content lost in trim or extract", a preservation-invariant gate, "If you cannot find a destination, abort and ask", diff approval for trim, and a Definition of Done checklist. The destructive/batch cap does not apply because validation checkpoints are explicit; not 4 — recovery paths and checklists are all present.

5 / 5

Progressive Disclosure

The thin-index, load-on-demand design is well-signaled ("Detailed rules live in rules/*.md and load on demand"), but scored against the actual bundle the navigation chain breaks: 7 of 8 referenced paths (rules/hard-rules.md, rules/measurement.md, rules/classification.md, rules/invocation-review.md, and the three mode files) do not exist in the bundle, and references/bloat-patterns.md itself links to a missing ../rules/classification.md. Not 4 — 'minor organization gaps' does not cover most references being unresolvable; not 2 because structure and signaling within SKILL.md itself are strong and nothing is buried.

3 / 5

Total

15

/

20

Passed

Description

92%Weight 40%Scale 1-5

Based on the skill's description, can an agent find and select it at the right time? Clear, specific descriptions lead to better discovery.

A highly specific, third-person description that explicitly states what the skill does, when to trigger it (with the exact performance-warning string and natural user phrases), its three modes, and its boundaries against sibling skills. The only weakness is modest synonym coverage in trigger terms (missing 'trim'/'reduce' variants), which costs it the top trigger-term score.

DimensionReasoningScore

Specificity

Lists multiple specific concrete actions with comprehensive coverage: "Audits CLAUDE.md files (root, nested, .claude/rules/*.md) for context bloat and emits ranked suggestions across two levers", plus three named modes each with concrete behavior ("read-only ranked report + slash-conversion candidates", "interactive one-line hook + diff approval", "moves sections to linked files preserving content"). Not 4 — there are no gaps in coverage; every mode and lever is spelled out concretely.

5 / 5

Completeness

Clearly answers both what ("Audits… emits ranked suggestions… Three modes — audit/trim/extract") and when via an explicit trigger clause ("Triggers on Claude Code's 'Large CLAUDE.md will impact performance' warning (> 40k chars)…") with concrete trigger phrases. Not 4 — the 'when' is fully explicit, not implied or generic.

5 / 5

Trigger Term Quality

Good natural keyword coverage: "Large CLAUDE.md will impact performance", "CLAUDE.md is too big", "shrink CLAUDE.md", "optimize CLAUDE.md", "/optimize-claude-md" — phrases a user would actually say. Not 5 because common synonyms like "trim", "reduce", or "CLAUDE.md too long" are absent, leaving a few natural terms missing.

4 / 5

Distinctiveness Conflict Risk

Clear niche (CLAUDE.md context-bloat optimization) with distinct triggers and explicit routing boundaries separating it from siblings: "Composes with docs (Placement Resolver) and create-skill (invocation matrix)" and "never edits any skill's canonical SKILL.md frontmatter — routes to /create-skill". Minimal conflict risk; not 4 because the niche and boundaries are unambiguous.

5 / 5

Total

19

/

20

Passed

Validation

81%

Checks the skill against the spec for correct structure and formatting. All validation checks must pass before discovery and implementation can be scored.

Validation — 13 / 16 Passed

Validation for skill structure

CriteriaDescriptionResult

metadata_field

'metadata' should map string keys to string values

Warning

frontmatter_unknown_keys

Unknown frontmatter key(s) found; consider removing or moving to metadata

Warning

relative_links

Relative link issues: 18 missing, 5 suspicious

Warning

Total

13

/

16

Passed

Repository
mthines/agent-skills
Reviewed

Table of Contents

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.