/ai-stuff:jellyfin-watched-deletefrom ai-stuff
Delete episodes or movies automatically after specific Jellyfin users have watched them. A systemd user timer runs a stdlib-only Python script that removes the file through Sonarr/Radarr (unmonitoring it so it is not grabbed again), deletes the qBittorrent torrent with its data, and deletes the Seerr row for movies. Rules ("delete <show> after <user> watches it") are one CLI command each, so no agent is needed per episode. Use when asked to auto-delete watched media, add or remove a show/movie from that list, or debug why a watched item was not deleted.
Ships in ai-stuff. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
scripts/watched_delete.py (Python 3 stdlib only) deletes allowlisted media
once the users named in its rule have it marked played in Jellyfin: all of
them by default (AND), or any one of them when the rule was added with
--any (OR). Use OR only when the user explicitly asks for "either"/"any of";
otherwise use AND. Each item is deleted delay_seconds (default 3600) after it
is first seen played, so a user can still rewind or rewatch the ending.
scripts/watched_delete.py and scripts/config.example.json into a
directory, e.g. ~/watched-delete/. Rename the example to config.json
and set settings to match the stack. Every key is optional; see
DEFAULTS in the script. Sonarr/Radarr API keys are read from their
config.xml and the Seerr key from its settings.json, so those files must
be readable by the user that runs the script.jellyfin.token next to
config.json, then run chmod 600 config.json jellyfin.token. The env var
JELLYFIN_TOKEN overrides the file. Never commit either file.127.0.0.1/32 to the IP subnet whitelist.scripts/watched-delete.{service,timer} into
~/.config/systemd/user/, fix the ExecStart path, then run
systemctl --user daemon-reload && systemctl --user enable --now watched-delete.timer.
Run loginctl enable-linger <user> so the timer runs without an open session.
Optionally install scripts/watched-delete-config.path too
(systemctl --user enable --now watched-delete-config.path). It starts a run
as soon as config.json changes. Nothing ever needs a restart, because every
run re-reads the config.watched_delete.py list
watched_delete.py add-series alice "Show Name" # exact Jellyfin series name, validated
watched_delete.py add-series alice,bob "Show Name" # AND: deleted only after BOTH watched
watched_delete.py add-series alice,bob "Show Name" --any # OR: either one watching is enough
watched_delete.py add-series alice "Show Name" --seasons 1,2 # only those seasons
watched_delete.py add-movie alice "Title" 2021 [--any]
watched_delete.py remove-series alice "Show Name" [--any] # --any picks the OR rule
watched_delete.py remove-movie alice "Title" 2021 [--any]
watched_delete.py # dry run: prints the plan, changes nothing
watched_delete.py --apply # what the timer runs
After adding a rule, run the dry run and show the user what it will delete. Rules remove themselves once their media is completely deleted:
ended, so an airing show keeps its
rule for future episodes.Adding a series also deletes episodes the users had already watched. To
protect specific items, put their Jellyfin item IDs in state.json "skip".
downloadId = torrent hash). This still
works when the library file is already gone or is a copy, not a hardlink.downloads_dir that belong to no torrent (for
example the rest of an already-removed season pack) are unlinked. A
downloads folder left holding only junk files is removed. A removed season
pack's folder is deleted whole, extras included, once none of its videos is
still in the library (state.json "pack_dirs").journalctl --user -u watched-delete.service. A skip: line names
the reason, and the item is retried on every run.add-series prints a note when Sonarr has no such
title.finished items in scope: 0 right after a deletion is normal. Jellyfin
drops the item once its library scan sees that the file is gone.state.json next to config.json: seen (first time the
item was seen played), done, skip, seerr_pending, pack_dirs.rule complete, removing: ... in the log means the entry was dropped from
config.json on purpose. Re-add it if more media for it arrives later.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub pauldotsh/ai-stuff --plugin ai-stuff25 skills in this plugin
/brainstormingYou MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation./codebase-designShared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary./dispatching-parallel-agentsUse ONLY when the developer has explicitly told you to dispatch subagents — never infer or self-authorize it. Splits 2+ independent tasks across isolated subagents, assigns them cheap models, and polls at a per-harness cadence that preserves prompt cache (Claude Code vs Codex/opencode).