Agent skill

Ytmusic Hub

by OpenMinis in OpenMinis/MinisSkills

Read and write YouTube Music data using Python + ytmusicapi, authenticated via browser cookies obtained automatically with browseruse getcookies — no manual copying required.

MITAuto-check passedProductivity & Automation

Install Ytmusic Hub

skills CLI
$ npx skills add OpenMinis/MinisSkills --skill ytmusic-hub -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install OpenMinis/MinisSkills ytmusic-hub --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/OpenMinis/MinisSkills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/ytmusic-hub .claude/skills/ytmusic-hub && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
ytmusic-hub
GitHub stars
446
Token cost
~1.7k tokens
SKILL.md length
286 words
Files
11 (incl. scripts)
Skills in repo
49
Repo updated
First seen
Licence
MIT

At a glance

Read and write YouTube Music data using Python + ytmusicapi, authenticated via browser cookies obtained automatically with browseruse getcookies — no manual copying required.

  • Works in 3 steps: Get cookies → Generate auth file → Initialize YTMusic client
  • This skill whenever the user mentions YouTube Music
  • SKILL.md covers Setup, Authentication (run before…, API Reference and Common Workflows, plus 1 more section
  • Runs Python scripts from its folder; calls pip and python3; reaches music.youtube.com

What it does

Ytmusic Hub is an agent skill from OpenMinis/MinisSkills. Read and write YouTube Music data using Python + ytmusicapi, authenticated via browser cookies obtained automatically with browseruse getcookies — no manual copying required. Supports fetching playlists, liked songs, playlist details, creating/editing/deleting playlists, searching and adding songs, recommendations, charts, and lyrics. Trigger this skill whenever the user mentions "YouTube Music", "YT Music", "ytmusic", "ytmusic-hub", "get YouTube playlists", "create YouTube Music playlist", "my liked songs", "YTM…

Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 12 other files, including scripts (for example `evals/evals.json`, `scripts/export_playlist.py` and `scripts/list_playlists.py`).

It sits in Productivity & Automation, covering Browser automation. It works with YouTube and Python. The repository describes itself as: Skills collection for Minis. The licence is MIT.

When your agent uses it

  • This skill whenever the user mentions YouTube Music
  • Get YouTube playlists
  • Create YouTube Music playlist
  • Any scenario requiring programmatic read/write access to YouTube Music data

Example prompts

  • “YouTube Music”
  • “YT Music”
  • “ytmusic”
  • “/ytmusic-hub”

Requirements

  • Python 3

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. Get cookies
  2. Generate auth file
  3. Initialize YTMusic client

What it can do on your machine

Read from SKILL.md and the folder at commit ae8c5db. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 9 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • pip
    • python3

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • music.youtube.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Ytmusic Hub loads about 1.7k tokens when it runs. Until then it costs about 156 tokens; SKILL.md has 286 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~156
When it runs · the whole SKILL.md, loaded when a task matches
~1.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from OpenMinis/MinisSkills at commit ae8c5db, republished under its MIT licence (© OpenMinis). 286 words, ~1,659 tokens.

Download SKILL.mdSave it as .claude/skills/ytmusic-hub/SKILL.md (or your agent's skills folder). This skill also uses 10 other files; get the full folder from GitHub.
name
ytmusic-hub
description
Read and write YouTube Music data using Python + ytmusicapi, authenticated via browser cookies obtained automatically with browser_use get_cookies — no manual copying required. Supports fetching playlists, liked songs, playlist details, creating/editing/deleting playlists, searching and adding songs, recommendations, charts, and lyrics. Trigger this skill whenever the user mentions "YouTube Music", "YT Music", "ytmusic", "ytmusic-hub", "get YouTube playlists", "create YouTube Music playlist", "my liked songs", "YTM playlist", or any scenario requiring programmatic read/write access to YouTube Music data.

ytmusic-hub

Interact with YouTube Music using the ytmusicapi library, authenticated via browser cookies. Supports full playlist management, search, liked songs, and more.


Setup

Install dependency
bash
pip install ytmusicapi
Auth file path
/var/minis/workspace/ytmusic_headers.json

Authentication (run before first use or when cookies expire)

Two steps: get cookies → generate auth file.

Step 1: Get cookies

Navigate to YouTube Music and get cookies via browser_use:

browser_use navigate: https://music.youtube.com
browser_use get_cookies -> save env file path

Confirm the page is logged in (avatar visible in top-right), then call get_cookies and note the env file path.

Step 2: Generate auth file

Load the env file and run the auth setup script:

bash
. /var/minis/offloads/env_cookies_youtube_com_xxx.sh
python3 /var/minis/skills/ytmusic-hub/scripts/setup_auth.py

The script reads all Cookie env vars and writes a browser-auth file with SAPISIDHASH to /var/minis/workspace/ytmusic_headers.json.

Step 3: Initialize YTMusic client

Use the unified client module — it automatically handles DNS pollution and SSL issues:

python
import sys
sys.path.insert(0, "/var/minis/skills/ytmusic-hub/scripts")
from ytmusic_client import get_client

yt = get_client()

get_client() will automatically:

  1. Patch urllib3 to disable SSL certificate verification (required in iSH)
  2. Detect if local DNS is polluted
  3. If polluted, resolve the real IP via Google DoH and patch socket.getaddrinfo
  4. Return a ready-to-use YTMusic instance, or raise RuntimeError with a clear message

API Reference

📋 Playlist Management
python
# Get all my playlists
playlists = yt.get_library_playlists(limit=25)
# Returns: [{playlistId, title, count, ...}, ...]

# Get playlist contents (all tracks)
playlist = yt.get_playlist(playlistId, limit=100)
# Returns: {title, description, trackCount, tracks: [{videoId, title, artists, ...}]}

# Create a new playlist
playlistId = yt.create_playlist(
    title="Playlist name",
    description="Description",
    privacy_status="PRIVATE"  # PUBLIC / PRIVATE / UNLISTED
)

# Edit playlist metadata
yt.edit_playlist(playlistId, title="New name", description="New description")

# Delete a playlist
yt.delete_playlist(playlistId)

# Add songs to a playlist
yt.add_playlist_items(playlistId, videoIds=["videoId1", "videoId2"])

# Remove songs from a playlist
# setVideoId is the track's unique ID within the playlist (different from videoId)
tracks = yt.get_playlist(playlistId)["tracks"]
yt.remove_playlist_items(playlistId, tracks=[
    {"videoId": t["videoId"], "setVideoId": t["setVideoId"]}
    for t in tracks if t["title"] == "Target song"
])
❤️ Liked Songs & Library
python
# Get liked songs
liked = yt.get_liked_songs(limit=100)
tracks = liked["tracks"]  # [{videoId, title, artists, album, ...}]

# Get library songs / albums / artists
songs   = yt.get_library_songs(limit=25)
albums  = yt.get_library_albums(limit=25)
artists = yt.get_library_artists(limit=25)

# Like / unlike a song
yt.rate_song(videoId, "LIKE")   # LIKE / DISLIKE / INDIFFERENT
python
# General search (mixed results)
results = yt.search("Jay Chou")

# Filter by type
songs   = yt.search("Jay Chou", filter="songs")
videos  = yt.search("Jay Chou", filter="videos")
albums  = yt.search("Jay Chou", filter="albums")
artists = yt.search("Jay Chou", filter="artists")

# Get videoId for adding to playlist
videoId = songs[0]["videoId"]
🎵 Browse & Recommendations
python
# Home feed
home = yt.get_home()

# Charts (global or by country)
charts = yt.get_charts(country="US")  # TW / HK / CN / JP / KR etc.

# Mood playlists
moods = yt.get_mood_categories()
mood_playlists = yt.get_mood_playlists(params=moods["Moods & moments"][0]["params"])

# Lyrics
watch = yt.get_watch_playlist(videoId="videoId")
lyrics_id = watch.get("lyrics")
if lyrics_id:
    lyrics = yt.get_lyrics(lyrics_id)
    print(lyrics["lyrics"])
🎤 Artists & Albums
python
artist = yt.get_artist(channelId)
album  = yt.get_album(browseId)
user   = yt.get_user(channelId)
user_playlists = yt.get_user_playlists(channelId, params)

Common Workflows

Workflow A: Search and add a song to a playlist
python
results = yt.search("Gao Wu Ren - Love Missed", filter="songs")
videoId = results[0]["videoId"]

playlists = yt.get_library_playlists()
for i, pl in enumerate(playlists):
    print(f"{i+1}. {pl['title']} [{pl['playlistId']}]")

yt.add_playlist_items(playlistId, videoIds=[videoId])
print("✅ Added to playlist")
Workflow B: Create a playlist from liked songs
python
new_id = yt.create_playlist("My Favorites", "Picked from liked songs", "PRIVATE")
liked  = yt.get_liked_songs(limit=50)
ids    = [t["videoId"] for t in liked["tracks"][:20]]
yt.add_playlist_items(new_id, videoIds=ids)
print(f"✅ Created playlist with {len(ids)} songs")
Workflow C: Export a playlist as Markdown
python
playlist = yt.get_playlist(playlistId, limit=200)
lines = [f"# {playlist['title']}", f"> {playlist.get('description', '')}", ""]
for i, t in enumerate(playlist["tracks"], 1):
    artists = ", ".join(a["name"] for a in t.get("artists", []))
    lines.append(f"{i}. **{t['title']}** — {artists}")
print("\n".join(lines))

Notes

  • Cookie expiry: Cookies typically last days to weeks. Re-run the auth flow when they expire.
  • Auth file security: ytmusic_headers.json contains login credentials — do not share it.
  • Rate limits: ytmusicapi is unofficial. Avoid bulk operations that may trigger Google's rate limiting.
  • Network: Requires access to music.youtube.com. The client module handles DNS pollution and SSL issues automatically.
  • videoId vs setVideoId: When removing tracks from a playlist, you must use setVideoId (the track's position-specific ID), not videoId.

© OpenMinis, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 10 other files (scripts) in ytmusic-hub of OpenMinis/MinisSkills.

  • SKILL.md
  • evals/evals.json
  • scripts/export_playlist.py
  • scripts/list_playlists.py
  • scripts/recommend_from_likes.py
  • scripts/recommend_from_seed_jay.py
  • scripts/recommend_from_seed_jay_v2.py
  • scripts/search_and_add.py
  • scripts/setup_auth.py
  • scripts/test_auth.py
  • scripts/ytmusic_client.py

Open the folder on GitHubat commit ae8c5db

Compare with similar skills

Ytmusic Hub next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Ytmusic Hub compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Ytmusic Hub this skillOpenMinis/MinisSkills446—~1.7kAutomated safety check: PassMIT
Browser Automation Edge Casesaden-hive/hive11k—~1.8kAutomated safety check: PassMIT
Skyvern Browser AutomationSkyvern-AI/skyvern23k—~1.9kAutomated safety check: PassAGPL-3.0
AI Search Hubminsight-ai-info/AI-Search-Hub1.3k—~1.3kAutomated safety check: PassNone
Browser Use Terminalbrowser-use/terminal650—~2.1kAutomated safety check: PassMIT
Browser Tools981377660LMT/algorithm-study2771 repos~1.3kAutomated safety check: PassNone

Similar skills

  • Step-by-step procedure for debugging browser automation failures on complex sites such as LinkedIn, Twitter/X, single-page apps and Shadow DOM pages.

    11k GitHub stars~1.8k tokensUpdated 2 days ago
    Productivity & AutomationAuto-check passed
  • Skyvern Browser Automation

    Skyvern-AI/skyvern

    Automates websites with Skyvern's AI browser agent to fill forms, extract data, download files, log in and run multi-step workflows through SDKs, REST, MCP or a CLI.

    23k GitHub stars~1.9k tokensUpdated yesterday
    Productivity & AutomationAuto-check passed
  • AI Search Hub

    minsight-ai-info/AI-Search-Hub

    Run the AI Search Hub browser automation scripts for Yuanbao, LongCat, Doubao, Qwen, Gemini, Grok, and MiniMax.

    1.3k GitHub stars~1.3k tokensUpdated 5 mo ago
    Productivity & AutomationAuto-check passed
  • Browser Use Terminal

    browser-use/terminal

    Direct browser control via the Browser Use Terminal CLI. An agent skill from browser-use/terminal.

    650 GitHub stars~2.1k tokensUpdated 1 mo ago
    Productivity & AutomationAuto-check passed
  • Browser Tools

    981377660LMT/algorithm-study

    Interactive browser automation via Chrome DevTools Protocol.

    277 GitHub starsUsed in 1 repo~1.3k tokens
    Productivity & AutomationAuto-check passed
  • Evoui Browser

    Salmonbird/evoui-browser

    Use Evoui Browser as the default entry point for common, self-terminating web tasks that need a real browser through agent-browser, including navigation, page reading, clicks, forms, login flows…

    100 GitHub stars~4.5k tokensUpdated 1 mo ago
    Productivity & AutomationAuto-check passed

More from OpenMinis/MinisSkills

All 49 skills in this repo
  • Android UI Automation

    OpenMinis/MinisSkills

    Automate Android apps that have no public API or web version by driving the UI layer through the Accessibility Service.

    446 GitHub stars~1.6k tokensUpdated 3 days ago
    Auto-check passed
  • Codex On Ish

    OpenMinis/MinisSkills

    Install and run OpenAI Codex CLI inside the Minis/iSH Alpine sandbox on iOS, where rustls TLS and async sockets are broken.

    446 GitHub stars~1k tokensUpdated 3 days ago
    Auto-check passed
  • Evidence Chain Builder

    OpenMinis/MinisSkills

    Score a claim against the evidence behind it. An agent skill from OpenMinis/MinisSkills.

    446 GitHub stars~2.4k tokensUpdated 3 days ago
    Auto-check passed
  • Hyperframes CLI

    OpenMinis/MinisSkills

    HyperFrames CLI and Minis rendering. An agent skill from OpenMinis/MinisSkills.

    446 GitHub stars~3.5k tokensUpdated 3 days ago
    Auto-check passed
  • Whenpeak

    OpenMinis/MinisSkills

    Predict when a person's brain works best from their sleep, using the WhenPeak performance-intelligence API, and turn it into concrete scheduling advice.

    446 GitHub stars~2.3k tokensUpdated 3 days ago
    Auto-check passed
  • Openstreetmap Marker

    OpenMinis/MinisSkills

    Generate a mobile-first, immersive, Amap(Gaode)-style custom landmark marker HTML map for travel itinerary planning, place showcasing, location sharing, etc.

    446 GitHub stars~1.9k tokensUpdated 3 days ago
    Auto-check passed

Works with

Questions about Ytmusic Hub

What does Ytmusic Hub do?

Read and write YouTube Music data using Python + ytmusicapi, authenticated via browser cookies obtained automatically with browseruse getcookies — no manual copying required. Ytmusic Hub is an agent skill from OpenMinis/MinisSkills. Read and write YouTube Music data using Python + ytmusicapi, authenticated via browser cookies obtained automatically with browseruse getcookies — no manual copying required.

When should I use Ytmusic Hub?

Ytmusic Hub fits situations like: this skill whenever the user mentions YouTube Music; get YouTube playlists; create YouTube Music playlist; any scenario requiring programmatic read/write access to YouTube Music data.

How do I install Ytmusic Hub in Claude Code?

Run `npx skills add OpenMinis/MinisSkills --skill ytmusic-hub -a claude-code`. Or copy the skill folder (ytmusic-hub in OpenMinis/MinisSkills) into .claude/skills/ytmusic-hub in your project. Claude Code loads it when a task matches its description.

How do I install Ytmusic Hub in Codex?

Run `npx skills add OpenMinis/MinisSkills --skill ytmusic-hub -a codex`. Or copy the skill folder (ytmusic-hub in OpenMinis/MinisSkills) into .agents/skills/ytmusic-hub in your project. Codex loads it when a task matches its description.

Can I use Ytmusic Hub in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add OpenMinis/MinisSkills --skill ytmusic-hub -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/ytmusic-hub, .gemini/skills/ytmusic-hub, .github/skills/ytmusic-hub and .opencode/skills/ytmusic-hub in your project.

What does Ytmusic Hub need to run?

Going by SKILL.md and its folder, Ytmusic Hub needs Python for the scripts in its folder and the command-line tools its instructions call (pip and python3). Our summary lists: Python 3.

Does Ytmusic Hub access the network?

SKILL.md names 1 domain. In commands or code: music.youtube.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Ytmusic Hub safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Ytmusic Hub use?

Ytmusic Hub is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Ytmusic Hub use?

About 1.7k tokens (SKILL.md is roughly 6.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Ytmusic Hub?

Skills that share tags, products or a category with Ytmusic Hub: Browser Automation Edge Cases (aden-hive/hive, 11k stars), Skyvern Browser Automation (Skyvern-AI/skyvern, 23k stars), AI Search Hub (minsight-ai-info/AI-Search-Hub, 1.3k stars) and Browser Use Terminal (browser-use/terminal, 650 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Ytmusic Hub?

OpenMinis (a GitHub organization) maintains it in OpenMinis/MinisSkills, which has 446 GitHub stars. The repository holds 49 skills in this directory. The repository was last updated on October 7, 2026.

Source: OpenMinis/MinisSkills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.