A comprehensive, deterministic slash command for Claude Code that transforms chaotic file and folder structures into well-organized, maintainable systems across any operating system.
This repository contains a sophisticated AI agent prompt designed as a slash command for Claude Code CLI. The agent specializes in filesystem organization with minimal user intervention, applying intelligent rules and pattern recognition to create clean, consistent directory structures.
- Machine-Readable Naming: Enforces
snake_caseconventions and removes special characters - Automatic Typo Remediation: Fixes obvious typos without consultation
- Smart Timestamp Integration: Applies consistent date formats (DD-MM-YYYY, YYMMDD)
- Optimal Recursion Depth: Creates balanced folder hierarchies (avoiding both flat chaos and excessive nesting)
- Orphan File Management: Identifies and relocates files not contained in any folder
- Intelligent Disambiguation: Resolves naming conflicts with descriptive suffixes
- Pattern Recognition: Automatically detects and applies domain-specific organizational strategies
- Vision-Based Analysis: Uses image analysis to intelligently rename photos and videos
- Duplicate Detection: Identifies and consolidates duplicate files
- Cross-Platform Compatibility: Ensures naming works across Windows, Linux, and macOS
- Archive Management: Organizes outdated files with year/month hierarchies
- Metadata Preservation: Maintains file extensions and important attributes
The agent features a unique, theatrical communication style:
- Beginning: Inspirational announcements about the "monumental quest" ahead
- Completion: Celebratory victory messages emphasizing the transformative impact
The agent recognizes and applies specialized rules for:
- Content-based renaming using vision analysis
- Resolution-based organization (thumbnails vs full resolution)
- Semantic grouping (portraits, landscapes, etc.)
- Resolution hierarchy (4K → 1080p → 720p)
- Aspect ratio separation (portrait/landscape)
- Content type classification
- Media type segregation (images, videos, documents, audio)
- Technical attribute sorting (resolution → aspect ratio)
- Separation of concerns (code vs non-code)
- Standard directory structures (
src/,assets/,docs/,tests/)
- Type and status organization (active, drafts, archive)
- Year/month hierarchies for invoices and time-sensitive docs
- File type grouping
- Installer identification and versioning
- Archive consolidation
- Default format:
snake_case - Avoid special characters (except
_and-) - Lowercase preferred (capitals only when critical for readability)
- Concise but descriptive (<50 characters)
- No redundancy with parent folder names
- General naming:
DD-MM-YYYYorYYMMDD - File prefixes:
YYMMDDfor chronological sorting - Hierarchical folders:
year/month/day/structure
- 1-3 items: No subfolder needed (unless semantically distinct)
- 4-9 items: Evaluate natural groupings
- 10+ items: Subfolders likely beneficial
- Maximum depth: Rarely exceed 5 levels
- Fixing obvious typos
- Applying machine-readable naming
- Moving files to clearly appropriate folders
- Creating obvious organizational structures
- Removing duplicate temp/system files
- Deleting files (except obvious temp files)
- Major restructuring (>30% of hierarchy)
- Ambiguous file purposes
- Multiple valid organization strategies
When unsure, the agent creates a /bin folder and moves questionable items there for user review.
- Analysis: Scan structure, identify patterns, detect issues
- Planning: Determine strategy, plan structure and renaming
- Execution: Create folders, fix typos, move files, resolve conflicts
- Verification: Confirm completeness, validate consistency, document changes
This repository maintains multiple versions of the slash command:
prompt.md: Current version with comprehensive featuresarchive/v1/: Earlier iterationarchive/v2/: Second iterationarchive/mine/: Original user-created versions
Rule: Always iterate by creating new versions. Never overwrite existing versions.
- Add the slash command to your Claude Code CLI configuration
- Navigate to the directory you want to organize
- Execute the slash command
- The agent will analyze, plan, and execute the organization
- Review any items placed in
/binfor uncertain cases
- Claude Code CLI
- File system access permissions
- (Optional) Vision API access for image/video content analysis
Claude-File-Organiser-Super-Slash/
├── README.md # This file
├── CLAUDE.md # Project instructions for AI
├── prompt.md # Current slash command prompt
├── archive/ # Previous versions
│ ├── v1/
│ │ └── prompt.md
│ ├── v2/
│ └── mine/
│ └── my-v1.md
└── breakdown/ # Analysis documentation
└── full.md
- Always preserve original extensions
- Use lowercase (
.jpgnot.JPG) - Avoid multiple extensions unless necessary
- Remove redundant extensions
src/- Source codeassets/- Static resourcesdocs/- Documentationarchive/- Outdated but useful filestemp/- Temporary working filesbin/- Uncertain items for review
Daniel Rosehill
- Website: danielrosehill.com
- Business: DSR Holdings
- Email: [email protected]