File Management (Brian)
by @briandavisbikes-code
Organize and maintain AI agent workspaces using structured directories, clear naming, regular audits, and safe cleanup of unused or dead files.
clawhub install briandavis-file-mgmtπ About This Skill
File Management Skill
_A battle-tested approach to keeping your AI agent workspace organized and maintainable._
Overview
This skill documents the file management system developed through real-world use of OpenClaw. It covers workspace structure, naming conventions, dead file detection, and cleanup practices.
When to Use This Skill
Core Principles
1. Every File Has a Purpose
2. Structure Mirrors Function
workspace/
βββ memory/ # Daily session logs and working context
βββ skills/ # Installed skill directories
βββ project-1/ # Project-specific directories
βββ project-2/
βββ ACTIVE.md # Currently running projects & priorities
βββ DREAMS.md # Background processing notes
βββ ARCHIVED/ # Completed or abandoned projects
3. Naming Conventions
.sh for bash, .py for Python, .js for JavaScript.log.json, .yaml, or .mdmemory/YYYY-MM-DD.md format4. Audit Regularly
Run workspace audits monthly or after major changes. Use the audit script to identify:Quick Audit Commands
# Find files not referenced by any cron or script
grep -r "filename" ~/path/to/workspace/ --include="*.sh" --include="*.py" --include="*.js"Find recently modified files
find ~/path/to/workspace -type f -mtime -7Check disk usage by directory
du -sh ~/path/to/workspace/*/
Cleanup Best Practices
1. Never delete immediately β use trash instead of rm
2. Document before deleting β note what a file did in memory first
3. Verify before cleanup β confirm no active references
4. Commit before major cleanup β create a revert point
Full Documentation
See FILE-MANAGEMENT.md for the complete reference implementation, including: