home / skills / eyadsibai / ltk / file-organization

This skill helps you organize files, clean folders, and detect duplicates to establish a clear, efficient directory structure.

npx playbooks add skill eyadsibai/ltk --skill file-organization

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
3.0 KB
---
name: file-organization
description: Use when "organizing files", "cleaning up folders", "finding duplicates", "structuring directories", or asking about "Downloads cleanup", "folder structure", "file management"
version: 1.0.0
---

<!-- Adapted from: awesome-claude-skills/file-organizer -->

# File Organization Guide

Organize files, find duplicates, and maintain clean folder structures.

## When to Use

- Downloads folder is chaotic
- Can't find files (scattered everywhere)
- Duplicate files taking up space
- Folder structure doesn't make sense
- Starting a new project structure
- Cleaning up before archiving

## Analysis Commands

```bash
# Overview of directory
ls -la [directory]

# Count file types
find [directory] -type f | sed 's/.*\.//' | sort | uniq -c | sort -rn

# Largest files
du -sh [directory]/* | sort -rh | head -20

# Files modified this week
find [directory] -type f -mtime -7
```

## Finding Duplicates

```bash
# By hash (exact duplicates)
find [directory] -type f -exec md5sum {} \; | sort | uniq -d

# By name
find [directory] -type f -printf '%f\n' | sort | uniq -d

# By size
find [directory] -type f -printf '%s %p\n' | sort -n | uniq -D -w 10
```

## Organization Patterns

### By Type

```
Downloads/
├── Documents/     # PDF, DOCX, TXT
├── Images/        # JPG, PNG, SVG
├── Videos/        # MP4, MOV
├── Archives/      # ZIP, TAR, DMG
├── Code/          # Projects
└── ToSort/        # Needs decision
```

### By Purpose

```
Documents/
├── Work/
│   ├── Projects/
│   ├── Reports/
│   └── Archive/
└── Personal/
    ├── Finance/
    ├── Medical/
    └── Archive/
```

### By Date

```
Photos/
├── 2024/
│   ├── 01-January/
│   ├── 02-February/
│   └── ...
├── 2023/
└── Unsorted/
```

## Organization Workflow

1. **Analyze** - Review current structure
2. **Plan** - Propose new structure
3. **Confirm** - Get user approval
4. **Execute** - Move files systematically
5. **Summarize** - Report changes

## Execution Commands

```bash
# Create structure
mkdir -p "path/to/new/folders"

# Move files
mv "old/path/file.pdf" "new/path/file.pdf"

# Batch move by extension
find . -name "*.pdf" -exec mv {} Documents/ \;
```

## Best Practices

### Folder Naming

- Clear, descriptive names
- Avoid spaces (use hyphens)
- Use prefixes for ordering: `01-current`, `02-archive`

### File Naming

- Include dates: `2024-10-17-meeting-notes.md`
- Be descriptive
- Remove download artifacts: `file (1).pdf` → `file.pdf`

### When to Archive

- Not touched in 6+ months
- Completed work for reference
- Old versions after migration
- Files you're hesitant to delete

## Maintenance Schedule

| Frequency | Task |
|-----------|------|
| Weekly | Sort new downloads |
| Monthly | Review/archive projects |
| Quarterly | Check for duplicates |
| Yearly | Archive old files |

## Important Rules

- Always confirm before deleting
- Log all moves for undo
- Preserve modification dates
- Stop and ask on unexpected situations

Overview

This skill helps organize files, clean up folders, and recover space by finding duplicates and proposing clear directory structures. It guides you through analysis, planning, safe execution, and reporting so you can tidy downloads, projects, or archives with minimal risk. The goal is predictable, reversible changes and a maintainable folder layout.

How this skill works

It inspects directories to summarize contents, count file types, list largest and recently modified files, and detect duplicates by hash, name, or size. It proposes organization patterns (by type, purpose, or date), creates destination folders, and provides safe move or archive commands. It emphasizes confirmation, logging, and preserving timestamps so operations are auditable and recoverable.

When to use it

  • Your Downloads or Desktop is chaotic and you can’t find things
  • You need to free disk space by removing exact duplicates
  • You’re starting a new project and need a reusable folder structure
  • You want to standardize file naming and folder naming across a team
  • You’re preparing files for long-term archive or backup

Best practices

  • Analyze first: list types, sizes, and recently modified files before moving anything
  • Plan a clear folder taxonomy (type, purpose, or date) and get buy-in if shared
  • Always confirm destructive actions; prefer moving to an Archive/ToSort folder over immediate deletion
  • Log all moves and preserve file modification dates to enable undo and audits
  • Use consistent, descriptive file names and simple folder names (hyphens or underscores, numeric prefixes)

Example use cases

  • Clean up a messy Downloads folder by moving PDFs to Documents, images to Images, and code to Code/
  • Find and remove exact duplicate files by hashing to free space
  • Reorganize photos into year/month folders for easier browsing and backup
  • Create a standard project skeleton (Projects/ProjectName/{docs,src,archive}) before starting work
  • Archive files not modified for 6+ months into a dated Archive folder for long-term storage

FAQ

How do you identify exact duplicates safely?

Use file hashes (md5/sha256) to find exact-content duplicates, review matches, then move duplicates to an Archive or Trash folder rather than deleting immediately.

What if I’m unsure where to move many files?

Create a ToSort folder and move ambiguous items there for later review; apply batch rules (by extension or date) only after sampling results.