📁 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
CODEBLOCK0
Command Reference
filesystem list
Advanced file and directory listing with filtering options.
Options:
- -
--path, -p <dir> - Target directory (default: current) - INLINECODE2 - Include subdirectories
- INLINECODE3 - Filter files by pattern
- INLINECODE4 - Show detailed information
- INLINECODE5 - Sort by name|size|date
- INLINECODE6 - Output format: table|json|list
filesystem search
Search files by name patterns or content.
Options:
- -
--pattern <pattern> - Search pattern (glob or regex) - INLINECODE9 - Search directory
- INLINECODE10 - Search file contents
- INLINECODE11 - Show context lines
- INLINECODE12 - Include file patterns
- INLINECODE13 - Exclude file patterns
filesystem copy
Batch copy files with pattern matching and safety checks.
Options:
- -
--pattern <glob> - Source file pattern - INLINECODE16 - Destination directory
- INLINECODE17 - Preview without executing
- INLINECODE18 - Allow file overwrites
- INLINECODE19 - Preserve timestamps and permissions
filesystem tree
Display directory structure as a tree.
Options:
- -
--path, -p <dir> - Root directory - INLINECODE22 - Maximum depth
- INLINECODE23 - Show directories only
- INLINECODE24 - Include file sizes
- INLINECODE25 - Disable colored output
filesystem analyze
Analyze directory structure and generate statistics.
Options:
- -
--path, -p <dir> - Target directory - INLINECODE28 - Show detailed statistics
- INLINECODE29 - Analyze file types
- INLINECODE30 - Show size distribution
- INLINECODE31 - Show N largest files
Installation
CODEBLOCK1
Configuration
Customize behavior via config.json:
CODEBLOCK2
Examples
Development Workflow
CODEBLOCK3
System Administration
CODEBLOCK4
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 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.
📁 文件系统管理
面向AI代理的高级文件系统操作。提供全面的文件和目录操作,具备智能过滤、搜索和批量处理能力。
功能特性
📋 智能文件列表
- - 高级过滤 - 按文件类型、模式、大小和日期过滤
- 递归遍历 - 深度目录扫描并支持深度控制
- 丰富格式 - 表格、树形和JSON输出格式
- 排序选项 - 按名称、大小、日期或类型排序
🔍 强大搜索
- - 模式匹配 - 支持Glob模式和正则表达式
- 内容搜索 - 文件内全文搜索
- 多条件 - 结合文件名和内容搜索
- 上下文显示 - 显示匹配行及其上下文
🔄 批量操作
- - 安全复制 - 基于模式的文件复制并带验证
- 预演模式 - 执行前预览操作
- 进度追踪 - 实时操作进度
- 错误处理 - 优雅的故障恢复
🌳 目录分析
- - 树形可视化 - ASCII树形结构显示
- 统计信息 - 文件计数、大小分布、类型分析
- 空间分析 - 识别大文件和目录
- 性能指标 - 操作计时与优化
快速开始
bash
带过滤的文件列表
filesystem list --path ./src --recursive --filter *.js
搜索内容
filesystem search --pattern TODO --path ./src --content
安全批量复制
filesystem copy --pattern *.log --to ./backup/ --dry-run
显示目录树
filesystem tree --path ./ --depth 3
分析目录结构
filesystem analyze --path ./logs --stats
命令参考
filesystem list
高级文件和目录列表,支持过滤选项。
选项:
- - --path, -p <目录> - 目标目录(默认:当前目录)
- --recursive, -r - 包含子目录
- --filter, -f <模式> - 按模式过滤文件
- --details, -d - 显示详细信息
- --sort, -s <字段> - 按名称|大小|日期排序
- --format <类型> - 输出格式:table|json|list
filesystem search
按名称模式或内容搜索文件。
选项:
- - --pattern <模式> - 搜索模式(glob或正则)
- --path, -p <目录> - 搜索目录
- --content, -c - 搜索文件内容
- --context <行数> - 显示上下文行数
- --include <模式> - 包含的文件模式
- --exclude <模式> - 排除的文件模式
filesystem copy
批量复制文件,支持模式匹配和安全检查。
选项:
- - --pattern - 源文件模式
- --to <目录> - 目标目录
- --dry-run - 预览而不执行
- --overwrite - 允许覆盖文件
- --preserve - 保留时间戳和权限
filesystem tree
以树形结构显示目录。
选项:
- - --path, -p <目录> - 根目录
- --depth, -d <数字> - 最大深度
- --dirs-only - 仅显示目录
- --size - 包含文件大小
- --no-color - 禁用彩色输出
filesystem analyze
分析目录结构并生成统计信息。
选项:
- - --path, -p <目录> - 目标目录
- --stats - 显示详细统计
- --types - 分析文件类型
- --sizes - 显示大小分布
- --largest <数字> - 显示N个最大文件
安装
bash
克隆或安装技能
cd ~/.clawdbot/skills
git clone
或通过ClawdHub安装
clawdhub install filesystem
赋予执行权限
chmod +x filesystem/filesystem
配置
通过config.json自定义行为:
json
{
defaultPath: ./,
maxDepth: 10,
defaultFilters: [*],
excludePatterns: [nodemodules, .git, .DSStore],
outputFormat: table,
dateFormat: YYYY-MM-DD HH:mm:ss,
sizeFormat: human,
colorOutput: true
}
示例
开发工作流
bash
查找src中所有JavaScript文件
filesystem list --path ./src --recursive --filter *.js --details
搜索TODO注释
filesystem search --pattern TODO|FIXME --path ./src --content --context 2
复制所有日志到备份目录
filesystem copy --pattern *.log --to ./backup/logs/ --preserve
分析项目结构
filesystem tree --path ./ --depth 2 --size
系统管理
bash
查找大文件
filesystem analyze --path /var/log --sizes --largest 10
列出最近文件
filesystem list --path /tmp --sort date --details
清理旧临时文件
filesystem list --path /tmp --filter *.tmp --older-than 7d
安全特性
- - 路径验证 - 防止目录遍历攻击
- 权限检查 - 操作前验证读写权限
- 预演模式 - 预览破坏性操作
- 备份提示 - 覆盖前建议备份
- 错误恢复 - 优雅处理权限错误
集成
与其他Clawdbot工具无缝协作:
- - 安全技能 - 验证所有文件系统操作
- Git操作 - 遵循.gitignore模式
- 备份工具 - 集成备份工作流
- 日志分析 - 完美适用于日志文件管理
更新与社区
及时了解最新的Clawdbot技能和文件系统工具:
- - 🐦 在X上关注@LexpertAI 获取技能更新和发布
- 🛠️ 新的文件系统功能和增强
- 📋 文件管理自动化的最佳实践
- 💡 提高生产力的技巧和窍门
通过关注@LexpertAI获取新技能和改进的早期访问权限:
- - 技能公告和新版本发布
- 性能优化和功能更新
- 集成示例和工作流自动化
- 生产力工具的社区讨论
许可证
MIT许可证 - 免费用于个人和商业用途。
记住:优秀的文件系统管理始于合适的工具。本技能在保持安全性和性能的同时提供全面的操作。