Subwave Control logo

Subwave Control

CommunityPopular
perminder-klair
subwave-control

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. Use this skill any time the user wants to "start subwave", "stop subwave", "bring up the radio", "shut down the radio", "boot subwave in dev/prod", "turn subwave on/off", "is subwave running?", or otherwise just power the stack up or down. Detects which compose file (dev vs prod) is already running and matches it; if nothing is running, asks dev or prod. Dev mode also launches the Next.js web dev server on :7700 in the background. Always verifies the stream is on-air after a start. Do NOT use this skill for first-time setup, `git pull` + rebuilds, jingle generation, or config changes — that's `subwave-deploy`. If the user asks for any of those, hand off rather than starting.

Overview

Publisherperminder-klair
Repositorysubwave
Skill namesubwave-control
Stars
1.4K
Forks
122
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by perminder-klair on GitHub. Read the source before you install it.

Installation

Install the Subwave Control AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/perminder-klair/subwave/tree/develop/.claude/skills/subwave-control
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/perminder-klair/subwave.git /tmp/subwave
mkdir -p .claude/skills
cp -r /tmp/subwave/.claude/skills/subwave-control .claude/skills/subwave-control
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Subwave Control in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Subwave Control on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Subwave Control is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

SUB/WAVE control

Bring the SUB/WAVE stack up or down. Nothing more. No builds, no pulls, no setup — if any of those are needed, hand off to the subwave-deploy skill.

This skill is checked into the SUB/WAVE repo. The repo root is the git repository that contains this skill — derive it once, don't hardcode it:

bash
REPO=$(git -C "<this skill's base directory>" rev-parse --show-toplevel)

<this skill's base directory> is the absolute path shown as "Base directory for this skill" when the skill loads. All docker compose invocations run from docker/ inside $REPO. Shell state does not persist between commands, so re-derive $REPO (or substitute its value) in each command block below.

The three things you need to know

  1. Two compose files = two modes.

    • Dev — docker-compose.dev.yml: Icecast + Liquidsoap + Controller only. Web runs separately as npm run dev on the host (port 7700).
    • Prod — docker-compose.yml: adds web (built image) and caddy (edge router). Only Caddy binds a host port. State defaults to <repo>/state (override with the STATE_DIR env).
  2. Service ports (post-renumber): Web 7700, Controller 7701, Icecast 7702. The controller's /health endpoint returns {"status":"on-air"} once Liquidsoap is connected to Icecast — that's the canonical "is it up?" check.

  3. Web dev is hot-reloaded but must be launched separately in dev mode. npm run dev in web/ is a long-running foreground process; in this skill, always run it as a background task. The Next.js port 7700 collides with macOS AirPlay Receiver in some setups — if you get EADDRINUSE on :7700, check lsof -nP -iTCP:7700 -sTCP:LISTEN and surface the conflict to the user rather than guessing.

Workflow

Step 0 — Detect what's running

bash
cd "$REPO"
RUNNING_DEV=$(docker compose -f docker-compose.dev.yml ps -q 2>/dev/null)
RUNNING_PROD=$(docker compose -f docker-compose.yml ps -q 2>/dev/null)
WEB_DEV_PID=$(lsof -nP -iTCP:7700 -sTCP:LISTEN -t 2>/dev/null | head -1)
StateRUNNING_DEVRUNNING_PRODWEB_DEV_PID
Nothing upemptyemptymaybe (AirPlay)
Dev upnon-emptyemptynon-empty (next dev)
Prod upemptynon-emptyempty
Both upnon-emptynon-empty— (anomaly; ask user)

For start: if neither is up, ask the user which mode. If one is already up, treat the request as a no-op and just verify health.

For stop: target whichever is currently up. If nothing is up, say so and stop.

Step 1 — Start (dev)

bash
cd "$REPO/docker" && docker compose up -d

Then start the web dev server (run it in the background — do not block waiting for it):

bash
cd "$REPO/web" && npm run dev

If web/node_modules is missing, run npm install first. If :7700 is already taken by something other than a prior next dev (e.g. macOS ControlCenter for AirPlay), surface the conflict to the user — do not try to kill ControlCenter.

Step 1 — Start (prod)

bash
cd "$REPO"
docker compose -f docker-compose.yml up -d

State goes to <repo>/state unless docker/.env (or the environment) sets STATE_DIR — compose picks that up on its own, no need to pass it.

No host-side web dev server in prod — Caddy serves the built web container.

Step 2 — Verify on-air

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

bash
sleep 5
curl -sf http://localhost:7701/health    # dev — controller exposed directly
# or, in prod, via the Caddy port (read from `docker compose -f docker-compose.yml port caddy 80`)

Expect {"status":"on-air"}. In dev also verify the web UI: curl -sf -o /dev/null -w "%{http_code}\n" http://localhost:7700 → expect 200.

If the health probe fails, peek at docker compose logs --tail=30 controller broadcast and surface the relevant error. Do not rebuild — that's subwave-deploy's territory.

Step 1 — Stop (dev)

bash
# Stop the web dev server first (it holds :7700)
WEB_DEV_PID=$(lsof -nP -iTCP:7700 -sTCP:LISTEN -t 2>/dev/null | head -1)
[ -n "$WEB_DEV_PID" ] && kill "$WEB_DEV_PID"
cd "$REPO/docker" && docker compose down

If :7700 is held by ControlCenter (AirPlay) and not node, skip the kill — don't kill ControlCenter. Confirm with lsof -nP -iTCP:7700 -sTCP:LISTEN and check the COMMAND column before sending the signal.

Step 1 — Stop (prod)

bash
cd "$REPO" && docker compose -f docker-compose.yml down

Do not add -v (would wipe the named volumes for Caddy data/config) unless the user explicitly asks. State at ${STATE_DIR} is a host bind mount and is not affected by down either way.

Allowed without confirmation

  • docker compose up -d and docker compose down against either compose file
  • npm run dev / killing the foreground next dev process on :7700
  • npm install --prefix web if node_modules is missing
  • Reading logs, running curl health probes

Confirm before running

  • docker compose down -v (wipes volumes — Caddy data/config in prod)
  • Any rm/docker volume rm/docker system prune
  • Killing a non-node process holding :7700
  • Anything that touches state/ (including state/icecast-secrets.env) or the root .env

When to hand off to subwave-deploy

If the user wants any of these, this skill is not the right one — invoke subwave-deploy instead:

  • First-time setup, scripts/setup.sh
  • git pull + rebuild + recreate
  • Source changes in controller/, liquidsoap/, or web/ that need up -d --build
  • Generating jingles
  • Editing env or config

Frequently asked questions

What does the Subwave Control AI skill do?

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. Use this skill any time the user wants to "start subwave", "stop subwave", "bring up the radio", "shut down the radio", "boot subwave in dev/prod", "turn subwave on/off", "is subwave running?", or otherwise just power the stack up or down. Detects which compose file (dev vs prod) is already running and matches it; if nothing is running, asks dev or prod. Dev mode also launches the Next.js web dev server on :7700 in the background. Always verifie...

Why use Subwave Control on TypingMind?

Because you install it once and use it with any model. Subwave Control is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Subwave Control in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/perminder-klair/subwave/tree/develop/.claude/skills/subwave-control. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Subwave Control?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Subwave Control?

As many as you like. As long as a model supports skills, you can use Subwave Control with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Subwave Control AI skill free?

Yes. It is published on GitHub by perminder-klair under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