mhattingpete/file-operations
Analyze files and get detailed metadata including size, line counts, modification times, and content statistics. Use when users request file information, statistics, or analysis without modifying files.
npx skills add https://github.com/mhattingpete/claude-skills-marketplace --skill file-operations
Analyze files and retrieve metadata using Claude's native tools without modifying files.
stat -f "%z bytes, modified %Sm" [file_path] # Single file
ls -lh [directory] # Multiple files
du -h [file_path] # Human-readable size
wc -l [file_path] # Single file
wc -l [file1] [file2] # Multiple files
find [dir] -name "*.py" | xargs wc -l # Directory total
Use Read to analyze structure, then count functions/classes/imports.
Grep(pattern="^def ", output_mode="count", path="src/") # Count functions
Grep(pattern="TODO|FIXME", output_mode="content", -n=true) # Find TODOs
Grep(pattern="^import ", output_mode="count") # Count imports
Glob(pattern="**/*.py")
stat -f "%z bytes, modified %Sm" file.pywc -l file.pyRead(file_path="file.py")Grep(pattern="^def ", output_mode="count")Grep(pattern="^class ", output_mode="count")Glob(pattern="src/**/*.py")ls -lh src/**/*.pydu -sh src/*.pyfind . -name "*.py" | xargs wc -lfind . -name "test_*.py" | wc -lGrep(pattern="TODO|FIXME|HACK", output_mode="count")find . -type f -not -path "./node_modules/*" -exec du -h {} + | sort -rh | head -20
Works with:
Take mhattingpete/file-operations from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.