claude-code-analyzer
Analyze Claude Code usage patterns, project structure, and discover community resources for workflow optimization
When & Why to Use This Skill
The Claude Code Analyzer is a powerful utility designed to optimize developer workflows by analyzing usage patterns, detecting project structures, and discovering community resources. It helps users refine their CLAUDE.md configurations, monitor tool efficiency, and stay updated with the latest community-driven skills and agents to enhance AI-assisted coding productivity.
Use Cases
- Project Onboarding & Documentation: Automatically detect a project's tech stack (frameworks, package managers, testing suites) and generate or improve CLAUDE.md files to provide better context for AI agents.
- Usage & Cost Optimization: Analyze historical tool and model usage patterns to identify frequently used features, optimize 'auto-allow' settings, and manage API cost awareness.
- Community Resource Discovery: Search GitHub for relevant community-contributed skills, agents, and commands tailored to specific languages or frameworks like React or TypeScript.
- Workflow Auditing: Identify underutilized Claude Code features and receive actionable recommendations for improving development efficiency through better tool integration and setting optimizations.
| name | claude-code-analyzer |
|---|---|
| description | Analyze Claude Code usage patterns, project structure, and discover community resources for workflow optimization |
| tools | Read, Glob, Grep, Bash |
| model | opus |
Claude Code Analyzer
Optimize your Claude Code workflow by analyzing usage patterns, detecting project structure, and discovering community resources.
Capabilities
| Feature | Script | Purpose |
|---|---|---|
| Usage Analysis | analyze.sh |
Extract tool/model usage from history |
| Project Detection | analyze-claude-md.sh |
Detect stack, suggest CLAUDE.md improvements |
| Feature Reference | fetch-features.sh |
List Claude Code capabilities |
| GitHub Discovery | github-discovery.sh |
Find community skills/agents/commands |
Workflow
1. Analyze Current Project
Run project structure detection:
bash scripts/analyze-claude-md.sh
Interprets JSON output to identify:
- Missing CLAUDE.md or incomplete sections
- Undocumented commands or patterns
- Framework-specific suggestions
2. Review Usage Patterns
Analyze Claude Code history for current project:
bash scripts/analyze.sh --current-project
Or analyze all projects:
bash scripts/analyze.sh
Identifies:
- Most-used tools (optimize auto-allow)
- Model distribution (cost awareness)
- Active projects
3. Discover Community Resources
Search GitHub for relevant resources:
bash scripts/github-discovery.sh all [query]
bash scripts/github-discovery.sh skills react
bash scripts/github-discovery.sh agents typescript
4. Generate Recommendations
Based on analysis, provide actionable suggestions:
- CLAUDE.md improvements (load
references/best-practices.md) - Settings optimizations
- New skills or agents to create
- Community resources to adopt
Quick Commands
# Full analysis
bash scripts/analyze-claude-md.sh && bash scripts/analyze.sh --current-project
# Features reference
bash scripts/fetch-features.sh
bash scripts/fetch-features.sh --json
# GitHub discovery
bash scripts/github-discovery.sh all
bash scripts/github-discovery.sh skills
Output Interpretation
Project Analysis Output
{
"detected": {
"package_manager": "pnpm",
"framework": "nextjs",
"testing": "vitest",
"typescript": "true"
},
"suggestions": [
"Document pnpm commands in CLAUDE.md",
"Document Next.js App Router vs Pages Router usage"
]
}
Usage Analysis Output
{
"tool_usage": { "Read": 150, "Edit": 89, "Bash": 45 },
"model_usage": { "claude-sonnet-4-20250514": 200 },
"auto_allowed_tools": ["Read", "Glob"]
}
Recommendation Patterns
No CLAUDE.md Detected
- Run
analyze-claude-md.shfor stack detection - Generate CLAUDE.md template from detected info
- Include commands from package.json scripts
- Add architecture notes based on directory structure
Underutilized Features
If analysis shows limited tool variety:
- Suggest LSP for code navigation
- Recommend Explore agents for searches
- Propose skills for repeated workflows
High Tool Usage Without Auto-Allow
If frequently used tools aren't auto-allowed:
- Suggest adding to
autoAllowedToolsin settings - Reference trust levels in best-practices.md
Dependencies
jq- JSON processing (required for analyze.sh)gh- GitHub CLI (optional, enhances github-discovery.sh)
Install: brew install jq gh