// Analyzes codebases to identify missing skills and recommend new ones. Invoke when user wants to audit skills, identify knowledge gaps, or determine what skills would benefit the project.
| name | skill-analyzer |
| description | Analyzes codebases to identify missing skills and recommend new ones. Invoke when user wants to audit skills, identify knowledge gaps, or determine what skills would benefit the project. |
You are an expert at analyzing codebases to identify what Claude Skills would be most valuable. This skill helps audit existing skills and recommend new ones based on project characteristics.
Skill analysis examines a project to determine:
Invoke this skill when the user:
Identify key indicators of required skills:
Dependency Analysis:
# Python projects
cat requirements.txt pyproject.toml setup.py poetry.lock 2>/dev/null
# Node projects
cat package.json package-lock.json 2>/dev/null
# Other indicators
find . -name "*.toml" -o -name "*.yaml" -o -name "*.json" | grep -E "(config|package|project)"
Framework Detection:
# Look for framework imports
grep -r "^import\|^from" --include="*.py" | head -20
# Check for config files
ls -la | grep -E "\.(config|rc|yaml|json|toml)"
Tool Detection:
# Check for tool configs
ls -la .* | grep -E "(eslint|prettier|black|mypy|pytest|jest)"
# Check git hooks
ls -la .git/hooks/ 2>/dev/null
cat .git/config 2>/dev/null
Look for patterns that indicate skill opportunities:
Repeated Code Patterns:
Domain-Specific Logic:
Project Conventions:
Compare discovered needs against existing skills:
# List current skills
ls .claude/skills/
# Check skill coverage
for skill in .claude/skills/*/SKILL.md; do
echo "=== $(dirname $skill | xargs basename) ==="
grep "^description:" "$skill"
done
Evaluate:
Create skills for:
1. Primary Framework
textual, django, react2. Core Tools
pytest, hk, docker3. Project-Specific Patterns
project-conventions, api-patternsCreate skills for:
1. Secondary Frameworks
pydantic, sqlalchemy2. Development Tools
mypy, pre-commit3. Domain Concepts
video-processing, cassette-parsingConsider skills for:
1. Simple Libraries
2. Standard Patterns
Don't create skills for:
When performing analysis, provide a structured report:
# Skill Analysis Report - [Project Name]
**Date:** [Date]
**Analyzed by:** Skill Analyzer
## Executive Summary
[1-2 paragraphs summarizing findings]
## Current Skills
- **textual** - TUI framework guidance
- **hk** - Git hook management
## Recommended Skills
### High Priority
#### 1. [Skill Name]
- **Reason:** [Why this is important]
- **Coverage:** [What it would cover]
- **Triggers:** [When it should activate]
- **Effort:** [S/M/L estimation]
- **Value:** [Expected benefit]
### Medium Priority
[Similar structure...]
### Low Priority
[Similar structure...]
## Skill Gaps
### Missing Coverage
- **Testing Patterns**: No skill for test conventions
- **API Integration**: No skill for external API patterns
### Outdated Content
- **textual**: Based on v0.x, may need updates
## Project Patterns Identified
### Repeated Code Patterns
1. [Pattern description]
- Locations: [files/modules]
- Candidate for: [skill name]
### Conventions
1. [Convention description]
- Example: [code snippet]
- Document in: [skill name]
## Next Steps
1. [Prioritized action items]
2. [...]
## Appendix
### Dependencies Analyzed
[List of dependencies checked]
### Files Analyzed
[Key files examined]
Python Projects:
# Check imports
grep -rh "^import \|^from " --include="*.py" . | \
cut -d' ' -f2 | cut -d'.' -f1 | sort -u | head -20
# Check dependencies
cat requirements*.txt setup.py pyproject.toml 2>/dev/null | \
grep -E "^[a-zA-Z]" | cut -d'=' -f1 | sort -u
Key frameworks to look for:
textual, rich - TUI frameworksdjango, flask, fastapi - Web frameworkspytest, unittest - Testingsqlalchemy, django.db - ORMspydantic - Validationclick, typer - CLI frameworksLook for config files:
# Git hooks
ls -la .git/hooks/
cat hk.pkl .pre-commit-config.yaml 2>/dev/null
# Linters/formatters
ls -la .{black,ruff,pylint,mypy,eslint,prettier}* 2>/dev/null
# CI/CD
cat .github/workflows/*.yml .gitlab-ci.yml 2>/dev/null
# Container tools
ls -la Dockerfile* docker-compose*.yml 2>/dev/null
Identify repeated structures:
# Find similar class definitions
grep -rh "^class " --include="*.py" . | \
awk '{print $2}' | sort | uniq -c | sort -rn | head -10
# Find common imports
grep -rh "^from textual" --include="*.py" . | \
sort | uniq -c | sort -rn | head -10
# Find repeated decorators
grep -rh "^@" --include="*.py" . | \
sort | uniq -c | sort -rn | head -10
File organization:
# Directory structure patterns
find . -type d -maxdepth 3 | head -20
# Naming conventions
find . -name "*.py" -o -name "*.js" | \
xargs basename -a | head -20
Test patterns:
# Test file structure
find . -name "test_*.py" -o -name "*_test.py"
# Test imports
grep -rh "^import pytest\|^from pytest" --include="test_*.py" . | \
sort | uniq -c
These suggest a skill is highly valuable:
1. Repeated Questions
2. Complex Configuration
3. Framework Depth
4. Pattern Proliferation
5. Tribal Knowledge
These suggest a skill may not be necessary:
1. Simple Usage
2. Infrequent Use
3. Well-Documented Externally
4. One-Time Setup
Run automated analysis:
# Create analysis script
cat > analyze_skills.sh <<'EOF'
#!/bin/bash
echo "=== Project Analysis ==="
echo ""
echo "## Frameworks"
if [ -f pyproject.toml ]; then
echo "Dependencies:"
grep -E "^\[tool\.|dependencies" pyproject.toml -A 20
fi
echo ""
echo "## Tools"
ls -la .* 2>/dev/null | grep -E "(config|rc|yaml)"
echo ""
echo "## Patterns"
echo "Top imported modules:"
grep -rh "^from \|^import " --include="*.py" . 2>/dev/null | \
awk '{print $2}' | cut -d'.' -f1 | sort | uniq -c | sort -rn | head -10
EOF
chmod +x analyze_skills.sh
./analyze_skills.sh
Examine:
Score potential skills:
Impact (1-5):
Effort (1-5):
Priority Score = Impact / Effort
Create high-score skills first.
Before creating a skill:
Project Characteristics:
Recommended Skills:
Project Characteristics:
Recommended Skills:
Project Characteristics:
Recommended Skills:
After analysis, use the skill-manager skill to:
Workflow:
skill-analyzer โ skill-manager
(identify needs) (create/update skills)
For rapid assessment:
Current Skills: 2
Missing High-Priority: 2
- pytest-patterns (testing conventions)
- async-patterns (async/await guidance)
Missing Medium-Priority: 1
- project-conventions (file organization)
Next Action: Create pytest-patterns skill
For thorough analysis, use the full report template above with:
Do:
Don't:
Initial Setup:
Regular Reviews:
Triggered Reviews:
Problem: Project seems too simple or too unique
Solutions:
Problem: Everything seems like it needs a skill
Solutions:
Problem: Unclear if skill would be helpful
Solutions:
When helping users analyze their project:
Always consider:
Related skills:
This skill reflects Claude Skills as of January 2025. Analysis techniques may evolve with framework and tooling changes.