⏳ This skill is pending AI review.
Scores will appear once the review pipeline completes.
code-stats
Analyzes code files and reports statistics including line counts, file counts by extension, and total size. Use this skill whenever the user wants to understand the composition of a codebase - asking about "how many lines of code", "what file types exist", "code distribution", or needing a quick audit of project size and structure. Make sure to invoke this skill when users mention analyzing codebases, counting lines, checking file distributions, or auditing code.
// RATINGS
// README
Code Stats Skill
A real evaluable skill that analyzes code files and reports statistics. Works with both skill-creator and skill-up.
Structure
code-stats/
├── SKILL.md # Skill definition with instructions
└── evals/
├── eval.yaml # skill-up config (YAML format)
├── evals.json # skill-creator format
├── cases/
│ ├── analyze-directory.yaml # Test: analyze directory
│ └── top-extensions.yaml # Test: find top extensions
└── fixtures/
├── scripts/
│ └── check-stats.sh # Evaluation script
└── repos/
└── sample-project/ # Test repository
├── main.go
├── util.go
└── README.md
How to Evaluate
With skill-creator
# Run evaluation using skill-creator workflow
claude -p "$(cat <<'EOF'
Create a skill evaluation for ./examples/code-stats using skill-creator.
EOF
)"
With skill-up (Go framework)
# Build and run (from repo root)
make build
./bin/skill-up run ./examples/code-stats/evals/eval.yaml
Dual Format Support
| Tool | Config File | Format |
|---|---|---|
| skill-creator | evals/evals.json | JSON with skill_name, evals[] array |
| skill-up | evals/eval.yaml + cases/*.yaml | YAML with schema v1alpha1 |
For skill-up, case files in evals/eval.yaml stay relative to eval.yaml, while fixture-style references such as repo_fixture and script_path are relative to the directory containing SKILL.md, so they should be written as evals/fixtures/....
Test Cases
- analyze-directory: Analyze the evals directory and report statistics
- top-extensions: Find top file extensions by line count
Evaluation Script
check-stats.sh validates:
- Exit code is 0
- Output contains "Files by Extension"
- Output contains "Total Files" and "Total Lines"
- Markdown table format with
|characters - No error indicators
// HOW IT'S BUILT
KEY FILES