bug-fix-tdd
Reproduce and fix bugs using TDD. Use when analyzing a bug report, writing a regression test,…
Spin up and interact with ToolHive Studio's containerized dev environment (Xvfb + noVNC + DinD). Use when running, testing, or debugging the app in isolation — locally, in a git worktree, or in GitHub Codespaces; when touching `.devcontainer/*`, `scripts/devcontainer-*.sh`, or
$ npx -y skills add stacklok/toolhive-studio --skill devcontainer-dev --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/devcontainer-devContext preview
The summary Claude sees to decide when to auto-load this skill.
Spin up and interact with ToolHive Studio's containerized dev environment (Xvfb + noVNC + DinD). Use when running, testing, or debugging the app in isolation — locally, in a git worktree, or in GitHub Codespaces; when touching `.devcontainer/*`, `scripts/devcontainer-*.sh`, or
name: devcontainer-dev description: Spin up and interact with ToolHive Studio's containerized dev environment (Xvfb + noVNC + DinD). Use when running, testing, or debugging the app in isolation — locally, in a git worktree, or in GitHub Codespaces; when touching `.devcontainer/*`, `scripts/devcontainer-*.sh`, or the `devContainer:dev` npm script; or when debugging "blank white window", "Docker daemon failed to start", or "Missing X server" errors in the devcontainer. The container is fully isolated: no host pnpm install, no host Docker socket, no host X11/GPU — experiment freely without contaminating the host. allowed-tools: Read, Grep, Glob, Bash
An isolated, cross-platform test environment for ToolHive Studio. The whole Electron app — including its backend `thv` binary and the MCP-server containers it spawns — runs inside a single devcontainer. You interact with the UI via a noVNC browser tab.
The entire stack (Node, Electron, display server, window manager, VNC server, Docker-in-Docker, DBus, keyring) lives in the container. **Nothing is installed on the host.** That's the whole point: every worktree can have its own container and its own experiments, with zero risk of contaminating the user's global installs.
---
pnpm devContainer:dev
runs `scripts/devcontainer-dev.sh` on the host. The script is "smart":
---
| Script | Runs on | Purpose | | ------------------------------------ | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `scripts/devcontainer-dev.sh` | host | Picks a host port, kills stale processes, starts readiness poller, opens browser when ready, `devcontainer exec`s the entrypoint. | | `scripts/devcontainer-entrypoint.sh` | in container | Cleans stale X/VNC state, starts Xvfb, fluxbox, x11vnc, websockify/noVNC, dbus, gnome-keyring, then runs `pnpm start`. | | `scripts/devcontainer-post-start.sh` | in container | `postStartCommand` in `devcontainer.json`. In Codespaces (detected via `$CODESPACES`) it `nohup`-launches the entrypoint in the background so the noVNC preview pane opens without user action. |
---
---
`pnpm start` + electron-forge + Vite + Electron + HMR produce a **lot** of output. The terminal scrollback often exhausts. Three recovery mechanisms are built in:
1. **Written to a file** by the launcher: `~/.cache/toolhive-studio-url`. Survives any amount of output.
cat ~/.cache/toolhive-studio-url
2. **Set as the terminal tab title** via OSC escape. Visible in the tab bar of most terminals regardless of scrollback state. 3. **Prominent banners** in the output — a green initial block right after `devcontainer up`, plus an inverse-video `✓ ToolHive ready — <URL>` banner that fires only once the app is actually usable.
If you're piping the output:
pnpm devContainer:dev 2>&1 | tee /tmp/dev.log # later: grep -E 'ToolHive ready|vnc\.html' /tmp/dev.log
The readiness banner is what you care about. It gates on **three** signals simultaneously:
Only once all three are true does the banner fire and the host's browser auto-open.
---
Each git worktree gets its own independent devcontainer:
**The host is never touched** — no host-side `pnpm install`, no host-side `/tmp/.X11-unix` mount, n
Run any Model Context Protocol (MCP) server — securely, instantly, anywhere. ToolHive is the easiest way to discover, deploy, and manage MCP servers. Launch any MCP server in a locked-down container with just a few clicks.
Repo: stacklok/toolhive-studio
Reproduce and fix bugs using TDD. Use when analyzing a bug report, writing a regression test,…
Deep links in ToolHive Studio. Use when implementing, debugging, or asking about deep link…
Remediate security vulnerabilities found by Grype or pnpm audit. Use when a security scan…
Create new AI agent skills for Claude Code, Codex, and Cursor. Use when asked to create a…
REQUIRED for editing any skill file. Ensures changes sync to Claude, Codex, and Cursor. Never…
Verify API requests in tests. Use when testing that correct API calls are made for create,…