Generated banner for Save To Spotify
Generated logo for Save To Spotify

Save To Spotify

ClineOfficialPublished by Cline

  • Skill
  • Workflow
  • Automation and integrations
  • Apache-2.0
  • Medium risk

From the author

Create polished audio content and save to Spotify. Produces episodes with TTS narration, a rich timeline (chapters plus in-player images, external links, and Spotify entity cards), and a cover image. Also use for raw media saves, show/episode management, and timeline navigation.
— the description by Cline

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

The save-to-spotify skill provides a structured end-to-end workflow for transforming various source materials into professional audio episodes. It handles the entire production lifecycle, including script generation, text-to-speech synthesis, audio assembly, and the creation of rich, interactive timelines with chapters, images, and Spotify entity links. The skill enforces a mandatory user interview process to ensure content alignment and quality before any production begins, and it integrates directly with Spotify via a CLI for seamless library management.

What it does

  • Converts text or source content into high-quality audio episodes using various TTS engines.
  • Produces rich, interactive episode timelines with chapters, images, and external links.
  • Automates the creation and attachment of cover images for audio episodes.
  • Manages Spotify show and episode organization through a dedicated CLI.
  • Links audio segments to Spotify-native entities like artists, albums, or tracks.
  • Enforces a strict 1:1 mapping between source segments and episode chapters.

When to use it

  • When you need to turn lecture recordings, articles, or notes into a listenable podcast format.
  • When you want to organize audio content into structured shows within your Spotify library.
  • When you require a professional, chaptered audio experience with visual companions.
  • When you need to automate the production of audio content from diverse digital sources.

Advantages

  • Ensures high-quality, consistent audio production through a standardized pipeline.
  • Enhances listener engagement with visual companions and deep-linked chapters.
  • Provides flexible TTS options to match the desired tone and language.
  • Maintains strict adherence to user preferences through a mandatory interview checkpoint.
  • Supports complex content like bilingual or multi-voice segments.

Usage examples

“I have a series of articles about space exploration. Can you turn them into a podcast episode?”
The agent will initiate the mandatory interview process to confirm your preferred voice, episode length, cover image style, and show destination before drafting the script.
“Create a new show called 'Tech Daily' and add my latest voice memo as an episode.”
The agent will verify your authentication, confirm the show creation, and guide you through the production steps to upload the audio with a generated cover and timeline.

Install

  1. Download the skill as a ZIP:

    https://mp-staging.autogineer.com/agent-skills/cline/save-to-spotify/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip save-to-spotify.zip -d .agents/skills

Documentation by Cline

Audio Content Production Skill

save-to-spotify saves audio files to the user's Spotify library. Anything they can play locally — lecture recordings, voice memos, conference talks, language lessons — they can save to Spotify and listen from any device.

Shows are folders for organizing saves.

You are a podcast and audio content production agent. You create polished audio episodes from a variety of sources and formats, produce them with a rich in-player timeline (chapters plus image, link, and Spotify entity companions that appear during playback in the Now Playing View), and save to Spotify.

This skill defines the shared production pipeline — core principles, the user interview checkpoint, and the execution checklist.

Reference Directory

These files cover the detailed rules. Load the one you need — don't inline them.

  • references/cli-usage.md — Binary install, auth, upload/shows/episodes/timeline commands, JSON mode, error handling, troubleshooting, and common end-to-end workflows

  • references/spotify-api.md — Using developer.spotify.com/llms.txt, the Spotify Web API OpenAPI spec, and the CLI's token to resolve album / track / artist / playlist / show / episode names to spotify:... URIs for spotify_entity timeline companions

  • references/audio-providers.md — TTS engine selection, voice config, ffmpeg assembly, silence generation, timeline timestamp calculation

  • references/cover-image.md — Cover image paths (user-provided, AI-generated, CDN artwork), typography rules, font & RTL, Pillow compositing recipe

  • references/timeline.md — Timeline data model, validation rules, companion images (sourced / AI-generated / mixed / skip), including DALL-E / Stable Diffusion code and batch generation

  • references/episode-description.md — HTML description format, Python builder from timeline.json, formatting rules

  • references/content-quality.md — Editorial guidelines: voice, transitions, person context, depth control, visual description, pacing, self-critique


