Analyze files and get detailed metadata including size, line counts, modification times, and content statistics.

Apache-2.0Auto-check passedData & Analytics

Install File Operations

skills CLI
$ npx skills add mhattingpete/claude-skills-marketplace --skill file-operations -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install mhattingpete/claude-skills-marketplace file-operations --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/mhattingpete/claude-skills-marketplace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/code-operations-plugin/skills/file-operations .claude/skills/file-operations && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
file-operations
GitHub stars
680
Token cost
~635 tokens
SKILL.md length
177 words
Files
1
Skills in repo
16
Repo updated
First seen
Licence
Apache-2.0

At a glance

Analyze files and get detailed metadata including size, line counts, modification times, and content statistics.

  • Works in 5 steps: Get size/mod time: stat -f "%z bytes,… → Count lines: wc -l file.py → Read file: Read(file_path="file.py") → …
  • Users request file information
  • SKILL.md covers When to Use, Core Operations, Workflow Examples and Best Practices, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

File Operations is an agent skill from mhattingpete/claude-skills-marketplace. 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.

Its SKILL.md is about 640 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Data & Analytics, covering Statistics. The repository describes itself as: Claude Code Skills for software engineering workflows - Git automation, testing, and code review. The licence is Apache-2.0.

When your agent uses it

  • Users request file information
  • Analysis without modifying files

Example prompts

  • “/file-operations”

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  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")

What it can do on your machine

Read from SKILL.md and the folder at commit b5b34bc. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are bash).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

File Operations loads about 635 tokens when it runs. Until then it costs about 55 tokens; SKILL.md has 177 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~55
When it runs · the whole SKILL.md, loaded when a task matches
~635

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from mhattingpete/claude-skills-marketplace at commit b5b34bc, republished under its Apache-2.0 licence (© mhattingpete). 177 words, ~635 tokens.

