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.

By mhattingpete · 403 installs

npx skills add mhattingpete/claude-skills-marketplace --skill file-operations

Source repository · Upstream listing

File Operations Analyze files and retrieve metadata using Claude's native tools without modifying files. When to Use "analyze [file]" "get file info for [file]" "how many lines in [file]" "compare [file1] and [file2]" "file statistics" Core Operations File Size & Metadata Line Counts Content Analysis Use Read to analyze structure, then count functions/classes/imports. Pattern Search Find Files Workflow Examples Comprehensive File Analysis 1. Get size/mod time: stat f "%z bytes, modified %Sm" file.py 2. Count lines: wc l file.py 3. Read file: Read(file path="file.py") 4. Count functions: Grep(pattern="^def ", output mode="count") 5. Count classes: Grep(pattern="^class ", output mode="count") Compare File Sizes 1. Find files: Glob(pattern="src/ / .py") 2. Get sizes: ls lh src/ / .py 3. Total size: du sh src/ .py Code Quality Metrics 1. Total lines: find . name " .py" xargs wc l 2. Test files: find . name "test .py" wc l 3. TODOs: Grep(pattern="TODO FIXME HACK", output mode="count") Find Largest Files Best Practices Non destructive : Use Read/stat/wc, never modify Efficient : Read small files fully, use Grep for large files Context aware : Compare to project averages, suggest optimizations Integration Works with: code auditor : Comprehensive analysis code transfer : After identifying large files codebase documenter : Understanding file purposes