Agent skill

Subwave Worktree Dev

by perminder-klair in perminder-klair/subwave

Stage a SUB/WAVE git worktree so the dev stack can run from it, then start it.

MITAuto-check: notesDevelopment

Install Subwave Worktree Dev

skills CLI
$ npx skills add perminder-klair/subwave --skill subwave-worktree-dev -a claude-code

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

GitHub CLI
$ gh skill install perminder-klair/subwave subwave-worktree-dev --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/perminder-klair/subwave.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/subwave-worktree-dev .claude/skills/subwave-worktree-dev && 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
subwave-worktree-dev
GitHub stars
1.4k
Token cost
~2.1k tokens
SKILL.md length
875 words
Files
2 (incl. scripts)
Skills in repo
7
Repo updated
First seen
Licence
MIT

At a glance

Stage a SUB/WAVE git worktree so the dev stack can run from it, then start it.

  • Works in 5 steps: Identify the worktree → Stop any running stack → Prep the worktree → …
  • The user wants to test branch changes in a worktree
  • SKILL.md covers Why a worktree needs prep, Two load-bearing facts, Workflow and Iterating, plus 3 more sections
  • Runs Shell scripts from its folder; calls docker, npm and git

What it does

Subwave Worktree Dev is an agent skill from perminder-klair/subwave. Stage a SUB/WAVE git worktree so the dev stack can run from it, then start it. A git worktree only checks out tracked files — the dev stack also needs gitignored files (controller/.env, web/.env.local, docker/.env, web/nodemodules, and a state/ directory) that this skill copies or scaffolds from the main working tree. Use this skill whenever the user wants to test branch changes in a worktree, run subwave from a worktree, "prep"/"set up" a worktree for dev mode, or asks to copy env files / nodemodules / state…

Its SKILL.md is about 2.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including scripts (for example `scripts/prep-worktree.sh`).

It sits in Development, covering Git worktrees. It works with Git and Docker. The repository describes itself as: Personal internet radio: Agentic AI DJ. The licence is MIT.

When your agent uses it

  • The user wants to test branch changes in a worktree
  • Run subwave from a worktree
  • Prep/set up a worktree for dev mode
  • Asks to copy env files / nodemodules / state into a worktree — phrases like test this worktree in dev mode

Example prompts

  • “set up”
  • “test this worktree in dev mode”
  • “start subwave from the worktree”
  • “/subwave-worktree-dev”

Requirements

  • Node.js
  • A Bash shell
  • Docker

Workflow steps

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

  1. Identify the worktree
  2. Stop any running stack
  3. Prep the worktree
  4. Start the stack from the worktree
  5. Verify on-air

What it can do on your machine

Read from SKILL.md and the folder at commit 45ef433. 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 1 file in scripts/ (Shell), which the agent can run.

    Shell commands in SKILL.md call:

    • docker
    • npm
    • git
    • curl
    • bash

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

  • Network

    No URLs in SKILL.md. Its commands use docker, npm, git and curl, which can reach the network depending on how they are called.

    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

