home / skills / kriscard / kriscard-claude-plugins / claude-code-analyzer
This skill helps you optimize Claude Code projects by analyzing usage, detecting structure, and surfacing community resources for actionable improvements.
npx playbooks add skill kriscard/kriscard-claude-plugins --skill claude-code-analyzerReview the files below or copy the command above to add this skill to your agents.
---
name: claude-code-analyzer
disable-model-invocation: true
description: >-
Analyzes Claude Code plugin structure, validates configuration, discovers
community plugins, and helps set up Claude Code projects. Make sure to use this
skill whenever the user mentions CLAUDE.md, plugin development, Claude Code
configuration, plugin validation, community skills, or setting up a new Claude
Code environment.
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
bash scripts/analyze-claude-md.sh
```
If the script is missing or fails, fall back to manual analysis:
- Read the project's CLAUDE.md (or note its absence)
- Check package.json for framework detection
- Scan directory structure for conventions
- Provide CLAUDE.md recommendations based on findings
Identifies:
- 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
bash scripts/analyze.sh --current-project
```
If the script is unavailable, suggest the user check:
- Settings > auto-allowed tools (are frequently-used tools approved?)
- Model usage (cost awareness)
- Common workflow patterns
Identifies:
- Most-used tools (optimize auto-allow)
- Model distribution (cost awareness)
- Active projects
### 3. Discover Community Resources
Search GitHub for relevant resources:
```bash
bash scripts/github-discovery.sh all [query]
bash scripts/github-discovery.sh skills react
bash scripts/github-discovery.sh agents typescript
```
If the script is unavailable, search GitHub directly:
```bash
gh search repos "claude-code plugin" --sort stars --limit 10
gh search repos "claude-code skill" --sort stars --limit 10
```
### 4. Generate Recommendations
Based on analysis, provide actionable suggestions:
- CLAUDE.md improvements (load `references/best-practices.md` if available)
- Settings optimizations
- New skills or agents to create
- Community resources to adopt
## Recommendation Patterns
### No CLAUDE.md Detected
1. Run stack detection (script or manual)
2. Generate CLAUDE.md template from detected info
3. Include commands from package.json scripts
4. Add architecture notes based on directory structure
### Underutilized Features
If analysis shows limited tool variety:
- Suggest auto-allowing frequently-used tools
- 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 `autoAllowedTools` in 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`
This skill analyzes Claude Code projects to surface usage patterns, detect project structure, and discover relevant community resources. It helps you generate actionable recommendations for CLAUDE.md, settings, and new skills or agents. Use it to rapidly understand how tools and models are used across one or many projects.
The scripts inspect project directories, CLI history, and GitHub to extract structured data. analyze-claude-md.sh detects package managers, frameworks, testing tools, and missing documentation sections; analyze.sh summarizes tool and model usage; github-discovery.sh queries GitHub for community skills, agents, and commands. Outputs are JSON-friendly for automated consumption and human-readable suggestions.
What dependencies are required?
jq is required for JSON processing. gh (GitHub CLI) is optional but improves discovery features.
How do I analyze a single project vs all projects?
Use bash scripts/analyze.sh --current-project for the active project or run analyze.sh with no flags to scan all available projects.