refactor: Reorganize skill numbering and update documentation
Skill Numbering Changes: - 01-03: OurDigital core (was 30-32) - 31-32: Notion tools (was 01-02) - 99_archive: Renamed from _archive for sorting New Files: - AGENTS.md: Claude Code agent routing guide - requirements.txt for 00-claude-code-setting, 32-notion-writer, 43-jamie-youtube-manager Documentation Updates: - CLAUDE.md: Updated skill inventory (23 skills) - AUDIT_REPORT.md: Current completion status (91%) - Archived REFACTORING_PLAN.md (most tasks complete) Removed: - ga-agent-skills/ (moved to separate repo ~/Project/dintel-ga4-agent) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -92,8 +92,12 @@ class TokenAnalyzer:
|
||||
return tokens
|
||||
return 5000 # Default estimate
|
||||
|
||||
def get_load_strategy(self, name: str) -> str:
|
||||
"""Get recommended load strategy."""
|
||||
def get_load_strategy(self, name: str, config: dict = None) -> str:
|
||||
"""Get load strategy - checks actual config first, then recommendations."""
|
||||
# Check actual autoStart setting in config
|
||||
if config and config.get("autoStart") is False:
|
||||
return "lazy"
|
||||
|
||||
name_lower = name.lower()
|
||||
for key, strategy in LOAD_STRATEGIES.items():
|
||||
if key in name_lower:
|
||||
@@ -124,7 +128,7 @@ class TokenAnalyzer:
|
||||
|
||||
tokens = self.estimate_server_tokens(name)
|
||||
has_instructions = "serverInstructions" in config
|
||||
strategy = self.get_load_strategy(name)
|
||||
strategy = self.get_load_strategy(name, config)
|
||||
|
||||
self.mcp_servers[name] = {
|
||||
"tokens": tokens,
|
||||
@@ -133,7 +137,9 @@ class TokenAnalyzer:
|
||||
"source": str(settings_path)
|
||||
}
|
||||
|
||||
self.mcp_tokens += tokens
|
||||
# Only count "always" servers for baseline
|
||||
if strategy == "always":
|
||||
self.mcp_tokens += tokens
|
||||
|
||||
# Generate findings
|
||||
if not has_instructions:
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
# Claude Code Settings Optimizer
|
||||
# No external dependencies - uses only Python standard library
|
||||
# json, sys, pathlib are built-in
|
||||
|
||||
# Optional: For future enhancements
|
||||
# pyyaml>=6.0 # YAML parsing for MCP configs
|
||||
# rich>=13.0 # Better terminal output
|
||||
@@ -0,0 +1,181 @@
|
||||
{
|
||||
"timestamp": "2026-01-23T18:06:32.896761",
|
||||
"tokens": {
|
||||
"total_tokens": 18911,
|
||||
"mcp_tokens": 17500,
|
||||
"claude_md_tokens": 1411,
|
||||
"mcp_count": 10,
|
||||
"mcp_servers": {
|
||||
"filesystem": {
|
||||
"tokens": 4000,
|
||||
"has_instructions": true,
|
||||
"strategy": "always",
|
||||
"source": "/Users/ourdigital/.claude/settings.json"
|
||||
},
|
||||
"sqlite": {
|
||||
"tokens": 5000,
|
||||
"has_instructions": true,
|
||||
"strategy": "lazy",
|
||||
"source": "/Users/ourdigital/.claude/settings.json"
|
||||
},
|
||||
"playwright": {
|
||||
"tokens": 13500,
|
||||
"has_instructions": true,
|
||||
"strategy": "always",
|
||||
"source": "/Users/ourdigital/.claude/settings.json"
|
||||
},
|
||||
"figma": {
|
||||
"tokens": 5000,
|
||||
"has_instructions": true,
|
||||
"strategy": "lazy",
|
||||
"source": "/Users/ourdigital/.claude/settings.json"
|
||||
},
|
||||
"osascript": {
|
||||
"tokens": 5000,
|
||||
"has_instructions": true,
|
||||
"strategy": "lazy",
|
||||
"source": "/Users/ourdigital/.claude/settings.json"
|
||||
},
|
||||
"firecrawl": {
|
||||
"tokens": 6000,
|
||||
"has_instructions": true,
|
||||
"strategy": "lazy",
|
||||
"source": "/Users/ourdigital/.claude/settings.json"
|
||||
},
|
||||
"google-analytics": {
|
||||
"tokens": 5000,
|
||||
"has_instructions": true,
|
||||
"strategy": "lazy",
|
||||
"source": "/Users/ourdigital/.claude/settings.json"
|
||||
},
|
||||
"chrome-devtools": {
|
||||
"tokens": 8000,
|
||||
"has_instructions": true,
|
||||
"strategy": "lazy",
|
||||
"source": "/Users/ourdigital/.claude/settings.json"
|
||||
},
|
||||
"exa": {
|
||||
"tokens": 5000,
|
||||
"has_instructions": true,
|
||||
"strategy": "lazy",
|
||||
"source": "/Users/ourdigital/.claude/settings.json"
|
||||
},
|
||||
"dtm-agent": {
|
||||
"tokens": 5000,
|
||||
"has_instructions": true,
|
||||
"strategy": "lazy",
|
||||
"source": "/Users/ourdigital/.claude/settings.json"
|
||||
}
|
||||
},
|
||||
"claude_md_files": [
|
||||
{
|
||||
"path": "/Users/ourdigital/.claude/CLAUDE.md",
|
||||
"lines": 110,
|
||||
"words": 616,
|
||||
"tokens": 800
|
||||
},
|
||||
{
|
||||
"path": "/Users/ourdigital/Project/claude-skills/custom-skills/00-claude-code-setting/code/CLAUDE.md",
|
||||
"lines": 120,
|
||||
"words": 470,
|
||||
"tokens": 611
|
||||
}
|
||||
],
|
||||
"usage_percentage": 9.5,
|
||||
"findings": {
|
||||
"critical": [],
|
||||
"warnings": [],
|
||||
"passing": [
|
||||
"MCP 'filesystem': Has serverInstructions",
|
||||
"MCP 'sqlite': Has serverInstructions",
|
||||
"MCP 'playwright': Has serverInstructions",
|
||||
"MCP 'figma': Has serverInstructions",
|
||||
"MCP 'osascript': Has serverInstructions",
|
||||
"MCP 'firecrawl': Has serverInstructions",
|
||||
"MCP 'google-analytics': Has serverInstructions",
|
||||
"MCP 'chrome-devtools': Has serverInstructions",
|
||||
"MCP 'exa': Has serverInstructions",
|
||||
"MCP 'dtm-agent': Has serverInstructions",
|
||||
"CLAUDE.md (CLAUDE.md): 110 lines, ~800 tokens - Good",
|
||||
"CLAUDE.md (CLAUDE.md): 120 lines, ~611 tokens - Good"
|
||||
],
|
||||
"recommendations": []
|
||||
}
|
||||
},
|
||||
"extensions": {
|
||||
"commands_count": 1,
|
||||
"skills_count": 1,
|
||||
"agents_count": 5,
|
||||
"commands": {
|
||||
"settings-audit": {
|
||||
"name": "settings-audit",
|
||||
"lines": 120,
|
||||
"has_frontmatter": false,
|
||||
"has_description": null,
|
||||
"issues": [
|
||||
"Missing YAML frontmatter",
|
||||
"Too long: 120 lines (max 100)"
|
||||
]
|
||||
}
|
||||
},
|
||||
"skills": {
|
||||
"jamie-brand-guardian": {
|
||||
"name": "jamie-brand-guardian",
|
||||
"lines": 480,
|
||||
"has_frontmatter": true,
|
||||
"has_description": true,
|
||||
"issues": []
|
||||
}
|
||||
},
|
||||
"agents": {
|
||||
"data-analyst": {
|
||||
"name": "data-analyst",
|
||||
"has_frontmatter": true,
|
||||
"tools_restricted": "Read, Glob, Grep, Bash, Write",
|
||||
"issues": []
|
||||
},
|
||||
"seo-advisor": {
|
||||
"name": "seo-advisor",
|
||||
"has_frontmatter": true,
|
||||
"tools_restricted": "Read, Glob, Grep, WebFetch, WebSearch",
|
||||
"issues": []
|
||||
},
|
||||
"python-coach": {
|
||||
"name": "python-coach",
|
||||
"has_frontmatter": true,
|
||||
"tools_restricted": "Read, Glob, Grep, Bash, Write",
|
||||
"issues": []
|
||||
},
|
||||
"gtm-manager": {
|
||||
"name": "gtm-manager",
|
||||
"has_frontmatter": true,
|
||||
"tools_restricted": "Read, Glob, Grep, Bash, WebFetch, mcp__plugin_playwright_playwright__*",
|
||||
"issues": []
|
||||
},
|
||||
"data-engineer": {
|
||||
"name": "data-engineer",
|
||||
"has_frontmatter": true,
|
||||
"tools_restricted": "Read, Glob, Grep, Bash, Write",
|
||||
"issues": []
|
||||
}
|
||||
},
|
||||
"findings": {
|
||||
"critical": [],
|
||||
"warnings": [
|
||||
"Command 'settings-audit': Missing YAML frontmatter",
|
||||
"Command 'settings-audit': Too long: 120 lines (max 100)"
|
||||
],
|
||||
"passing": [
|
||||
"Skill 'jamie-brand-guardian': OK",
|
||||
"Agent 'data-analyst': OK",
|
||||
"Agent 'seo-advisor': OK",
|
||||
"Agent 'python-coach': OK",
|
||||
"Agent 'gtm-manager': OK",
|
||||
"Agent 'data-engineer': OK"
|
||||
],
|
||||
"recommendations": []
|
||||
}
|
||||
},
|
||||
"total_baseline_tokens": 18911,
|
||||
"health": "Good"
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
# Claude Code Settings Audit Report
|
||||
|
||||
**Generated:** 2026-01-23 18:06:32
|
||||
|
||||
---
|
||||
|
||||
## Token Budget Summary
|
||||
|
||||
| Component | Tokens | % of 200K | Status |
|
||||
|-----------|--------|-----------|--------|
|
||||
| CLAUDE.md | 1,411 | 0.7% | 🟢 |
|
||||
| MCP Servers | 17,500 | 8.8% | 🟡 |
|
||||
| **Baseline Total** | **18,911** | **9.5%** | 🟢 |
|
||||
| **Available for Work** | **181,089** | **90.5%** | — |
|
||||
|
||||
**Target:** Baseline under 30% (60,000 tokens), Available over 70%
|
||||
|
||||
---
|
||||
|
||||
## Overall Health: 🟢 Good
|
||||
|
||||
- Critical Issues: 0
|
||||
- Warnings: 2
|
||||
- Passing Checks: 18
|
||||
|
||||
---
|
||||
|
||||
## MCP Server Analysis
|
||||
|
||||
**Servers:** 10 configured
|
||||
|
||||
| Server | Tokens | Instructions | Strategy |
|
||||
|--------|--------|--------------|----------|
|
||||
| filesystem | ~4,000 | ✅ | always |
|
||||
| sqlite | ~5,000 | ✅ | lazy |
|
||||
| playwright | ~13,500 | ✅ | always |
|
||||
| figma | ~5,000 | ✅ | lazy |
|
||||
| osascript | ~5,000 | ✅ | lazy |
|
||||
| firecrawl | ~6,000 | ✅ | lazy |
|
||||
| google-analytics | ~5,000 | ✅ | lazy |
|
||||
| chrome-devtools | ~8,000 | ✅ | lazy |
|
||||
| exa | ~5,000 | ✅ | lazy |
|
||||
| dtm-agent | ~5,000 | ✅ | lazy |
|
||||
|
||||
---
|
||||
|
||||
## CLAUDE.md Analysis
|
||||
|
||||
- **/Users/ourdigital/.claude/CLAUDE.md**: 110 lines, ~800 tokens 🟢
|
||||
- **/Users/ourdigital/Project/claude-skills/custom-skills/00-claude-code-setting/code/CLAUDE.md**: 120 lines, ~611 tokens 🟢
|
||||
|
||||
---
|
||||
|
||||
## Extensions Analysis
|
||||
|
||||
- Commands: 1
|
||||
- Skills: 1
|
||||
- Agents: 5
|
||||
|
||||
---
|
||||
|
||||
## ⚠️ Warnings
|
||||
|
||||
- Command 'settings-audit': Missing YAML frontmatter
|
||||
- Command 'settings-audit': Too long: 120 lines (max 100)
|
||||
|
||||
---
|
||||
|
||||
## ✅ Passing
|
||||
|
||||
- MCP 'filesystem': Has serverInstructions
|
||||
- MCP 'sqlite': Has serverInstructions
|
||||
- MCP 'playwright': Has serverInstructions
|
||||
- MCP 'figma': Has serverInstructions
|
||||
- MCP 'osascript': Has serverInstructions
|
||||
- *...and 13 more*
|
||||
|
||||
---
|
||||
|
||||
## Next Steps
|
||||
|
||||
1. Run `python3 scripts/auto_fix.py` to preview fixes
|
||||
2. Run `python3 scripts/auto_fix.py --apply` to apply fixes
|
||||
3. Re-run audit to verify improvements
|
||||
|
||||
---
|
||||
|
||||
*Generated by Claude Code Settings Optimizer*
|
||||
Reference in New Issue
Block a user