/klanker:vscodefrom klanker
Connects desktop VS Code to a sandbox via SSM port-forward and per-sandbox ed25519 keypair. Handles key rotation without destroying the sandbox.
Ships in klanker. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Operator-side workflow for connecting desktop VS Code into a sandbox over SSM + ssh. km generates a per-sandbox ed25519 keypair on the operator workstation, ships the public key via userdata, and writes an ~/.ssh/config Host entry that tunnels through aws ssm start-session.
Audience: the operator running km on their workstation. The sandbox just needs runtime.vscode.enabled: true in its profile (the default).
klanker:init — must run km init --sidecars once before VS Code support works for new sandboxesklanker:user — km create, km list, km destroy lifecycleField (under spec.runtime.vscode) | Type | Default | Purpose |
|---|---|---|---|
enabled | bool* | true | Provision sshd + authorized_keys at sandbox boot. Set false to skip. |
Phase 92 moved this field from spec.cli.vscodeEnabled to spec.runtime.vscode.enabled; the old path is rejected by km validate.
bool* = pointer-bool with profile-inheritance semantics; omit to use parent/default.
| Path | Purpose |
|---|---|
~/.km/keys/<sandbox-id> | Private key (mode 0600) generated by km create |
~/.km/keys/<sandbox-id>.pub | Public key (mode 0644) shipped via userdata |
~/.ssh/config (managed block) | Host entries between # BEGIN km vscode hosts and # END km vscode hosts markers |
VSCodeSSHPubKey userdata field):make build
km init --sidecars
Without km init --sidecars, km create --remote against a runtime.vscode.enabled profile produces a sandbox with broken authorized_keys (silent SSH failure).
# 1. Create — keypair is generated locally
km create profiles/<your-profile>.yaml --alias my-poc
# 2. Resolve the sandbox ID
SB=$(km list | awk '/my-poc/ {print $1}')
# 3. Open the SSM tunnel (blocks until Ctrl-C)
km vscode start $SB
# 4. In VS Code: F1 → "Remote-SSH: Connect to Host..." → km-$SB
# 5. (Optional) check sshd + authorized_keys state on the sandbox
km vscode status $SB
# 6. Teardown also cleans the local keypair + ssh-config block
km destroy $SB --remote --yes
km vscode start and km vscode status accept the same identifier formats as other km subcommands: full sandbox ID (lrn2-ee9499b5), alias (my-poc), or the row number from km list.
--local-port <N> overrides the default 2222 if it's already in use.
km vscode rekey <sandbox-id> --yes
Generates a fresh ed25519 pair on the operator workstation, pushes the new public key to the sandbox's ~/.ssh/authorized_keys, commits it locally, then publishes it to SSM (/{prefix}/access/<id>/ssh-key) so every other operator picks it up on their next start. Active VS Code sessions stay on the old key until reconnect.
Solves:
authorized_keys from the bake-time sandbox.start since) — start names this case and points here.Pre-flight gates (any failure = no key changes):
running (not stopped / pending)km lock must not block (override with --force)runtime.vscode.enabled: true — sandboxes created without it get a clear hard error pointing at km destroy && km createruntime.vscode.enabled: true do NOT get sshd retroactively. km destroy && km create to provision.~/.km/keys/<id> is a cache; km vscode start (and km herdr, km tunnel) pulls it on a laptop that has never seen the sandbox, refreshes it after someone else's rekey, and publishes it if SSM has no copy yet. Just run start — no file copying. If start says the box's authorized_keys doesn't match the shared key, run km vscode rekey <id>.authorized_keys entry; sshd cannot tell analysts apart).km BEFORE anyone rekeys — rekey rotates the box, and a laptop on the old binary has no sync and is locked out until it upgrades. If you already hold the key, plain start publishes it with nothing rotated. rekey needs the sandbox running.km destroy cleans up the local keypair files AND the ssh-config Host block. Manual cleanup is only needed when a sandbox is wiped out-of-band (region deleted, DynamoDB row removed, etc.).See docs/vscode.md for the full operator guide and troubleshooting matrix.
What SKILL.md sets; muted values are Claude Code's defaults
9 skills in this plugin
/clusterProvision cross-account IAM roles in the klanker AWS account that trust k8s clusters in other AWS accounts via IRSA (projected ServiceAccount tokens, auto-rotating 3600s sessions)/desktopLaunch a KasmVNC graphical browser session (kiosk or full XFCE) inside a sandbox EC2 and tunnel it to the operator's local browser over SSM port-forward/emailSend, receive, and orchestrate email between sandboxes using km-send and km-recvOther plugins' skills for the same job
/initOne-time platform setup for an operator workstation — km configure, km init, multi-instance resource_prefix isolation, Slack/Lambda bootstrap, and rollout sequences after sidecar/Lambda changesnpx claudepluginhub whereiskurt/klanker-maker --plugin klanker