claude/skills/optimize-llm-config-docs/SKILL.md
Use when creating or reviewing LLM configuration files (skills, CLAUDE.md, prompts) that contain verbose explanations, troubleshooting sections, or historical context consuming tokens without providing actionable guidance
npx skillsauth add dragonkid/dotfiles optimize-llm-config-docsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
LLM configuration documents should contain only actionable patterns, not human-oriented explanations. Remove verbose descriptions, troubleshooting guides, and statistical predictions that waste tokens without enabling execution.
Apply when:
| File Type | Inline Optimization (Steps 1-4) | Progressive Disclosure (Step 5) | |-----------|--------------------------------|--------------------------------| | CLAUDE.md | ✅ Always apply | ❌ Auto-loaded, no lazy loading | | Hook configs | ✅ Always apply | ❌ Auto-executed, no subdocs | | Skills with Read tool | ✅ First optimize inline | ✅ Then split if >200 lines | | Skills without Read | ✅ Only option | ❌ Can't lazy-load subdocs |
Key insight: Progressive disclosure requires execution control (skills can choose when to Read). Auto-loaded configs must remain compact via inline optimization.
| Remove ❌ | Keep ✅ | |-----------|---------| | "Expected Improvements" / statistics | Rules and directives ("Use X for Y") | | "Symptoms" / problem descriptions | Workflow steps (1→2→3) | | "Troubleshooting" sections | Decision trees ("If X, then Y") | | "Key Limitations" / background | Anti-patterns ("❌ Don't X, ✅ Do Y") | | Historical context ("Based on 169 sessions") | Configuration examples | | Problem numbering (Problem 1/2/3) | Commands and syntax | | Explanatory phrases ("This is because...") | Code snippets | | Structure overload (single 500+ line file) | Modular index + subdocuments (skills only) |
Before (verbose, human-oriented - 13 lines):
### Problem 1: Claude often implements without providing plan (37 rejections)
**Symptoms**:
- You say "how to implement X", Claude immediately starts coding
- You're forced to interrupt and request plan first
- Wastes time and tokens
**Solutions**:
1. ✅ CLAUDE.md contains "BLOCKING REQUIREMENT" rule
2. ✅ Use explicit trigger words...
## Expected Improvements
Based on 169 sessions, rejected operations drop from 37 to <10.
After (actionable, LLM-optimized - 8 lines):
### Plan Before Implementation
**Rules**:
- Use explicit trigger words: "give me a plan"
- Use `/brainstorming` skill
- Use `/writing-plans` skill
**Examples**:
❌ Wrong: "Help me add authentication"
✅ Correct: "Give me a plan for authentication"
Search for these keywords:
Ask: "Can an LLM execute this directly?"
| Convert from → | Convert to → | |----------------|--------------| | Problems | Rules | | Symptoms | Anti-patterns | | Solutions | Workflows | | Troubleshooting | Commands/Syntax |
Applicable to: Skills with Read tool access Not applicable to: CLAUDE.md, hook configs (auto-loaded, no lazy loading)
When to split documents:
Pattern: Index SKILL.md + Subdocuments
Index file (SKILL.md):
/skill-name topic-name)Subdocuments (topic-name.md):
Example (from /guide skill):
## Available Topics
| Topic | Content |
|-------|---------|
| `plugins` | 17 plugins overview, decision tree |
| `workflow` | Optimization patterns |
## Usage
/guide plugins # Skill reads plugins.md
/guide workflow # Skill reads workflow.md
Why CLAUDE.md can't use this:
Benefits (skills only):
Decision workflow for mixed problems:
Mistake: Removing all explanatory text, making rules unclear Fix: Keep brief context for WHY a rule exists if it affects understanding
Mistake: Converting troubleshooting to commands that LLM can't execute (user environment issues) Fix: Only keep troubleshooting if LLM can apply the fix (code changes, config updates)
Mistake: Keeping "Expected Improvements" thinking it motivates compliance Fix: LLMs don't need motivation - they need clear instructions
Mistake: Splitting large skill into multiple independent skills (e.g., /react-patterns, /vue-patterns, /svelte-patterns)
Fix: Use progressive disclosure pattern - one skill with subdocuments (e.g., /frontend-patterns reads react.md, vue.md, svelte.md on demand)
tools
Use when user wants to manage TODO items - adding tasks, listing pending items, marking done, removing, or searching. Triggers on /todo command or TODO-related requests.
tools
Use when creating a new skill, updating an existing skill, or troubleshooting skill frontmatter, gating, or slash command registration issues in OpenClaw.
tools
手动触发自我改进与记忆维护。分析近期 memory 文件,维护工作区文件,提出改进提案。触发方式:/self_improve 或用户说"自我改进"、"self improve"。
testing
测试 OpenClaw 配置中 LLM provider 的可用性。触发方式:/provider_check 或用户问"测试 provider 可用性"、"检查 provider 状态"、"provider 健康检查"。