From code-simplifier-tldr
TLDR-aware code simplifier that uses AST summaries for context and reads only target files in full. Achieves 80%+ token savings on large codebases. Use when user says /simplify, wants to reduce code complexity, remove dead code, eliminate redundant abstractions, or simplify over-engineered patterns. Merkle-integrated for O(1) cache lookups.
How this skill is triggered — by the user, by Claude, or both
Slash command
/code-simplifier-tldr:code-simplifier-tldrThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
This simplifier reads your codebase through AST summaries (TLDR) instead of raw source. It surveys file structures at ~5% token cost, identifies what actually needs changing, then requests only the specific line ranges it will modify. When mercator-ai is installed, the merkle manifest provides O(1) change detection — the agent skips files that haven't changed since the last mapping, cutting tok...
This simplifier reads your codebase through AST summaries (TLDR) instead of raw source. It surveys file structures at ~5% token cost, identifies what actually needs changing, then requests only the specific line ranges it will modify. When mercator-ai is installed, the merkle manifest provides O(1) change detection — the agent skips files that haven't changed since the last mapping, cutting token usage by 96% on typical runs.
docs/.mercator.json exists, diff against previous hashes to find changed files. Otherwise fall back to git diff --name-only HEAD~3.SIMPLIFICATION_LOG.md in the project root with before/after comparisons and line savings.# Simplify recently modified files
/simplify
# Simplify a specific file
/simplify src/api/auth.ts
# Simplify by pattern
/simplify src/components/*.tsx
$ /simplify src/utils/parser.ts
# Agent reads TLDR summary of parser.ts (~50 tokens instead of ~1000)
# Identifies lines 45-80 as overly nested conditional chain
# Reads only lines 40-85 of the source
# Refactors to early-return pattern
# Logs: parser.ts — flattened nested conditionals, 35 → 22 lines
git diff which still works but doesn't cache across sessions.The full agent protocol is defined in agents/code-simplifier.md. It covers merkle integration, TLDR parsing, token budget management, and the five core simplification principles (preserve functionality, apply project standards, enhance clarity, maintain balance, focus scope).
The slash command entry point is commands/simplify.md.
npx claudepluginhub shihwesley/shihwesley-plugins --plugin code-simplifier-tldrSimplifies recently modified code for clarity, consistency, and maintainability while preserving functionality. Auto-invokes or runs on demand.
Simplifies code for clarity by reducing complexity while preserving exact behavior. Use when refactoring functional but hard-to-read code, during reviews, or for maintenance.
Post-session code review that analyzes git diff to simplify and consolidate changed code, modernize syntax, and catch efficiency issues. Use after a working session or when asked to clean up or reduce slop.