Subwave Worktree Dev loads about 2.1k tokens when it runs. Until then it costs about 202 tokens; SKILL.md has 875 words of instructions outside code blocks.

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

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: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:6
    gitignored files (controller/.env, web/.env.local, docker/.env, web/node_modules,
  • NoteMentions a .env fileSKILL.md:30
    | `.env` | Root `.env` — `ADMIN_USER` / `ADMIN_PASS` / `SITE_URL`. Dev compose references it as `./.env`; compose refuse
  • NoteMentions a .env fileSKILL.md:31
    | `controller/.env` | Dev compose declares `env_file: ./controller/.env` — controller container won't start without it.
  • NoteMentions a .env fileSKILL.md:32
    | `web/.env.local` | Dev API/stream URL overrides (`NEXT_PUBLIC_API_URL` etc.). Without it the web UI defaults to same-o
  • NoteMentions a .env fileSKILL.md:33
    | `docker/.env` | Compose variable substitution (legacy — harmless to copy). |
  • NoteMentions a .env fileSKILL.md:163
    hing the **main checkout's** `controller/.env`, `state/`, or config

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 perminder-klair/subwave at commit 45ef433, republished under its MIT licence (© perminder-klair). 875 words, ~2,106 tokens.

Download SKILL.mdSave it as .claude/skills/subwave-worktree-dev/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
subwave-worktree-dev
description
Stage a SUB/WAVE git worktree so the dev stack can run from it, then start it. A git worktree only checks out tracked files — the dev stack also needs gitignored files (controller/.env, web/.env.local, docker/.env, web/node_modules, and a state/ directory) that this skill copies or scaffolds from the main working tree. Use this skill whenever the user wants to test branch changes in a worktree, run subwave from a worktree, "prep"/"set up" a worktree for dev mode, or asks to copy env files / node_modules / state into a worktree — phrases like "test this worktree in dev mode", "start subwave from the worktree", "prep the worktree", "run my branch locally", "copy the required files into the worktree". Do NOT use it for the main checkout (that's subwave-control) or for production.

SUB/WAVE worktree dev setup

Get the SUB/WAVE dev stack running from inside a git worktree so branch changes can be tested without touching the main checkout.

Why a worktree needs prep

A worktree checks out every tracked file, so all source is already there. But the dev stack also depends on gitignored files that do not travel with a worktree checkout:

FileWhy the stack needs it
.envRoot .env — ADMIN_USER / ADMIN_PASS / SITE_URL. Dev compose references it as ./.env; compose refuses to start without it.
controller/.envDev compose declares env_file: ./controller/.env — controller container won't start without it. Navidrome + Ollama config.
web/.env.localDev API/stream URL overrides (NEXT_PUBLIC_API_URL etc.). Without it the web UI defaults to same-origin /api and cannot reach the controller.
docker/.envCompose variable substitution (legacy — harmless to copy).
state/setup-config.jsonNavidrome creds the wizard saved on main. Without this the controller reports needsSetup: true and the player redirects to /onboarding on every load.
state/secrets.envCloud LLM / TTS API keys (if main has any). Sourced into the controller's process.env on boot.
state/settings.jsonOperator's full config — LLM provider/model, personas, shows, TTS. Without it the controller boots with default settings (llm.model = ''), every LLM call returns "fetch failed", and the new skills cannot run.
state/moods.jsonLibrary mood tagging produced by npm run tag (LLM walk over the whole library — expensive to redo per branch).
state/sfx.json + sfx/Sound-effects catalogue metadata + rendered WAVs the admin UI lists and liquidsoap mixes in.
state/jingles.json + jingles.m3u + jingles/Pre-rendered station idents. Liquidsoap reads the M3U with reload_mode="watch".
state/recent-plays.json24h play log — the picker and the library-deep-cut skill key off it for dedup.
state/sessions/Archived DJ sessions (the live one is regenerated on boot).
state/voice/Persona TTS reference voices (Chatterbox cloning refs, if any).
web/node_modulesNeeded by npm run dev.
state/Bind-mounted into the containers. A worktree's state/ is empty.

state/ is mirrored from main so the worktree boots into the same configured station — same LLM provider, same personas, same library moods, same jingles — ready to test branch changes against real data. Runtime state (queue.json, session.json, archive/, logs/, listeners.jsonl, now-playing.json) is not copied, since those would clash with what the worktree's own containers produce fresh on first boot. The broadcast container generates its own state/icecast-secrets.env on first boot, so worktrees never need to copy icecast config either.

Two load-bearing facts

  1. One stack at a time. Both compose files use fixed container names (sub-wave-broadcast, …) and host ports (Web 7700, Controller 7701, Icecast 7702). A worktree stack and the main-checkout stack collide — stop whatever is running before starting another.
  2. Controller changes need --build, web changes do not. The controller image COPYs its source at build time, so testing worktree controller code requires docker compose up -d --build. The web dev server (npm run dev) hot-reloads from the worktree filesystem, so UI changes appear with no build.

Workflow

Step 0 — Identify the worktree

The target worktree is usually the session's current directory. Confirm it is a linked worktree and not the main checkout:

bash
git rev-parse --absolute-git-dir          # a worktree's is <main>/.git/worktrees/<name>
git worktree list                         # shows the main tree + every linked worktree

If the user named a specific worktree path, use that.

Step 1 — Stop any running stack

Only one stack can run. Stop whatever is up (it may be the main checkout's):

bash
# Kill the web dev server if it holds :7700 — but only if it is `node`,
# never macOS ControlCenter/AirPlay.
WEB_PID=$(lsof -nP -iTCP:7700 -sTCP:LISTEN -t 2>/dev/null | head -1)
[ -n "$WEB_PID" ] && ps -p "$WEB_PID" -o comm= | grep -qi node && kill "$WEB_PID"

# Bring down whichever dev stack is up. The compose file lives at the
# checkout root (not under docker/); container names are global, so any
# checkout's docker-compose.dev.yml targets the running containers.
docker compose -f <some-checkout>/docker-compose.dev.yml down
Show full SKILL.md (353 more words)Show less
Step 2 — Prep the worktree

Run the bundled script. It copies the env files, mirrors the operator's declarative state/ from main (settings, moods, sfx, jingles, sessions, voice), and runs npm install for the web app. <skill base directory> is the absolute path shown as "Base directory for this skill" when the skill loads.

bash
bash "<skill base directory>/scripts/prep-worktree.sh" <worktree-path>

Flags: --reset-state wipes and re-scaffolds state/ (use when the user wants a clean slate); --skip-npm skips the dependency install (use when node_modules is already good). The script is idempotent — re-running it only fills in what is missing, never overwrites a file the worktree already has.

Step 3 — Start the stack from the worktree

Compose files now live at the worktree root (not under docker/):

bash
cd <worktree-path> && docker compose -f docker-compose.dev.yml up -d --build

--build is required so the worktree's controller source is baked into the image. The first build is slow (all services); later builds only rebuild changed layers. Then start the web dev server in the background (it is a long-running foreground process):

bash
cd <worktree-path>/web && npm run dev
Step 4 — Verify on-air

Give Liquidsoap ~5s to connect to Icecast, then probe the controller:

bash
sleep 5
curl -sf http://localhost:7701/health                               # expect {"status":"on-air"}
curl -sf -o /dev/null -w '%{http_code}\n' http://localhost:7700      # expect 200

If /health fails, peek at docker compose logs --tail=30 controller broadcast and surface the error. A fresh state/ is normal — an empty queue and default settings on first boot are expected, not faults.

Iterating

  • Web/UI change — nothing to do; npm run dev hot-reloads it.
  • Controller source change — rebuild just that service: cd <worktree-path> && docker compose -f docker-compose.dev.yml up -d --build controller.
  • liquidsoap/radio.liq change — it is bind-mounted in dev; just docker compose restart broadcast.

Allowed without confirmation

  • Running scripts/prep-worktree.sh (copies env files, scaffolds state/, npm install)
  • docker compose up -d --build / down against a worktree's dev compose file
  • npm run dev / killing a node process on :7700
  • Reading logs, curl health probes

Confirm before running

  • --reset-state when state/ already has real data the user may want
  • docker compose down -v (wipes volumes)
  • Killing a non-node process on :7700
  • Touching the main checkout's controller/.env, state/, or config

When NOT to use this skill / hand off

  • Main checkout, not a worktree → use subwave-control to start/stop.
  • Production (docker-compose.yml or docker-compose.byo.yml) → use subwave-control.
  • First-time repo setup, git pull + rebuild, jingle generation, config changes → use subwave-deploy.

© perminder-klair, 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 1 other file (scripts) in .claude/skills/subwave-worktree-dev of perminder-klair/subwave.

  • SKILL.md
  • scripts/prep-worktree.sh

Open the folder on GitHubat commit 45ef433

Compare with similar skills

Subwave Worktree Dev 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.

Subwave Worktree Dev compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Subwave Worktree Dev this skillperminder-klair/subwave1.4k—~2.1kAutomated safety check: NotesMIT
Burla Parallel Dev ClustersBurla-Cloud/burla263—~1.6kAutomated safety check: PassCustom licence
Tnr Dev Serverstudie-tech/TheNinjaRPG104—~2.5kAutomated safety check: NotesNone
Superset Project Setupsuperset-sh/superset15k—~577Automated safety check: NotesCustom licence
Polyphonyalinaqi/maggy707—~980Automated safety check: PassMIT
Worktree StackLanternOps/breeze130—~1.2kAutomated safety check: NotesAGPL-3.0

Similar skills

  • Sets up an isolated Burla dev cluster per git worktree so several agents can work in parallel, and explains when to use local-dev or remote-dev.

    263 GitHub stars~1.6k tokensUpdated 15 days ago
    DevelopmentAuto-check passed
  • Tnr Dev Server

    studie-tech/TheNinjaRPG

    Run a TheNinjaRPG dev server locally from any git worktree, provision disposable test users, and call tRPC endpoints as those users.

    104 GitHub stars~2.5k tokensUpdated yesterday
    DevelopmentAuto-check: notes
  • Superset Project Setup

    superset-sh/superset

    Makes a repository Superset-ready by writing .superset/config.json with setup, teardown and run scripts, then proving it with a real throwaway workspace.

    15k GitHub stars~577 tokensUpdated yesterday
    DevelopmentAuto-check: notes
  • Polyphony

    alinaqi/maggy

    Multi-agent orchestration with container-isolated workspaces — each agent session runs in its own Docker container with independent git branches

    707 GitHub stars~980 tokensUpdated 13 days ago
    DevelopmentAuto-check passed
  • Worktree Stack

    LanternOps/breeze

    A skill your agent uses when an agent needs a running, seeded, Playwright-ready Breeze stack for the current git worktree.

    130 GitHub stars~1.2k tokensUpdated today
    DevelopmentAuto-check: notes
  • Git Worktree Manager

    borghei/Claude-Skills

    Manage parallel development with Git worktrees: creation with port allocation, environment sync, branch isolation, and cleanup.

    874 GitHub stars~1.6k tokensUpdated yesterday
    DevelopmentAuto-check: notes

More from perminder-klair/subwave

  • Subwave LLM Bench

    perminder-klair/subwave

    Benchmark and compare LLM models for SUB/WAVE's on-air calls — track picks, segments, listener requests, DJ scripts, banter, and programme beats — in both candidate-pool and agent modes, using…

    1.4k GitHub stars~2.4k tokensUpdated yesterday
    Auto-check: notes
  • Subwave Control

    perminder-klair/subwave

    Start or stop the SUB/WAVE radio stack (a personal internet radio station) in dev or production mode — no builds, no rebuilds, no config rendering.

    1.4k GitHub stars~1.6k tokensUpdated yesterday
    Auto-check: notes
  • Subwave Discord Release

    perminder-klair/subwave

    Draft a Discord release announcement for SUB/WAVE from a release PR, tag, or version number.

    1.4k GitHub stars~2.3k tokensUpdated yesterday
    Auto-check passed
  • Subwave Release PR

    perminder-klair/subwave

    Open a release pull request from develop to main for SUB/WAVE, and keep develop from drifting behind main.

    1.4k GitHub stars~4k tokensUpdated yesterday
    Auto-check passed
  • Subwave News Dispatch

    perminder-klair/subwave

    Write a news post for the SUB/WAVE "Dispatches" page, a short human-friendly tutorial about a feature, fix, or release.

    1.4k GitHub stars~1.6k tokensUpdated yesterday
    Auto-check: warnings
  • Verify

    perminder-klair/subwave

    Drive a controller/admin-UI change end-to-end from a worktree without touching the live station — isolated controller on a spare port + temp STATEDIR, worktree Next dev server, Playwright against…

    1.4k GitHub stars~451 tokensUpdated yesterday
    Auto-check passed

Works with

Categories

Questions about Subwave Worktree Dev

What does Subwave Worktree Dev do?

Stage a SUB/WAVE git worktree so the dev stack can run from it, then start it. Subwave Worktree Dev is an agent skill from perminder-klair/subwave. Stage a SUB/WAVE git worktree so the dev stack can run from it, then start it.

When should I use Subwave Worktree Dev?

Subwave Worktree Dev fits situations like: the user wants to test branch changes in a worktree; run subwave from a worktree; prep/set up a worktree for dev mode; asks to copy env files / nodemodules / state into a worktree — phrases like test this worktree in dev mode.

How do I install Subwave Worktree Dev in Claude Code?

Run `npx skills add perminder-klair/subwave --skill subwave-worktree-dev -a claude-code`. Or copy the skill folder (.claude/skills/subwave-worktree-dev in perminder-klair/subwave) into .claude/skills/subwave-worktree-dev in your project. Claude Code loads it when a task matches its description.

How do I install Subwave Worktree Dev in Codex?

Run `npx skills add perminder-klair/subwave --skill subwave-worktree-dev -a codex`. Or copy the skill folder (.claude/skills/subwave-worktree-dev in perminder-klair/subwave) into .agents/skills/subwave-worktree-dev in your project. Codex loads it when a task matches its description.

Can I use Subwave Worktree Dev 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 perminder-klair/subwave --skill subwave-worktree-dev -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/subwave-worktree-dev, .gemini/skills/subwave-worktree-dev, .github/skills/subwave-worktree-dev and .opencode/skills/subwave-worktree-dev in your project.

What does Subwave Worktree Dev need to run?

Going by SKILL.md and its folder, Subwave Worktree Dev needs a shell for the scripts in its folder and the command-line tools its instructions call (docker, npm, git, curl and bash). Our summary lists: Node.js; A Bash shell; Docker.

Does Subwave Worktree Dev access the network?

SKILL.md contains no URLs. Its commands use docker, npm, git and curl, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Subwave Worktree Dev safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. 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 Subwave Worktree Dev use?

Subwave Worktree Dev 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 Subwave Worktree Dev use?

About 2.1k tokens (SKILL.md is roughly 8.4k 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 Subwave Worktree Dev?

Skills that share tags, products or a category with Subwave Worktree Dev: Burla Parallel Dev Clusters (Burla-Cloud/burla, 263 stars), Tnr Dev Server (studie-tech/TheNinjaRPG, 104 stars), Superset Project Setup (superset-sh/superset, 15k stars) and Polyphony (alinaqi/maggy, 707 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Subwave Worktree Dev?

perminder-klair (a GitHub user) maintains it in perminder-klair/subwave, which has 1,414 GitHub stars. The repository holds 7 skills in this directory. The repository was last updated on October 7, 2026.

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