---
description: Show the currently active LaunchSecure course (server profile) and list the others available in .launch-secure.cred.config. Surfaces which serverUrl/org/project this Claude session is talking to so the user doesn't post local LS comms to prod, or vice versa. Read-only by default; switch is opt-in.
---

# /kit:course

A "course" is a named LaunchSecure destination — `serverUrl + PAT + orgSlug + projectSlug` — stored under `profiles` in `.launch-secure.cred.config`. The active course drives every MCP call and every `npx launch-pod` invocation. This skill answers two questions: *which course am I on right now*, and *what others are available* — without changing anything unless explicitly told to.

Parse `$ARGUMENTS` — first token is the subcommand:

- (empty) or **status** — one-line: which course is active.
- **list** — table of every course, active marked with `★`.
- **switch &lt;name&gt;** — change the active course (rewrites `.launch-secure.cred.config` AND `.mcp.json`'s launch-secure URL). Asks for confirmation.
- **diff** — show the deltas between two courses (`--a=<name> --b=<name>`).

Examples:
- `/kit:course`            → "active: prod (acme/launchsecure-v2 @ launchsecure-v2.vercel.app)"
- `/kit:course list`       → table
- `/kit:course switch local`
- `/kit:course diff --a=local --b=prod`

## Preflight

Confirm `.launch-secure.cred.config` exists in the cwd (or in the nearest parent up to 3 levels — `cred-shape.ts`'s lookup convention). If missing, tell the user: `"No .launch-secure.cred.config here. Run \`npx @launchsecure/launch-kit init\` first."`

Read the cred file directly (it's gitignored, lives at the repo root, JSON shape with `active` + `profiles`). Never call out to launch-course CLI from inside the skill for read operations — read the file. Use `launch-course` (Bash) only for `switch` (it owns the MCP rewrite invariant).

## Per-subcommand behavior

### status (default)

Read the cred file. Print one line:

```
active: <name> (<orgSlug>/<projectSlug> @ <serverUrl>)
```

If the file is in legacy flat shape (single profile at the top), say so explicitly: `"active: (legacy single-profile shape — no name; first multi-profile op auto-migrates)"`.

### list

```
courses (3):
    name        serverUrl                              org/project
  ★ prod        https://launchsecure-v2.vercel.app     acme/launchsecure-v2
    staging     https://staging.launchsecure-v2.app    acme/launchsecure-v2
    local       http://localhost:3000                  acme/launchsecure-v2
```

Sort: active first, then alphabetical. Column-align with monospace.

### switch

1. Sanity-check `<name>` exists in `profiles`. If not, list available names and stop.
2. Print the BEFORE → AFTER one-liner:
   ```
   switching: prod (acme/launchsecure-v2 @ launchsecure-v2.vercel.app)
             → local (acme/launchsecure-v2 @ localhost:3000)
   ```
3. Ask: `"Continue? (yes / no)"` — wait for `yes`. Per project memory, destructive/sticky changes require explicit confirmation.
4. On `yes`, run `npx launch-course set <name>` via Bash. This rewrites both `.launch-secure.cred.config` (active pointer) AND `.mcp.json` (the launch-secure URL). Surface the CLI output verbatim.
5. After switch, remind: `"Restart Claude Code to pick up the new MCP URL (or use \`/mcp reload\` if available)."`

### diff

Resolve `--a` and `--b` from `profiles`. Print a compact diff:

```
local         →  prod
serverUrl     http://localhost:3000              →  https://launchsecure-v2.vercel.app
org           acme                               →  acme
project       launchsecure-v2                    →  launchsecure-v2
pat           sha256:abc1…ef                     →  sha256:def0…12
```

PAT values are hashed (sha256 first 8 of each, last 2 — purely for the user to confirm they differ; never print full PATs). Same row for unchanged values.

## Constraints

- **Read-only by default.** Only `switch` writes; status/list/diff never mutate.
- **Switch requires confirmation.** Per project memory, never destructive without `yes`.
- **No PAT exfiltration.** Never print the full PAT value; show short hashes for diff identification only.
- **Don't bypass launch-course CLI.** The `switch` MCP-rewrite logic is its responsibility — call the CLI; don't reimplement the .mcp.json mutation inside the skill (drift risk).
- **Surface the active course on every run.** Even on `list`/`diff`, the first or last line shows which course is active so the user is never confused about session scope.
