filesystem

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

📁 Filesystem Management

📁 文件系统管理

Advanced filesystem operations for AI agents. Comprehensive file and directory operations with intelligent filtering, searching, and batch processing capabilities.
为AI Agent提供的高级文件系统操作能力,是具备智能过滤、搜索和批量处理功能的完整文件与目录操作套件。

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
  • 高级过滤 - 按文件类型、匹配模式、大小和日期过滤
  • 递归遍历 - 支持深度控制的深层目录扫描
  • 丰富格式 - 支持表格、树形、JSON输出格式
  • 排序选项 - 可按名称、大小、日期或类型排序

🔍 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
  • 模式匹配 - 支持Glob模式和regex正则表达式
  • 内容搜索 - 支持文件内全文搜索
  • 多条件组合 - 可结合文件名和内容搜索
  • 上下文展示 - 显示匹配行的上下文内容

🔄 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
  • 树形可视化 - ASCII树形结构展示
  • 统计功能 - 文件计数、大小分布、类型分析
  • 空间分析 - 识别大文件和大目录
  • 性能指标 - 操作耗时统计与优化

Quick Start

快速开始

bash
undefined
bash
undefined

List files with filtering

带过滤条件列举文件

filesystem list --path ./src --recursive --filter "*.js"
filesystem list --path ./src --recursive --filter "*.js"

Search for content

搜索内容

filesystem search --pattern "TODO" --path ./src --content
filesystem search --pattern "TODO" --path ./src --content

Batch copy with safety

安全批量复制

filesystem copy --pattern "*.log" --to ./backup/ --dry-run
filesystem copy --pattern "*.log" --to ./backup/ --dry-run

Show directory tree

展示目录树

filesystem tree --path ./ --depth 3
filesystem tree --path ./ --depth 3

Analyze directory structure

分析目录结构

filesystem analyze --path ./logs --stats
undefined
filesystem analyze --path ./logs --stats
undefined

Command Reference

命令参考

filesystem list

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
带过滤选项的高级文件与目录列举功能
选项:
  • --path, -p <dir>
    - 目标目录(默认:当前目录)
  • --recursive, -r
    - 包含子目录
  • --filter, -f <pattern>
    - 按模式过滤文件
  • --details, -d
    - 展示详细信息
  • --sort, -s <field>
    - 排序维度:name|size|date
  • --format <type>
    - 输出格式:table|json|list

filesystem search

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
按名称模式或内容搜索文件
选项:
  • --pattern <pattern>
    - 搜索模式(glob或regex)
  • --path, -p <dir>
    - 搜索目录
  • --content, -c
    - 搜索文件内容
  • --context <lines>
    - 展示上下文行数
  • --include <pattern>
    - 包含的文件模式
  • --exclude <pattern>
    - 排除的文件模式

filesystem copy

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
带模式匹配和安全校验的批量文件复制
选项:
  • --pattern <glob>
    - 源文件匹配模式
  • --to <dir>
    - 目标目录
  • --dry-run
    - 仅预览不执行
  • --overwrite
    - 允许覆盖文件
  • --preserve
    - 保留时间戳和权限

filesystem tree

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
以树形结构展示目录结构
选项:
  • --path, -p <dir>
    - 根目录
  • --depth, -d <num>
    - 最大展示深度
  • --dirs-only
    - 仅展示目录
  • --size
    - 包含文件大小
  • --no-color
    - 关闭彩色输出

filesystem analyze

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
分析目录结构并生成统计数据
选项:
  • --path, -p <dir>
    - 目标目录
  • --stats
    - 展示详细统计信息
  • --types
    - 分析文件类型
  • --sizes
    - 展示大小分布
  • --largest <num>
    - 展示前N个最大的文件

Installation

安装

bash
undefined
bash
undefined

Clone or install the skill

克隆或安装该skill

cd ~/.clawdbot/skills git clone <filesystem-skill-repo>
cd ~/.clawdbot/skills git clone <filesystem-skill-repo>

Or install via ClawdHub

或通过ClawdHub安装

clawdhub install filesystem
clawdhub install filesystem

Make executable

授予可执行权限

chmod +x filesystem/filesystem
undefined
chmod +x filesystem/filesystem
undefined

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
}
可通过
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
undefined
bash
undefined

Find all JavaScript files in src

查找src目录下所有JavaScript文件

filesystem list --path ./src --recursive --filter "*.js" --details
filesystem list --path ./src --recursive --filter "*.js" --details

Search for TODO comments

搜索TODO注释

filesystem search --pattern "TODO|FIXME" --path ./src --content --context 2
filesystem search --pattern "TODO|FIXME" --path ./src --content --context 2

Copy all logs to backup

复制所有日志到备份目录

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

Analyze project structure

分析项目结构

filesystem tree --path ./ --depth 2 --size
undefined
filesystem tree --path ./ --depth 2 --size
undefined

System Administration

系统管理

bash
undefined
bash
undefined

Find large files

查找大文件

filesystem analyze --path /var/log --sizes --largest 10
filesystem analyze --path /var/log --sizes --largest 10

List recent files

列举最近修改的文件

filesystem list --path /tmp --sort date --details
filesystem list --path /tmp --sort date --details

Clean old temp files

清理旧临时文件

filesystem list --path /tmp --filter "*.tmp" --older-than 7d
undefined
filesystem list --path /tmp --filter "*.tmp" --older-than 7d
undefined

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
可与其他Clawdbot工具无缝协作:
  • 安全Skill - 校验所有文件系统操作
  • Git操作 - 遵循.gitignore规则
  • 备份工具 - 可接入备份工作流
  • 日志分析 - 非常适合日志文件管理

Updates & Community

更新与社区

Stay informed about the latest Clawdbot skills and filesystem tools:
  • 🐦 Follow @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
及时了解最新的Clawdbot skill和文件系统工具:
  • 🐦 在X平台关注 @LexpertAI 获取skill更新和发布通知
  • 🛠️ 全新文件系统功能和增强能力
  • 📋 文件管理自动化最佳实践
  • 💡 提升工作流效率的技巧与窍门
关注@LexpertAI可提前获取新skill和功能升级,包含:
  • Skill发布公告和新版本通知
  • 性能优化和功能更新
  • 集成示例和工作流自动化方案
  • 生产力工具社区讨论

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.
MIT许可证 - 可免费用于个人和商业用途。

请注意:优秀的文件系统管理始于趁手的工具。本skill在保障安全性和性能的同时,提供了全面的操作能力。