Skip to main content
skill CX Codex

filesystem — Claude Code skill: search, filter and analyze files

Skill for filesystem operations: pattern-based search, filtering, batch processing and directory structure analysis. Use it when you need to find files quickly, process them in bulk, or understand how your project is organized.

MIT 290 installs ★ 675 updated 2026-03-07

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add sundial-org/awesome-openclaw-skills --skill filesystem -a claude-code
Open on GitHub

What filesystem does

filesystem provides a set of commands for working with files and directories. Search by name and content, list files with filtering by type and size, build directory trees, copy files by pattern. Each operation offers a dry-run preview before execution and output in table, JSON or plain text format.

Four main commands: filesystem list retrieves files with sorting and filtering, filesystem search finds files by glob/regex patterns and searches file contents with context, filesystem copy safely copies files matching a pattern, filesystem analyze generates statistics and locates large files. The skill validates paths to prevent traversal attacks and checks read/write permissions before each operation.

Requires Node.js in PATH. Exclusion patterns like node_modules, .git and .DS_Store are configured in config.json and applied by default.

What it helps with

  • Find all files of a specific type in a project recursively
  • Search for strings matching a pattern across multiple files with surrounding context
  • Copy a group of files matching a mask to a backup or archive directory
  • Locate the largest files within a directory and its subdirectories
  • Display the project structure as a tree with file sizes

Example prompts for the agent

  • List all JavaScript files in the src folder recursively with details
  • Search for TODO and FIXME strings in ./src sources with two lines of context
  • Copy all logs to ./backup/logs/ preserving permissions, show what will happen first

How to install filesystem

1Skills CLI (Vercel)

npx skills add sundial-org/awesome-openclaw-skills --skill filesystem -a claude-code

2Manually: put the files in place

~/.claude/skills/filesystem/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/filesystem/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about filesystem

How do I install filesystem in Claude Code?

Run npx skills add sundial-org/awesome-openclaw-skills --skill filesystem -a claude-code, then register the entry in ~/.claude/skills/filesystem/SKILL.md.

What does filesystem do?

It provides file search by name and content, filtering, sorting, batch copy with dry-run preview, directory tree display, and statistics on file sizes and types.

What are the requirements for this skill?

Node.js must be in PATH. The skill validates all paths and permissions before executing any operation.

Source text

SKILL.md · MIT
---
name: filesystem
description: Advanced filesystem operations - listing, searching, batch processing, and directory analysis for Clawdbot
homepage: https://github.com/gtrusler/clawdbot-filesystem
metadata: {"clawdbot":{"emoji":"📁","requires":{"bins":["node"]}}}
---

# 📁 Filesystem Management

Advanced filesystem operations for AI agents. Comprehensive file and directory operations with intelligent filtering, searching, and batch processing capabilities.

## Features

### 📋 **Smart File Listing**
- **Advanced Filtering** - Filter by file types, patterns, size, and date
- **Recursive Traversal** - Deep directory scanning with depth control
- **Rich Formatting** - Table, tree, and JSON output formats
- **Sort Options** - By name, size, date, or type

### 🔍 **Powerful Search**
- **Pattern Matching** - Glob patterns and regex support
- **Content Search** - Full-text search within files
- **Multi-criteria** - Combine filename and content searches
- **Context Display** - Show matching lines with context

### 🔄 **Batch Operations**
- **Safe Copying** - Pattern-based file copying with validation
- **Dry Run Mode** - Preview operations before execution
- **Progress Tracking** - Real-time operation progress
- **Error Handling** - Graceful failure recovery

### 🌳 **Directory Analysis**
- **Tree Visualization** - ASCII tree structure display
- **Statistics** - File counts, size distribution, type analysis
- **Space Analysis** - Identify large files and directories
- **Performance Metrics** - Operation timing and optimization

## Quick Start

```bash
# List files with filtering
filesystem list --path ./src --recursive --filter "*.js"

# Search for content
filesystem search --pattern "TODO" --path ./src --content

# Batch copy with safety
filesystem copy --pattern "*.log" --to ./backup/ --dry-run

# Show directory tree
filesystem tree --path ./ --depth 3

# Analyze directory structure
filesystem analyze --path ./logs --stats
```

## Command Reference

### `filesystem list`
Advanced file and directory listing with filtering options.

**Options:**
- `--path, -p <dir>` - Target directory (default: current)
- `--recursive, -r` - Include subdirectories
- `--filter, -f <pattern>` - Filter files by pattern
- `--details, -d` - Show detailed information
- `--sort, -s <field>` - Sort by name|size|date
- `--format <type>` - Output format: table|json|list

### `filesystem search`
Search files by name patterns or content.

**Options:**
- `--pattern <pattern>` - Search pattern (glob or regex)
- `--path, -p <dir>` - Search directory
- `--content, -c` - Search file contents
- `--context <lines>` - Show context lines
- `--include <pattern>` - Include file patterns
- `--exclude <pattern>` - Exclude file patterns

### `filesystem copy`
Batch copy files with pattern matching and safety checks.

