agentleFS
xiaotianfotosxiaotianfotos/skills/dlna/SKILL.md

dlna

Skill582 starsChanged 9 months agoMITView on GitHub

Control DLNA MediaRenderer devices. Discover devices and play media URLs on DLNA-compatible TVs, speakers, and media players. Supports default device configuration.

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Default device is saved in .dlna/config.json inside the skill directory.

    line 43
  2. Distinctive:

    No zombie processes: When Claude Code session ends, the server is automatically terminated

    line 64

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

DLNA - Media Device Control

Control DLNA/UPnP MediaRenderer devices on your local network.

Quick Start

# Discover devices
uv run dlna discover

# Set default device (optional but convenient)
uv run dlna config --device "HT-Z9F"

# Play with default device (no need to specify device name)
uv run dlna play "http://example.com/video.mp4"

# Or play with specific device
uv run dlna play "http://example.com/video.mp4" "Living Room TV"

# Stop playback
uv run dlna stop

Commands

CommandDescription
discoverScan for DLNA devices
play <url> [device]Play media URL on device
stop [device]Stop playback
status [device]Get playback status
configShow configuration
config --device <name>Set default device
config --unset-deviceClear default device

Configuration

Default device is saved in .dlna/config.json inside the skill directory.

# Set default device
uv run dlna config --device "HT-Z9F"

# Show current config
uv run dlna config

# Clear default device
uv run dlna config --unset-device

Playing Local Files

DLNA devices can only play URLs, not local file paths. To play local files, you need to serve them via HTTP.

IMPORTANT: Use Background Task for HTTP Server

Always use a background task (Bash with run_in_background) to start the HTTP server. This ensures:

  1. No zombie processes: When Claude Code session ends, the server is automatically terminated
  2. Clean resource management: Server lifecycle is tied to the session
  3. No port conflicts: Server stops when done, freeing the port

Example: Play Local File

# Step 1: Start HTTP server in background
# This runs in background and auto-stops when session ends

# Step 2: Get your local IP
import socket
def get_ip():
    s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
    s.connect(("8.8.8.8", 80))
    ip = s.getsockname()[0]
    s.close()
    return ip

# Step 3: Construct URL and play
url = f"http://{get_ip()}:8000/video.mp4"
# uv run dlna play url

Python API

import asyncio
from dlna import discover_devices, find_device, play_url, set_default_device

async def main():
    # Set default device
    set_default_device("Living Room TV")

    # Find device (uses default if no name provided)
    device = await find_device()  # Uses default
    if device:
        # Play remote URL
        await play_url(device, "http://example.com/video.mp4")

asyncio.run(main())

Supported Devices

  • Smart TVs (Sony, Samsung, LG, etc.)
  • Soundbars and speakers with DLNA support
  • Any UPnP MediaRenderer device

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.