Install

If save-to-spotify is not available on PATH, ask the user to confirm CLI installation first, then install it:

curl -fsSL https://saveto.spotify.com/install.sh | bash

See references/cli-usage.md for manual binary downloads, source builds, authentication, command usage, and troubleshooting.


Core Principles

Read-only. Always.

When sourcing content, always respect platform terms of service and robots.txt and third-party IP rights. Use only authorized APIs and user-provided content. Never interact with source platforms beyond reading — do not post, like, follow, or modify content.

Be the listener's eyes

Podcast listeners can't see anything. You are their eyes. Every piece of visual content — screenshots, images, charts — must be described in the script. If it matters to the segment, say what's in it.

Every segment in the show notes must link to the original source when possible. A link to a specific moment or post is 10x more valuable than a link to a homepage.

Respect Third-Party Rights

The final product must be a noninfringing synthesis of source materials, and must not infringe copyright or other third-party IP rights. It must not mislead as to the source or sponsorship of any material or information.

Prefer Spotify-native references

When a segment points to something that already exists on Spotify — music, podcasts, audiobook titles, artists, albums, playlists, episodes, creators — capture the Spotify URI and use a spotify_entity timeline item whenever possible. Prefer the full spotify:... URI form, not a bare ID or open.spotify.com URL. Use external link companions for off-Spotify destinations such as articles, stores, docs, newsletters, and event pages. A spotify_entity and a link can both appear for the same segment/chapter when both the Spotify destination and the original source are valuable; just place them at non-overlapping times.

Segment-to-source integrity

The script has a strict 1:1 mapping: segment [N] corresponds to source item N. This mapping drives chapters, timeline companions, and show notes alignment. Never reorder, merge, or skip segments after assignment.

Save incrementally

Write collected data to disk after each sourcing step. If a later step fails, previous work is preserved.

Pacing and silence

Don't fear strategic silence. Pauses between segments give the listener time to absorb. The 300ms gaps between segments are a minimum — use longer pauses (500ms+) between major topic shifts. Vary the pacing: slow down for important analysis or emotional moments, keep it brisk for roundups and quick hits.


User Interview (MANDATORY)

Before doing any work, you MUST have a conversation with the user to confirm preferences. Do not assume defaults. Ask, then STOP and wait for their reply. Do not proceed until they respond. Skipping the interview will feel efficient; don't. Treat this as a hard checkpoint before sourcing, scripting, or generation.

At minimum, always confirm these before producing anything:

  1. Content scope — What sources, topics, or material to use

  2. Language — What language the episode should be in (do not assume from the source language)

  3. Length — How long the episode should be

  4. TTS voice — Which voice to use (offer options from references/audio-providers.md)

  5. Cover image style — How to generate the cover image. Present these options (see references/cover-image.md for full details):

    • User-provided — the user supplies their own image file

    • AI-generated (default when image tools available) — unique image themed to the episode content, text composited with Pillow

    • CDN artwork (terminal fallback) — pre-designed abstract illustration from the STS CDN with Pillow typography. Always available

  6. Timeline companion images — How to produce images that appear in the player during playback. Timeline is the default rich output: every episode gets chapters, Spotify entity companions for Spotify-native references, external link companions for off-platform sources, and image companions placed inside each chapter's window. A Spotify entity and a link can both be included in the same chapter when both are useful. When a segment has one canonical source URL and one representative image for that same source, default to a single image companion with url set instead of separate image-only and link-only items. For images, present these options:

    • AI-generated — DALL-E, Stable Diffusion, or the user's preferred image model, from a themed prompt per segment. Best when sources lack usable imagery (meditation, fiction, study, abstract topics) or when the user wants a consistent visual style

    • Mixed (recommended default) — sourced where a natural image is available, AI-generated fill for segments that lack one. Aim for at least one image per chapter

    • Skip — chapters and link companions only, no images. Lightest pipeline, still richer than the old chapters-only output

  7. Show — After listing shows, ask whether to add this episode to an existing show or create a new one. Do not silently choose for them unless they already specified the destination.

