File Counter
Count files and lines of code in a project directory.
Demo Purpose: This skill demonstrates the
scripts/directory — Agent executes the bundled Python script instead of generating code on the fly.
When to Use
- User asks "how big is this project?"
- User wants file/line counts or codebase statistics
- User says "count files", "count lines", or "project stats"
Instructions
Run the bundled counting script:
python scripts/count.py [target-directory]
If no directory is specified, it counts from the current project root.
Options
# Count all files in current project
python scripts/count.py .
# Count only a subdirectory
python scripts/count.py src/
# Exclude certain patterns
python scripts/count.py . --exclude node_modules,.git,__pycache__
Output
The script outputs a summary table like:
Project Statistics: ./my-project
================================
Extension Files Lines
---------- ----- -----
.py 12 1,540
.ts 25 3,210
.md 8 620
.json 5 180
---------- ----- -----
TOTAL 50 5,550
Notes
- The script skips binary files automatically
- Hidden directories (starting with
.) are excluded by default - Use
--excludeto skip additional directories