Download SKILL.mdSave it as .claude/skills/file-operations/SKILL.md (or your agent's skills folder).
name
file-operations
description
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.

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
bash
stat -f "%z bytes, modified %Sm" [file_path]  # Single file
ls -lh [directory]                             # Multiple files
du -h [file_path]                              # Human-readable size
Line Counts
bash
wc -l [file_path]                              # Single file
wc -l [file1] [file2]                          # Multiple files
find [dir] -name "*.py" | xargs wc -l          # Directory total
Content Analysis

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
Find Files
Glob(pattern="**/*.py")

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
bash
find . -type f -not -path "./node_modules/*" -exec du -h {} + | sort -rh | head -20

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

© mhattingpete, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in code-operations-plugin/skills/file-operations of mhattingpete/claude-skills-marketplace.

Open the folder on GitHubat commit b5b34bc

Compare with similar skills

File Operations next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

File Operations compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
File Operations this skillmhattingpete/claude-skills-marketplace680—~635Automated safety check: PassApache-2.0
Sandbox Benchvercel/next.js143k—~4.1kAutomated safety check: PassMIT
Statistical Analysisspacering-net/codeg3.9k3 repos~5kAutomated safety check: PassMIT
StatsmodelszLanqing/codex-claude-academic-skills4.7k15 repos~4.9kAutomated safety check: PassBSD-3-Clause
AI Daily DigestvigorX777/ai-daily-digest1.6k—~1.3kAutomated safety check: PassNone
Statistical Powerspacering-net/codeg3.9k1 repos~3.6kAutomated safety check: NotesMIT

Similar skills

  • Sandbox Bench

    vercel/next.js

    Official

    Benchmark React or Next.js changes on Vercel Sandbox VMs with paired A/B statistics: react PR/commit vs base, or Next.js PR/commit vs base, measured end-to-end through the bench/render-pipeline app…

    143k GitHub stars~4.1k tokensUpdated today
    Data & AnalyticsAuto-check passed
  • Statistical Analysis

    spacering-net/codeg

    Guided statistical analysis for research data - test selection, assumption checking, effect sizes, power analysis, Bayesian alternatives, and APA-formatted reporting.

    3.9k GitHub starsUsed in 3 repos~5k tokens
    Data & AnalyticsAuto-check passed
  • Statsmodels

    zLanqing/codex-claude-academic-skills

    Statistical models library for Python. An agent skill from zLanqing/codex-claude-academic-skills.

    4.7k GitHub starsUsed in 15 repos~4.9k tokens
    Data & AnalyticsAuto-check passed
  • AI Daily Digest

    vigorX777/ai-daily-digest

    Fetches RSS feeds from 90 top Hacker News blogs (curated by Karpathy), uses AI to score and filter articles, and generates a daily digest in Markdown with Chinese-translated titles, category…

    1.6k GitHub stars~1.3k tokensUpdated 7 mo ago
    Data & AnalyticsAuto-check passed
  • Statistical Power

    spacering-net/codeg

    Sample-size and statistical power calculations for planning studies.

    3.9k GitHub starsUsed in 1 repo~3.6k tokens
    Data & AnalyticsAuto-check: notes
  • Agent Session Monitor

    higress-group/higress

    Real-time agent conversation monitoring - monitors Higress access logs, aggregates conversations by session, tracks token usage.

    9.5k GitHub stars~3.3k tokensUpdated yesterday
    Data & AnalyticsAuto-check passed

More from mhattingpete/claude-skills-marketplace

All 16 skills in this repo
  • Architecture Diagram Creator

    mhattingpete/claude-skills-marketplace

    Create comprehensive HTML architecture diagrams showing data flows, business objectives, features, technical architecture, and deployment.

    680 GitHub stars~676 tokensUpdated 2 mo ago
    Auto-check passed
  • Code Transfer

    mhattingpete/claude-skills-marketplace

    Transfer code between files with line-based precision. An agent skill from mhattingpete/claude-skills-marketplace.

    680 GitHub stars~1k tokensUpdated 2 mo ago
    Auto-check passed
  • Conversation Analyzer

    mhattingpete/claude-skills-marketplace

    Analyzes your Claude Code conversation history to identify patterns, common mistakes, and opportunities for workflow improvement.

    680 GitHub stars~1k tokensUpdated 2 mo ago
    Auto-check passed
  • Dashboard Creator

    mhattingpete/claude-skills-marketplace

    Create HTML dashboards with KPI metric cards, bar/pie/line charts, progress indicators, and data visualizations.

    680 GitHub stars~489 tokensUpdated 2 mo ago
    Auto-check passed
  • Flowchart Creator

    mhattingpete/claude-skills-marketplace

    Create HTML flowcharts and process diagrams with decision trees, color-coded stages, arrows, and swimlanes.

    680 GitHub stars~518 tokensUpdated 2 mo ago
    Auto-check passed
  • Technical Doc Creator

    mhattingpete/claude-skills-marketplace

    Create HTML technical documentation with code blocks, API workflows, system architecture diagrams, and syntax highlighting.

    680 GitHub stars~604 tokensUpdated 2 mo ago
    Auto-check passed

Questions about File Operations

What does File Operations do?

Analyze files and get detailed metadata including size, line counts, modification times, and content statistics. File Operations is an agent skill from mhattingpete/claude-skills-marketplace. Analyze files and get detailed metadata including size, line counts, modification times, and content statistics.

When should I use File Operations?

File Operations fits situations like: users request file information; analysis without modifying files.

How do I install File Operations in Claude Code?

Run `npx skills add mhattingpete/claude-skills-marketplace --skill file-operations -a claude-code`. Or copy the skill folder (code-operations-plugin/skills/file-operations in mhattingpete/claude-skills-marketplace) into .claude/skills/file-operations in your project. Claude Code loads it when a task matches its description.

How do I install File Operations in Codex?

Run `npx skills add mhattingpete/claude-skills-marketplace --skill file-operations -a codex`. Or copy the skill folder (code-operations-plugin/skills/file-operations in mhattingpete/claude-skills-marketplace) into .agents/skills/file-operations in your project. Codex loads it when a task matches its description.

Can I use File Operations in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add mhattingpete/claude-skills-marketplace --skill file-operations -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/file-operations, .gemini/skills/file-operations, .github/skills/file-operations and .opencode/skills/file-operations in your project.

What does File Operations need to run?

SKILL.md names no scripts, command-line tools or credentials: File Operations is instructions for the agent only.

Does File Operations access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is File Operations safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does File Operations use?

File Operations is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does File Operations use?

About 635 tokens (SKILL.md is roughly 2.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to File Operations?

Skills that share tags, products or a category with File Operations: Sandbox Bench (vercel/next.js, 143k stars), Statistical Analysis (spacering-net/codeg, 3.9k stars), Statsmodels (zLanqing/codex-claude-academic-skills, 4.7k stars) and AI Daily Digest (vigorX777/ai-daily-digest, 1.6k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains File Operations?

mhattingpete (a GitHub user) maintains it in mhattingpete/claude-skills-marketplace, which has 680 GitHub stars. The repository holds 16 skills in this directory. The repository was last updated on July 25, 2026.

Source: mhattingpete/claude-skills-marketplace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.