Files
Andrew Yim 877db1aa0f refactor: reorganize skill numbering, remove obsolete skills, rename shared libs
- Rename: 00→80 claude-settings-optimizer, 88→79 dintel-skill-update,
  92→81 mac-optimizer, 93→82 tui-design-template
- Rename: dintel-shared → _dintel-shared (consistent with _ourdigital-shared)
- Remove: 61-gtm-manager, 62-gtm-guardian (obsolete), 99_archive
- Update all dintel-* skill refs (114 occurrences across 31 files)
- Sync README.md, CLAUDE.md, AGENTS.md with new structure

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 19:32:44 +09:00

120 lines
2.8 KiB
Markdown

---
description: Audit Claude Code settings for token efficiency. Analyzes MCP servers, CLAUDE.md, extensions and provides optimization recommendations.
argument-hint: [--fix] [--tokens-only]
allowed-tools: Read, Glob, Grep, Bash, Write
---
# Claude Code Settings Audit
Audit your Claude Code configuration to optimize token usage and performance.
## Arguments
- `--fix`: Apply safe fixes automatically (with backup)
- `--tokens-only`: Quick token budget check only
## Audit Process
### 1. Token Budget Check
Calculate current baseline token usage:
```bash
# Quick estimation
echo "=== Token Budget Estimation ==="
```
**Targets:**
- CLAUDE.md: <3,000 tokens (~200 lines)
- MCP with Tool Search: <10,000 tokens
- Working space: >70% of 200K context
### 2. MCP Server Analysis
Check locations:
- `~/.claude/settings.json`
- `./.claude/settings.json`
For each server, evaluate:
- [ ] Has `serverInstructions` (CRITICAL for Tool Search)
- [ ] Appropriate load strategy (always/lazy/disable)
- [ ] Token impact estimation
**Server Token Estimates:**
| Server | Tokens | Strategy |
|--------|--------|----------|
| Playwright | ~13,500 | always |
| Notion | ~5,000 | always |
| GitHub | ~18,000 | lazy |
| PostgreSQL | ~8,000 | lazy |
| Zapier | ~25,000+ | disable |
### 3. CLAUDE.md Analysis
Check:
- `~/.claude/CLAUDE.md` (global)
- `./CLAUDE.md` (project)
Evaluate:
- [ ] Line count (critical if >200)
- [ ] Token estimate (critical if >3,000)
- [ ] Good structure (headers, lists, not wall of text)
- [ ] No redundant information
- [ ] No information Claude already knows
### 4. Extensions Analysis
**Commands** (`~/.claude/commands/`):
- Has YAML frontmatter with description?
- Under 100 lines?
**Skills** (`~/.claude/skills/`):
- Has SKILL.md?
- Under 500 lines?
**Agents** (`~/.claude/agents/`):
- Tools appropriately restricted?
## Output Format
```markdown
# Settings Audit Report
Generated: [timestamp]
## Token Budget Summary
| Component | Tokens | % of 200K | Status |
|-----------|--------|-----------|--------|
| CLAUDE.md | X | Y% | OK/WARN/CRITICAL |
| MCP Servers | X | Y% | OK/WARN/CRITICAL |
| Extensions | X | Y% | OK/WARN/CRITICAL |
| **Baseline** | **X** | **Y%** | — |
| **Available** | **X** | **Y%** | — |
## Critical Issues
[Must fix immediately]
## Warnings
[Should address soon]
## Recommendations
1. [Prioritized action]
2. [...]
## Auto-Fix Available
[List of safe fixes that can be applied with --fix]
```
## Quick Fixes
If `--fix` is provided:
1. Add `serverInstructions` to MCP servers missing them
2. Add frontmatter to commands missing it
3. Create backup before any changes
## Execution
1. Run token budget analysis first
2. Analyze each component
3. Generate prioritized report
4. Offer auto-fix if issues found
5. Save report to `./settings-audit-report.md`