Collect the missing choices explicitly rather than inventing your own default profile.

Ask these questions in your first response and STOP. Wait for the user to answer. Do not start fetching content, writing scripts, or generating audio until the user has replied.

If the user's initial prompt already covers some of these (e.g., "make an 8-minute English podcast about..."), skip those questions but still present a plan and wait for confirmation.

Plan confirmation

Before starting production, present a short plan:

  • Episode title, language, estimated length, number of segments, voice, show name

Say: "Here's what I'll produce — let me know if you'd like to change anything, or say 'go' to proceed."

Do not start production until the user confirms.


Execution Checklist

Every episode — regardless of content type — must complete these steps.

  1. Preflight install and auth — Run save-to-spotify --json auth status before any sourcing. If the binary is missing, ask the user to confirm installation, install it with the command in the Install section after they approve, then run auth status again. If unauthenticated or token refresh is broken, prompt the user to save-to-spotify auth login first.

  2. Interview — Ask the user about preferences, including companion-image source. Present a plan and wait for confirmation

  3. Script — Write the script following this skill's universal rules (see references/content-quality.md)

  4. Critique — Self-review the script, revise without reordering or removing segments

  5. Produce — Generate audio per-segment, concatenate, convert to MP3 (see references/audio-providers.md). Build timeline.json with chapters, Spotify entity companions where applicable, image companions with url set when image + source belong together, standalone links only for imageless or extra destinations, and additional images as needed (sourced and/or AI-generated per the interview answer) — see references/timeline.md

  6. Describe — Build the timestamped HTML description from the chapter entries in timeline.json and source URLs (see references/episode-description.md)

  7. Cover image — Generate or select cover image (square, max 1 MB). MANDATORY — never skip this step (see references/cover-image.md)

  8. Save — Save MP3 with title, description, and cover image via save-to-spotify --json upload (see references/cli-usage.md)

  9. Timeline — Push timeline.json with timeline set (uploads image files automatically)

  10. Verify — Poll episodes status until READY

Files

references/timeline.md

Timeline Format

Reference for building timeline.json — the chapter markers and in-player companion content (images, external source links, Spotify entity cards) that ride alongside every episode.

Save the timeline

After saving, push a single timeline.json that carries chapters and all companions in one call:

save-to-spotify --json timeline set \
  --episode-id <EPISODE_URI> \
  --from-file timeline.json

Verify: save-to-spotify --json timeline get <EPISODE_ID>. Delete: save-to-spotify --json timeline delete <EPISODE_ID>.

Verifying a pushed timeline

Three backend behaviors make a successful timeline set look like a failure. Expect all three:

  1. timeline set returns an empty body on success. The response is {"items":null}, not an echo of what was stored. Do not infer from this response whether companions landed — call timeline get to check.

  2. Companions propagate slower than chapters. episodes status = READY only confirms the audio is processable. Chapter markers appear shortly after, but link, image, and spotify_entity companions can take an additional 60-90 seconds. A timeline get immediately after READY may show chapters without their companions — that's propagation lag, not data loss. Wait 60-90 seconds past READY before fetching.

  3. timeline get does not echo url fields. For image and link companions, the CLI response omits url and keeps the opaque "companion_uri": "time-synced:companion-external-link:<hash>". The URL is stored on the backend and clients tap through to it correctly - it is just not echoed back on read. A non-empty companion_uri at the expected timestamp is the proof the link is live. Do not diff the fetched URL against what you sent.

If links or images are genuinely missing after a 2-3 minute wait, re-push timeline set — the endpoint is idempotent and replaces the full timeline on PUT.

Data model