**Options:**
- `--pattern <glob>` - Source file pattern
- `--to <dir>` - Destination directory
- `--dry-run` - Preview without executing
- `--overwrite` - Allow file overwrites
- `--preserve` - Preserve timestamps and permissions

### `filesystem tree`
Display directory structure as a tree.

**Options:**
- `--path, -p <dir>` - Root directory
- `--depth, -d <num>` - Maximum depth
- `--dirs-only` - Show directories only
- `--size` - Include file sizes
- `--no-color` - Disable colored output

### `filesystem analyze`
Analyze directory structure and generate statistics.

**Options:**
- `--path, -p <dir>` - Target directory
- `--stats` - Show detailed statistics
- `--types` - Analyze file types
- `--sizes` - Show size distribution
- `--largest <num>` - Show N largest files

## Installation

```bash
# Clone or install the skill
cd ~/.clawdbot/skills
git clone <filesystem-skill-repo>

# Or install via ClawdHub
clawdhub install filesystem

# Make executable
chmod +x filesystem/filesystem
```

## Configuration

Customize behavior via `config.json`:

```json
{
  "defaultPath": "./",
  "maxDepth": 10,
  "defaultFilters": ["*"],
  "excludePatterns": ["node_modules", ".git", ".DS_Store"],
  "outputFormat": "table",
  "dateFormat": "YYYY-MM-DD HH:mm:ss",
  "sizeFormat": "human",
  "colorOutput": true
}
```

## Examples

### Development Workflow
```bash
# Find all JavaScript files in src
filesystem list --path ./src --recursive --filter "*.js" --details

# Search for TODO comments
filesystem search --pattern "TODO|FIXME" --path ./src --content --context 2

# Copy all logs to backup
filesystem copy --pattern "*.log" --to ./backup/logs/ --preserve

# Analyze project structure
filesystem tree --path ./ --depth 2 --size
```

### System Administration
```bash
# Find large files
filesystem analyze --path /var/log --sizes --largest 10

# List recent files
filesystem list --path /tmp --sort date --details

# Clean old temp files
filesystem list --path /tmp --filter "*.tmp" --older-than 7d
```

## Safety Features

- **Path Validation** - Prevents directory traversal attacks
- **Permission Checks** - Verifies read/write access before operations
- **Dry Run Mode** - Preview destructive operations
- **Backup Prompts** - Suggests backups before overwrites
- **Error Recovery** - Graceful handling of permission errors

## Integration

Works seamlessly with other Clawdbot tools:
- **Security Skill** - Validates all filesystem operations
- **Git Operations** - Respects .gitignore patterns
- **Backup Tools** - Integrates with backup workflows
- **Log Analysis** - Perfect for log file management

## Updates & Community

**Stay informed about the latest Clawdbot skills and filesystem tools:**

- 🐦 **Follow [@LexpertAI](https://x.com/LexpertAI)** on X for skill updates and releases
- 🛠️ **New filesystem features** and enhancements
- 📋 **Best practices** for file management automation
- 💡 **Tips and tricks** for productivity workflows

Get early access to new skills and improvements by following @LexpertAI for:
- **Skill announcements** and new releases
- **Performance optimizations** and feature updates  
- **Integration examples** and workflow automation
- **Community discussions** on productivity tools

## License

MIT License - Free for personal and commercial use.

---

**Remember**: Great filesystem management starts with the right tools. This skill provides comprehensive operations while maintaining safety and performance.

© sundial-org · MIT · sundial-org/awesome-openclaw-skills

Similar skills

All skills for Agent setup: memory, context, orchestration →

From the same set37

The whole set →
stock-info-explorer stock-info-explorer — a skill for Claude Code, Codex, Cursor, Copilot and Gemini CLI that pulls Yahoo Finance data via yfinance and computes technical indicators on your machine. CX Codex +1 509installs stock-evaluator-v3 stock-evaluator-v3 — a skill for full stock evaluation before you buy: applies eight legendary investor frameworks, runs technical and fundamental checks, builds a 60+ metric dashboard, and gives a clear buy, hold, or sell call. CX Codex +1 376installs apple-mail This skill connects an agent to Apple Mail.app to search, read, send, and manage messages. Use it to handle email tasks through your coding agent. CX Codex +1 356installs excel Enables your AI coding agent to inspect, build, edit, and style Excel spreadsheets using openpyxl CLI commands. CX Codex +1 294installs n8n-workflow-automation n8n-workflow-automation is a Claude Code skill that designs n8n workflows with run logs, retries, and a human review queue. Ask for importable JSON to get a workflow file; otherwise it returns a design spec. CX Codex +1 274installs caldav-calendar Syncs and reads CalDAV calendars directly from the terminal. Helps query agendas, find meetings, and insert events via command-line tools on Linux. CX Codex +1 267installs cron-mastery The cron-mastery skill explains when OpenClaw should use Cron or Heartbeat, how to schedule reminders, and how to remove finished one-shot jobs. CX Codex +1 260installs skill-vetter skill-vetter audits third-party AI agent skills for malicious patterns, credential theft, and excessive permissions before installation. CX Codex +1 260installs

Project sponsors

Companies that keep this analytics open