● Communauté
Innei
⚡ Instantané
media-library-organizer-skill
par Innei · Innei/media-library-organizer-skill
Preps media libraries for Jellyfin/Plex/Emby — cleans junk, merges scattered episodes, normalizes folder names, verifies completeness against TMDB.
A Claude Code skill (with standalone bash scripts) that systematically organizes movie / TV / anime libraries for media servers. Scans directories, removes junk (.DS_Store, SMB residuals, empties), merges duplicates by title+year+quality, consolidates scattered release-group folders, normalizes to Title (Year), and cross-references TMDB to flag missing episodes. Tiered safety: only genuinely-junk deletes run unattended — substantive changes wait for your approval.
Pourquoi l'utiliser
Fonctionnalités clés
- Junk cleanup: SMB residuals, .DS_Store, empty dirs
- Duplicate consolidation across folders by title/year/quality
- Scattered-episode merge across release groups
- Folder renames to
Title (Year) standard - TMDB cross-reference for episode completeness
- Tiered safety — destructive actions require confirmation
- Torrent seed warning before renames
Démo en direct
Aperçu en pratique
media-library-organizer-skill.replay
▶ prêt
Cas d'usage
Usages concrets : media-library-organizer-skill
Quand l'utiliser : Before pointing Jellyfin at a folder full of release-group-named chaos.
Déroulement
-
Scan and analyze
Use media-library-organizer on /media/downloads. Scan-only — list junk, duplicates, scattered episodes.✓ Copié
→ Report with 3 sections: junk / duplicates / scattered
-
Auto-clean junk (safe tier)
Proceed with junk cleanup (.DS_Store, SMB metadata, empty dirs).✓ Copié
→ Small deletions, nothing risky
-
Confirm and merge duplicates
Now consolidate duplicates — I'll approve each.✓ Copié
→ One-by-one approvals with title/year/quality shown
-
Normalize folder names
Rename to Title (Year) format — warn if anything is currently seeding.✓ Copié
→ Seed warning surfaces before renames
-
Verify via TMDB
Cross-check episode counts against TMDB — list missing.✓ Copié
→ Per-show missing-episode list
Résultat : Jellyfin/Plex recognizes everything; missing gaps are explicit.
Pièges
- Rename breaks an active torrent seed — Skill warns; stop the torrent or hard-link before renaming
- Merging different-quality versions loses the good one — Skill prioritizes higher quality — double-check before confirming
Quand l'utiliser : Your anime library has 3 release groups per show across different folders.
Déroulement
-
Scan
Scan /anime for scattered-episode patterns across release groups.✓ Copié
→ Per-show merge candidates
-
Pick canonical version per show
For each candidate, pick the highest-quality release group and merge others into it (or trash).✓ Copié
→ Clean per-show folders
Résultat : One folder per show with consistent naming.
Combinaisons
Associez-le à d'autres MCPs pour un effet X10
Edit NFO files or custom sidecars during the same session
While organizing, also add .nfo files for each movie with TMDB id.✓ Copié
Coût et limites
Coût d'exécution
- Quota d'API
- TMDB: free tier generous for home libraries
- Tokens par appel
- Low — skill mostly orchestrates shell
- Monétaire
- Free
- Astuce
- Scan-only first; don't burn tokens on the full analysis until you've committed to cleanup
Sécurité
Permissions, secrets, portée
Portées minimales : Filesystem read/write on the library root only
Stockage des identifiants : TMDB key in env
Sortie de données : TMDB API for completeness checks (public metadata only)
Ne jamais accorder : Run as root on the media disk — use a user with write on just the library
- Always back up (or at least snapshot) before merge_duplicates — even with approvals.
- Seed-warning depends on you having the torrent client state readable; if it doesn't detect, stop seeds manually.
Dépannage
Erreurs courantes et correctifs
Everything flagged as 'junk'
You pointed it at a non-media folder — confirm root
Vérifier : ls /media/downloads
TMDB verify returns 401
TMDB_API_KEY missing or wrong
Vérifier : curl https://api.themoviedb.org/3/movie/550?api_key=$TMDB_API_KEY
Jellyfin still doesn't detect after rename
Force library rescan; verify folder matches Jellyfin's expected naming
Alternatives
media-library-organizer-skill vs autres
| Alternative | Quand l'utiliser | Compromis |
| FileBot | You want a GUI with prebuilt rules | Paid, no Claude loop |
| tinyMediaManager | Metadata-focused rather than junk cleanup | No merge / scattered-episode handling |