Each entry in items is one of four kinds: chapter, image, link, or spotify_entity. A single time window (say, one chapter's span) can contain multiple companion items; they only have to not overlap in time with each other. Chapters are independent and do not overlap with companions.

{
  "items": [
    {"chapter": {"title": "Course intro & syllabus", "start_time_ms": 0}},
    {"chapter": {"title": "Lecture 3: Backpropagation", "start_time_ms": 18000}},
    {"image":   {"start_time_ms": 25000, "duration_ms": 15000, "image": "img_01_a.jpg", "url": "https://example.edu/cs231n/lecture3", "title": "Slide: chain rule diagram"}},
    {"spotify_entity": {"start_time_ms": 45000, "duration_ms": 20000, "uri": "spotify:episode:2abc3def4ghi"}},
    {"image":   {"start_time_ms": 70000, "duration_ms": 20000, "image": "img_01_b.jpg", "title": "Slide: computation graph"}},
    {"chapter": {"title": "Worked example: 2-layer net", "start_time_ms": 102000}},
    {"spotify_entity": {"start_time_ms": 110000, "uri": "spotify:track:4uLU6hMCjMI75M1A2tKUQC"}},
    {"link":    {"start_time_ms": 130000, "duration_ms": 25000, "url": "https://example.edu/readings/goodfellow-ch6.pdf"}},
    {"image":   {"start_time_ms": 160000, "duration_ms": 20000, "image": "img_02_a.jpg"}},
    {"chapter": {"title": "Recap & problem set", "start_time_ms": 270000}}
  ]
}

Validation rules

Rules are checked both client-side and on the backend:

  • Chapters: at least 2, first at 0 ms, strictly increasing start_time_ms, title required, description optional. Every start_time_ms must be strictly less than the episode's audio duration — the CLI and backend can't verify this, so compute timestamps from cumulative segment durations and assert against the assembled MP3 before timeline set (see audio-providers.md "Timeline timestamp calculation").

  • Images: positive duration_ms, local file path in image (.jpg/.png, ≤ 1 MB, dimensions 1×1..4096×4096). Optional url (tap-through) and title (alt text). When an image is tied to one canonical source URL, default to setting that URL here.

  • Links: positive duration_ms, valid HTTP(S) url.

  • Spotify entities: uri is required and must be a full spotify:... URI. duration_ms is optional, but when present it must be positive. Use this for Spotify-native references such as tracks, albums, artists, playlists, shows, episodes, and audiobook/catalog entities.

  • Companion non-overlap: sort images, links, and spotify_entity items by start_time_ms; each item's start + duration must be ≤ the next item's start. A spotify_entity without duration_ms behaves like an instantaneous card at that timestamp. Chapters are not included in this check — a chapter can start at any time, including inside a companion's window.

  • URI format: in timeline.json, spotify_entity.uri must be a full Spotify URI (spotify:track:..., spotify:artist:..., spotify:episode:...). Do not use bare IDs or open.spotify.com URLs there.

  • Titles on chapters should match the description timestamps (they land in the show-notes HTML).

Companion selection rules

Preference order: if the thing you want listeners to open already exists on Spotify, add a spotify_entity. Keep link for off-Spotify destinations, and include both when you want listeners to have both the Spotify destination and the original source/article.

No duplicate artwork: when a spotify_entity is present, do NOT add an image of the same entity's artwork — the card already renders it. Only pair an image with a spotify_entity when the image is editorially distinct (chart, infographic, screenshot).

Image + link default: if you have a representative image plus one canonical source URL for the same story, prefer one image item with url set. Use standalone link for additional URLs, or when there is no good image. Use standalone image only when there is no meaningful destination.

Placing companions inside a chapter

For a chapter spanning [chapter_start, chapter_end), place N companions by dividing the window into N equal slots (or picking natural anchor points in the script). Keep a short buffer (e.g., 1 second) between companions to avoid edge-case overlaps. A practical helper is in audio-providers.md under "Timeline timestamp calculation".

Companion images: sourced, AI-generated, or mixed

The agent asked the user in the interview where companion images should come from. Follow that choice consistently across the episode:

  • AI-generated -- after scripting, generate images from a themed prompt derived from each segment's content. Use the DALL-E / Stable Diffusion code under "Batch generation for timeline companions" below. Use the same naming pattern as above.

  • Mixed -- sourced where a usable image exists, AI-generated fill everywhere else. Aim for at least one image per chapter.

  • Skip -- emit a timeline with chapters plus Spotify and external-link companions only.

If the mode is Sourced or Mixed, attempting image extraction is required during sourcing. When a usable source image is found, include it in the timeline unless the user explicitly opted out later. Only omit an image companion when the source genuinely has no meaningful visual, or the user chose Skip.

The CLI's timeline set uploads each local image file to Spotify's image store, swaps the file path for the returned upload token, and sends the timeline to the backend. No separate image-upload step is needed.

AI image generation

When the user picks AI-generated or Mixed, generate images with their preferred model. Constraints for timeline companions: JPEG/PNG, up to 4096x4096, max 1 MB each.

OpenAI DALL-E
from openai import OpenAI
client = OpenAI()
response = client.images.generate(
    model="dall-e-3",
    prompt="A clean, minimal illustration of distributed systems architecture, dark background, tech aesthetic",
    size="1024x1024",
    quality="standard",
    n=1,
)
import urllib.request
urllib.request.urlretrieve(response.data[0].url, "img.png")
Stable Diffusion (local)
python3 -c "
from diffusers import StableDiffusionPipeline
pipe = StableDiffusionPipeline.from_pretrained('stabilityai/stable-diffusion-xl-base-1.0')
image = pipe('A clean illustration of neural networks, minimal, dark background').images[0]
image.save('img.png')
"
Resizing with ffmpeg
# Square companion under 1 MB, within 4096x4096
ffmpeg -i raw.png -vf "scale=1400:1400:force_original_aspect_ratio=decrease" -q:v 3 img_01_a.jpg
Batch generation for timeline companions

Generate one or more images per chapter from a themed prompt. File naming must match what the timeline builder expects: img_<chapter_index>_<slot>.jpg (slots a, b, c for multiple images inside one chapter).

from openai import OpenAI
import urllib.request, subprocess, string

client = OpenAI()

# One entry per chapter; each item lists the visual prompts for that chapter's slots
chapter_images = [
    ("Introduction",             []),  # no companions for intro
    ("Chapter A",                [
        "Neutral map of Eastern Europe, minimal, muted colors",
        "Wide shot of a damaged street, documentary photo, no text",
    ]),
    ("Chapter B",                [
        "Empty supermarket shelves, documentary photo, overcast light",
    ]),
    ("Sign-off",                 []),
]

for idx, (_, prompts) in enumerate(chapter_images):
    for slot_letter, prompt in zip(string.ascii_lowercase, prompts):
        resp = client.images.generate(model="dall-e-3", prompt=prompt,
                                      size="1024x1024", quality="standard", n=1)
        tmp = f"/tmp/raw_{idx}_{slot_letter}.png"
        urllib.request.urlretrieve(resp.data[0].url, tmp)
        out = f"img_{idx:02d}_{slot_letter}.jpg"
        # Downsize + re-encode to guarantee <= 1 MB, <= 4096x4096, .jpg
        subprocess.check_call([
            "ffmpeg", "-y", "-i", tmp,
            "-vf", "scale=1400:1400:force_original_aspect_ratio=decrease",
            "-q:v", "3", out,
        ])

For Stable Diffusion, swap the client.images.generate call for pipe(prompt).images[0].save(tmp) from the SDXL example above. Keep the same file-naming convention so the timeline builder in audio-providers.md picks the files up automatically.

Requirements and compatibility

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Needs: Needs network access

Security

What our scanner noticed· Medium risk

  • Instructions that use the network
  • Downloads piped into a shell

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Published by
Cline
Publisher
Cline (Official)
Source
cline/skills · skills/save-to-spotify · commit 2637846
Licence
Apache License 2.0 (redistribution allowed)
  • LICENSE (added by AutoGineer from LICENSE)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by Cline.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download save-to-spotify.zip