⏳ This skill is pending AI review.

Scores will appear once the review pipeline completes.

v1.0.0

code-stats

@alibaba⭐ 1.1k stars

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.

—/10

// RATINGS

⭐GitHub Stars
⭐⭐⭐⭐⭐ 1.1kGitHub ↗

Very popular

🟢ProSkills Score
—
📍

Not yet listed on ClawHub or SkillsMP

// 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

ToolConfig FileFormat
skill-creatorevals/evals.jsonJSON with skill_name, evals[] array
skill-upevals/eval.yaml + cases/*.yamlYAML 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

  1. analyze-directory: Analyze the evals directory and report statistics
  2. 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

examples/code-stats/SKILL.mdREADME.md

// REPO STATS

1.1k stars

// ACTIONS

Rate this skill

login to rate

// SCORE

Pending review

// DETAILS

Categoryother
Author@alibaba
Versionv1.0.0
PriceFree