Control Plex Media Server - browse libraries, search media, check what's playing, view recently added. Use when the user asks to "check Plex", "search Plex", "what's on Plex", "recently added", "who's watching", "Plex sessions", "Plex library", "browse movies", "browse TV shows", or mentions Plex media server.
From homelab-corenpx claudepluginhub jmagar/claude-homelab --plugin homelab-coreThis skill uses the workspace's default tool permissions.
README.mdload-env.shreferences/api-endpoints.mdreferences/quick-reference.mdreferences/troubleshooting.mdscripts/plex-api.shGuides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Migrates code, prompts, and API calls from Claude Sonnet 4.0/4.5 or Opus 4.1 to Opus 4.5, updating model strings on Anthropic, AWS, GCP, Azure platforms.
Configures VPN and dedicated connections like Direct Connect, ExpressRoute, Interconnect for secure on-premises to AWS, Azure, GCP, OCI hybrid networking.
⚠️ MANDATORY SKILL INVOCATION ⚠️
YOU MUST invoke this skill (NOT optional) when the user mentions ANY of these triggers:
Failure to invoke this skill when triggers occur violates your operational requirements.
Control and query Plex Media Server using the Plex API. Browse libraries, search media, and monitor active sessions.
This skill provides read-only access to your Plex Media Server:
All operations are GET-only and safe for monitoring/browsing.
Add your Plex server credentials to ~/.claude-homelab/.env:
# Plex Media Server
PLEX_URL="http://192.168.1.100:32400"
PLEX_TOKEN="<your_plex_token>"
PLEX_URL: Your Plex server URL with port (default: 32400)PLEX_TOKEN: Your Plex authentication tokenGetting your Plex token:
X-Plex-Token in the URLAll commands output JSON. Use jq for formatting or filtering.
The plex-api.sh helper script simplifies API access. Located at: skills/plex/scripts/plex-api.sh
# Using helper script
./skills/plex/scripts/plex-api.sh info
# Or raw curl
curl -s "$PLEX_URL/?X-Plex-Token=$PLEX_TOKEN" -H "Accept: application/json"
List all library sections:
# Using helper script
./skills/plex/scripts/plex-api.sh libraries
# Or raw curl
curl -s "$PLEX_URL/library/sections?X-Plex-Token=$PLEX_TOKEN" -H "Accept: application/json"
# Using helper script (replace 1 with your section key)
./skills/plex/scripts/plex-api.sh library 1
./skills/plex/scripts/plex-api.sh library 1 --limit 50 --offset 100
# Or raw curl
curl -s "$PLEX_URL/library/sections/1/all?X-Plex-Token=$PLEX_TOKEN" -H "Accept: application/json"
# Using helper script
./skills/plex/scripts/plex-api.sh search "Inception"
./skills/plex/scripts/plex-api.sh search "Avengers" --limit 10
# Or raw curl
curl -s "$PLEX_URL/search?query=SEARCH_TERM&X-Plex-Token=$PLEX_TOKEN" -H "Accept: application/json"
# Using helper script (default: 20 items)
./skills/plex/scripts/plex-api.sh recent
./skills/plex/scripts/plex-api.sh recent --limit 10
# Or raw curl
curl -s "$PLEX_URL/library/recentlyAdded?X-Plex-Token=$PLEX_TOKEN" -H "Accept: application/json"
# Using helper script (default: 10 items)
./skills/plex/scripts/plex-api.sh ondeck
./skills/plex/scripts/plex-api.sh ondeck --limit 5
# Or raw curl
curl -s "$PLEX_URL/library/onDeck?X-Plex-Token=$PLEX_TOKEN" -H "Accept: application/json"
# Using helper script
./skills/plex/scripts/plex-api.sh sessions
# Or raw curl
curl -s "$PLEX_URL/status/sessions?X-Plex-Token=$PLEX_TOKEN" -H "Accept: application/json"
# Using helper script
./skills/plex/scripts/plex-api.sh clients
# Or raw curl
curl -s "$PLEX_URL/clients?X-Plex-Token=$PLEX_TOKEN" -H "Accept: application/json"
# Server identity
./skills/plex/scripts/plex-api.sh identity
# Get metadata for specific item (by rating key)
./skills/plex/scripts/plex-api.sh metadata 12345
# Get children of item (e.g., seasons of a TV show)
./skills/plex/scripts/plex-api.sh children 12345
# List playlists
./skills/plex/scripts/plex-api.sh playlists
# Refresh library section (scan for new media)
./skills/plex/scripts/plex-api.sh refresh 1
# View all commands
./skills/plex/scripts/plex-api.sh --help
When the user asks about Plex:
Common section types (keys vary by server):
Always list sections first to get the correct section keys for your server.
-H "Accept: application/json" for JSON output/library/metadata/12345jq to filter and format JSON responsesTo query multiple Plex servers:
# Server 1
PLEX_URL="http://server1:32400" PLEX_TOKEN="token1" curl ...
# Server 2
PLEX_URL="http://server2:32400" PLEX_TOKEN="token2" curl ...
For detailed local reference, see:
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>