From simpleapps
How to write token-efficient CLAUDE.md, rules, and skills. Use when creating or editing always-loaded content (CLAUDE.md, .claude/rules/) or authoring skills. Covers the context loading hierarchy, evergreen content principles, and platform limits.
npx claudepluginhub simpleapps-com/augur-skills --plugin simpleappsThis skill uses the workspace's default tool permissions.
Always-loaded content (CLAUDE.md, rules without `paths`) is paid on every prompt — even when irrelevant. Every token spent here is a token taken from working context. Write always-loaded content as pointers, not content.
Generates design tokens/docs from CSS/Tailwind/styled-components codebases, audits visual consistency across 10 dimensions, detects AI slop in UI.
Records polished WebM UI demo videos of web apps using Playwright with cursor overlay, natural pacing, and three-phase scripting. Activates for demo, walkthrough, screen recording, or tutorial requests.
Delivers idiomatic Kotlin patterns for null safety, immutability, sealed classes, coroutines, Flows, extensions, DSL builders, and Gradle DSL. Use when writing, reviewing, refactoring, or designing Kotlin code.
Always-loaded content (CLAUDE.md, rules without paths) is paid on every prompt — even when irrelevant. Every token spent here is a token taken from working context. Write always-loaded content as pointers, not content.
| Layer | When loaded | What belongs here |
|---|---|---|
| CLAUDE.md | Every prompt | Orient + link. Under 200 lines (official limit). |
Rules (no paths) | Every prompt | Short guardrails. One topic per file. Invoke a skill for detail. |
Rules (with paths) | On demand | Scoped guidance that only matters for specific file types. |
| Skills (descriptions) | Every prompt | One-line descriptions. 2% of context window for ALL combined. |
| Skills (full content) | When invoked | Full behavioral detail. Under 500 lines per skill. |
| Wiki | When read | Complete project knowledge. Unlimited but we budget 20K tokens. |
SLASH_COMMAND_TOOL_CHAR_BUDGET.Always-loaded content MUST be evergreen — true regardless of when it's read. MUST NOT contain:
ls plugins/simpleapps/skills/" instead.Instead: describe the pattern, give 1-2 examples, and link to the source for the current state.
Always-loaded files SHOULD be pointers that invoke on-demand content:
# Git Safety (rule — 3 lines, always loaded)
MUST NOT commit without user approval.
Load Skill("git-safety") for full guardrails.
The rule costs ~40 tokens per prompt. The skill costs nothing until invoked, then loads ~800 tokens of detailed guidance. This is 20x more efficient than putting the full content in the rule.
The cheapest pointer with the biggest payoff is a wiki link in CLAUDE.md. A link like [Deployment](../../wiki/Deployment.md) costs ~15 tokens but gives the agent instant access to a full page of detailed knowledge (~500-2000 tokens) on demand. CLAUDE.md SHOULD link to every wiki content page — it becomes the agent's table of contents. Missing a link means the agent must guess where to find information or ask the user.
| Question | Answer |
|---|---|
| Does the agent need this on EVERY prompt? | CLAUDE.md or rule |
| Is it a critical guardrail? | Rule (invokes skill for detail) |
| Is it only relevant for certain files? | Rule with paths frontmatter |
| Is it detailed behavioral guidance? | Skill |
| Is it shared knowledge across projects? | Wiki |
| Is it personal to one user? | Memory |
Run /context to see current token usage by category. Watch for: