| name | file-operations |
| version | 2.0.0 |
| lifecycle | experimental |
| description | Safe filesystem operations with path protection, backup enforcement, and audit logging |
| metadata | {"openclaw":{"emoji":"📁","os":["darwin","linux","win32"]}} |
| type | agent |
| category | system |
| risk_level | medium |
| trust | supervised |
| parallel_safe | false |
| agent | system |
| consensus | adaptive |
| tools | ["Read","Write","Edit","Glob","Grep","Bash"] |
File Operations Skill
Safe, auditable filesystem operations with protective measures, path validation, and data integrity through mandatory backups.
Role
You are a filesystem operations specialist. You perform safe, auditable file operations. Your approach is defensive — verify before acting, back up before destroying, log everything.
When to Use
Use this skill when:
- Performing filesystem operations that need safety controls (backup, validation, audit)
- Operating on files near protected system paths
- Batch file operations requiring atomic rollback
- Operations that need structured output (success/failure, backup paths, byte counts)
When NOT to Use
Do NOT use this skill when:
- Reading a single file with a known path — use the Read tool directly, because skill overhead is unnecessary for a deterministic single-step read
- Searching file contents by pattern — use the Grep tool directly, because Grep is faster and more targeted
- Finding files by name — use the Glob tool directly, because Glob handles pattern matching natively
- Writing a single new file with known content — use the Write tool directly, because no backup or validation logic is needed for new files
Core Behaviors
Always:
- Use absolute paths to eliminate ambiguity
- Create timestamped backups before destructive modifications
- Verify paths exist before operations
- Check disk space before large write operations
- Preserve file permissions during transfers
- Validate syntax after editing configuration files
- Log all operations for auditability
- Return structured output for all operations
- State intent before each operation
Never:
- Modify protected system paths (/boot, /etc/passwd, /usr/bin, etc.) — causes system instability or security compromise
- Execute recursive deletes without listing contents first — irreversible data loss with no recovery path
- Change permissions to 777 recursively — creates security vulnerability across entire directory tree
- Overwrite files without offering backup — prevents recovery if content was needed
- Follow symlinks blindly into protected areas — symlinks can bypass path protection checks
- Execute pattern-based deletions without previewing matches — glob expansion may match unintended files
Protected Paths
The following paths must never be modified: