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
undefinedbash
undefinedList 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
undefinedfilesystem analyze --path ./logs --stats
undefinedCommand Reference
命令参考
filesystem list
filesystem listfilesystem list
filesystem listAdvanced file and directory listing with filtering options.
Options:
- - Target directory (default: current)
--path, -p <dir> - - Include subdirectories
--recursive, -r - - Filter files by pattern
--filter, -f <pattern> - - Show detailed information
--details, -d - - Sort by name|size|date
--sort, -s <field> - - Output format: table|json|list
--format <type>
带过滤选项的高级文件与目录列举功能
选项:
- - 目标目录(默认:当前目录)
--path, -p <dir> - - 包含子目录
--recursive, -r - - 按模式过滤文件
--filter, -f <pattern> - - 展示详细信息
--details, -d - - 排序维度:name|size|date
--sort, -s <field> - - 输出格式:table|json|list
--format <type>
filesystem search
filesystem searchfilesystem search
filesystem searchSearch files by name patterns or content.
Options:
- - Search pattern (glob or regex)
--pattern <pattern> - - Search directory
--path, -p <dir> - - Search file contents
--content, -c - - Show context lines
--context <lines> - - Include file patterns
--include <pattern> - - Exclude file patterns
--exclude <pattern>
按名称模式或内容搜索文件
选项:
- - 搜索模式(glob或regex)
--pattern <pattern> - - 搜索目录
--path, -p <dir> - - 搜索文件内容
--content, -c - - 展示上下文行数
--context <lines> - - 包含的文件模式
--include <pattern> - - 排除的文件模式
--exclude <pattern>
filesystem copy
filesystem copyfilesystem copy
filesystem copyBatch copy files with pattern matching and safety checks.
Options:
- - Source file pattern
--pattern <glob> - - Destination directory
--to <dir> - - Preview without executing
--dry-run - - Allow file overwrites
--overwrite - - Preserve timestamps and permissions
--preserve
带模式匹配和安全校验的批量文件复制
选项:
- - 源文件匹配模式
--pattern <glob> - - 目标目录
--to <dir> - - 仅预览不执行
--dry-run - - 允许覆盖文件
--overwrite - - 保留时间戳和权限
--preserve
filesystem tree
filesystem treefilesystem tree
filesystem treeDisplay directory structure as a tree.
Options:
- - Root directory
--path, -p <dir> - - Maximum depth
--depth, -d <num> - - Show directories only
--dirs-only - - Include file sizes
--size - - Disable colored output
--no-color
以树形结构展示目录结构
选项:
- - 根目录
--path, -p <dir> - - 最大展示深度
--depth, -d <num> - - 仅展示目录
--dirs-only - - 包含文件大小
--size - - 关闭彩色输出
--no-color
filesystem analyze
filesystem analyzefilesystem analyze
filesystem analyzeAnalyze directory structure and generate statistics.
Options:
- - Target directory
--path, -p <dir> - - Show detailed statistics
--stats - - Analyze file types
--types - - Show size distribution
--sizes - - Show N largest files
--largest <num>
分析目录结构并生成统计数据
选项:
- - 目标目录
--path, -p <dir> - - 展示详细统计信息
--stats - - 分析文件类型
--types - - 展示大小分布
--sizes - - 展示前N个最大的文件
--largest <num>
Installation
安装
bash
undefinedbash
undefinedClone 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
undefinedchmod +x filesystem/filesystem
undefinedConfiguration
配置
Customize behavior via :
config.jsonjson
{
"defaultPath": "./",
"maxDepth": 10,
"defaultFilters": ["*"],
"excludePatterns": ["node_modules", ".git", ".DS_Store"],
"outputFormat": "table",
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"sizeFormat": "human",
"colorOutput": true
}可通过自定义运行逻辑:
config.jsonjson
{
"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
undefinedbash
undefinedFind 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
undefinedfilesystem tree --path ./ --depth 2 --size
undefinedSystem Administration
系统管理
bash
undefinedbash
undefinedFind 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
undefinedfilesystem list --path /tmp --filter "*.tmp" --older-than 7d
undefinedSafety 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在保障安全性和性能的同时,提供了全面的操作能力。