2.5k
GitHub Stars
2
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill openclaw/skills --skill kosmi-dj- _meta.json274 B
- SKILL.md6.0 KB
Overview
This skill turns the agent into a video DJ for Kosmi watch-party rooms using agent-browser automation. It connects to a Kosmi room, queues or plays video URLs, and can run a background DJ loop that auto-plays a playlist. Environment variables and a persistent agent-browser session allow reliable, repeatable control.
How this skill works
The skill drives a Chromium instance through the agent-browser CLI: it opens the room URL, takes accessibility-tree snapshots to discover interactive elements, and issues click/fill/press commands by ref ID. Scripts provide idempotent connect, single-play, and loop modes. The loop polls player state and advances the queue, writing a PID file for stop/status control.
When to use it
- You need to play or queue a YouTube/video URL into a Kosmi room programmatically.
- You want a persistent DJ that auto-plays and loops a playlist in a Kosmi watch party.
- You need to connect and authenticate to a Kosmi room from an automated agent with session persistence.
- You must debug Kosmi UI changes by inspecting accessibility snapshots.
- You want to run a headless or background DJ service on a server using agent-browser.
Best practices
- Store KOSMI_ROOM_URL, AGENT_BROWSER_SESSION_NAME and optional credentials in a .env loaded before runs.
- Use session persistence (AGENT_BROWSER_SESSION_NAME) to avoid repeated logins and keep cookies/localStorage.
- Always take snapshots and match elements by role + case-insensitive name, since ref IDs change each load.
- Use the provided snapshot-debug script when a UI element is not found; update element mappings accordingly.
- Run the loop script as a background process and rely on the PID file for graceful stop/status commands.
Example use cases
- Start a Kosmi watch party DJ that plays a curated list of YouTube links on a schedule.
- Add a requested video URL to the Kosmi room queue via agent command without manual intervention.
- Run a continuous DJ loop on a server that fetches new URLs and advances when each video ends.
- Diagnose Kosmi UI updates by dumping the accessibility snapshot and remapping button/text names.
- Temporarily take over playback to ensure a presentation or public stream always has content.
FAQ
agent-browser CLI must be available on PATH; install with npm if needed (npm install -g agent-browser).
How does session persistence work?
Set AGENT_BROWSER_SESSION_NAME to keep cookies/localStorage between runs; optionally set AGENT_BROWSER_ENCRYPTION_KEY to encrypt stored session data.
How do I stop the DJ loop?
The loop writes a PID file at /tmp/kosmi-dj-loop.pid; kill that PID or run the provided stop helper that reads and terminates the process.