jmagar/claude-homelab

sonarr

This skill should be used when managing TV shows in Sonarr. Use when the user asks to "add a TV show", "search Sonarr", "find a series", "add to Sonarr", "remove a show", "check if show exists", "Sonarr library", "TVDB lookup", or mentions TV show management or Sonarr operations.

First seen Mar 7, 2026

Installation

$ npx skills add jmagar/claude-homelab --skill sonarr

Also in this package

Other skills from jmagar/claude-homelab · top by installs.

npx skills add jmagar/claude-homelab

Browse all from jmagar/claude-homelab

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Also listed on

Alternate registries and mirrors of this skill.

Repository health

Stars 78
License LICENSE
Default branch main
Open issues 5
Status Active

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 4,995 B
  • docs SUMMARY.md 294 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 46 installs

SKILL.md

Sonarr TV Show Management Skill

⚠️ MANDATORY SKILL INVOCATION ⚠️

YOU MUST invoke this skill (NOT optional) when the user mentions ANY of these triggers:

  • "add a TV show", "search Sonarr", "find a series", "add to Sonarr"
  • "remove a show", "delete show", "check if show exists"
  • "Sonarr library", "TV show management", "add show"
  • Any mention of Sonarr or managing TV shows

Failure to invoke this skill when triggers occur violates your operational requirements.

Search and add TV shows to your Sonarr library with support for monitor options, quality profiles, and search-on-add.

Purpose

This skill enables management of your Sonarr TV show library:

  • Search for TV shows by name
  • Add shows to your library with configurable options
  • Check if shows already exist
  • Remove shows (with optional file deletion)
  • View quality profiles and root folders

Operations include both read and write actions. Always confirm before removing shows with file deletion.

Setup

Add credentials to .env file: ~/.claude-homelab/.env

SONARR_URL="http://localhost:8989"
SONARR_API_KEY="<your_api_key>"
SONARR_DEFAULT_QUALITY_PROFILE="1"  # Optional: defaults to 1 if not set

Configuration variables:

  • SONARR_URL: Your Sonarr server URL (no trailing slash)
  • SONARRAPIKEY: API key from Sonarr (Settings → General → API Key)
  • SONARRDEFAULTQUALITY_PROFILE: Quality profile ID (optional, defaults to 1)

Commands

All commands return JSON output.

Search for Shows

bash scripts/sonarr.sh search "Breaking Bad"
bash scripts/sonarr.sh search "The Office"

Output: Numbered list with TVDB IDs, titles, years, and overview.

Check if Show Exists

bash scripts/sonarr.sh exists <tvdbId>

Output: Boolean indicating if show is in library.

Add a Show

bash scripts/sonarr.sh add <tvdbId>              # Searches immediately (default)
bash scripts/sonarr.sh add <tvdbId> --no-search  # Add without searching

Remove a Show

bash scripts/sonarr.sh remove <tvdbId>                # Keep files
bash scripts/sonarr.sh remove <tvdbId> --delete-files # Delete files too

Important: Always ask the user if they want to delete files when removing!

Get Configuration

bash scripts/sonarr.sh config

Output: Available root folders and quality profiles with their IDs.

Workflow

When the user asks about TV shows:

  1. "Add Breaking Bad to Sonarr" → Run search "Breaking Bad", present results with TVDB links, then add <tvdbId>
  2. "Is The Office in my library?" → Run exists <tvdbId>
  3. "Remove Game of Thrones" → Ask about file deletion, then run remove <tvdbId> with appropriate flag
  4. "What quality profiles do I have?" → Run config

Presenting Search Results

Always include TVDB links when presenting search results:

  • Format: Title (Year)
  • Show numbered list for user selection
  • Include year and brief overview

Adding Shows

  1. Search for the show
  2. Present results with TVDB links
  3. User picks a number
  4. Add show (searches for episodes by default)

Parameters

add command

  • <tvdbId>: TVDB ID of the show (required)
  • --no-search: Don't search for episodes after adding

remove command

  • <tvdbId>: TVDB ID of the show (required)
  • --delete-files: Also delete media files (default: keep files)

Notes

  • Requires network access to your Sonarr server
  • Uses Sonarr API v3
  • All data operations return JSON
  • Quality profile IDs vary by installation — use config to discover yours
  • The SONARRDEFAULTQUALITY_PROFILE from .env is used when adding shows (defaults to 1)

Reference

For detailed local reference, see:

  • [API Endpoints](./references/api-endpoints.md) - Complete endpoint reference with parameters
  • [Quick Reference](./references/quick-reference.md) - Common operations with copy-paste examples
  • [Troubleshooting](./references/troubleshooting.md) - Authentication, connection, and error solutions

🔧 Agent Tool Usage Requirements

CRITICAL: When invoking scripts from this skill via the zsh-tool, ALWAYS use pty: true.

Without PTY mode, command output will not be visible even though commands execute successfully.

Correct invocation pattern:

<invoke name="mcp__plugin_zsh-tool_zsh-tool__zsh">
<parameter name="command">./skills/SKILL_NAME/scripts/SCRIPT.sh [args]</parameter>
<parameter name="pty">true</parameter>
</invoke>