gtapps/hermitd/docker-setup

Claude Code and agent skill by gtapps/hermitd

Trust tier 3
  • community
  • ext:[{"type":"plugin","description":"Custom plugin integration"}]
Source check pending

Checking that the SKILL.md file is still in the repository.

Host-only, operator-invoked. Generates Docker scaffolding and walks the operator through token setup, build, start, MCP plugin configuration, workspace trust, and verification. Offers to back up and overwrite existing Docker files. Run after /hatch.

Install

npx vskill@latest install gtapps/hermitd/docker-setup

Semi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard

SKILL.md

The same SKILL.md was published earlier as gtapps/hermitd/docker-setup.

Docker Setup

Generate Docker scaffolding for running hermit as an always-on autonomous agent in a container. Docker provides isolation, crash recovery, and a reproducible environment. The default auto mode (classifier-reviewed autonomy) works well for most Docker hermits. Operators who need zero prompts for fully unattended operation can opt into bypassPermissions via /hermit-settings permissions.

Tone: Friendly guided wizard. Celebrate progress. When something fails, help fix it.

Important: Step 0's container check is a hard short-circuit — run it first and abort on container before anything else. After confirming host execution, run docker-preflight.ts once (Step 1) — it gathers all the read-only signals (docker presence, config existence, WSL path, existing docker files, host ~/.gitconfig, auto-memory seed, a live non-Docker owner of the state dir) as a single JSON blob, so don't fan those probes out into separate Bash calls. Reuse its result for the git-identity (Step 4) and auto-memory (Step 5) decisions rather than re-probing. Step 2's project-dependency scan stays normal file reads (Read tool) plus analysis. Everything that mutates state or drives the container (file backups, docker compose, tmux, mkdir/touch setup-mode, status polls) must run strictly sequentially in its documented order — never batch those.

Templates live in ${CLAUDE_SKILL_DIR}/../../state-templates/docker/.

Commands

  • channel-pair: bun ${CLAUDE_PLUGIN_ROOT}/scripts/channel-access.ts "<hermit_state_dir>" pair <channel> <code>
  • channel-policy: bun ${CLAUDE_PLUGIN_ROOT}/scripts/channel-access.ts "<hermit_state_dir>" policy <channel> allowlist
  • channel-show: bun ${CLAUDE_PLUGIN_ROOT}/scripts/channel-access.ts "<hermit_state_dir>" show <channel>
  • channel-ensure-defaults: bun ${CLAUDE_PLUGIN_ROOT}/scripts/channel-access.ts "<hermit_state_dir>" ensure-defaults <channel>
  • channel-bot-id: bun ${CLAUDE_PLUGIN_ROOT}/scripts/channel-bot-id.ts "<hermit_state_dir>" <channel> --write
  • channel-config-merge: bun ${CLAUDE_PLUGIN_ROOT}/scripts/hatch-config.ts "$(pwd)" --reinit

Plan

0. Refuse to run inside the hermit container

This skill is host-only — it generates Docker scaffolding on the host filesystem and drives docker compose up.

Run: [ -f /.dockerenv ] || [ -f /run/.containerenv ] && echo container || echo host

If the output is container, stop immediately — do not proceed to step 1. Print:

For an existing install, run hermitd setup docker-setup from a host terminal at the project root. For a first-time install, open Claude Code on the host and run /hermitd:docker-setup. To pair a channel later, run hermitd setup channel-setup. To check the running container from inside it, run /hermitd:hermit-doctor.
1. Prerequisites

Run the pre-flight probe once and parse its JSON: bun ${CLAUDE_PLUGIN_ROOT}/scripts/docker-preflight.ts "$(pwd)" — pass "$(pwd)" so the auto-memory path key is keyed off the shell's logical path, matching Claude Code even through a symlinked project root. It returns { docker_version, config_exists, is_wsl, existing: {dockerfile, entrypoint, compose}, gitconfig_exists, memory: {path_key, seed_exists}, live_owner }. Hold the result — Steps 4 and 5 reuse gitconfig_exists and memory instead of re-probing. Apply these gates:

  1. If docker_version is null: "Docker isn't installed — grab it from https://docs.docker.com/get-docker/ and come back!"
  2. If config_exists is false: "Run /hermitd:hatch first, then come back."
  3. If is_wsl is true: abort — "Clone inside WSL2 (e.g. /home/you/project) and run from there."
  4. If live_owner is non-null ({ mode, age_secs }): abort: "A live <mode> hermit owns this project's state (activity <age_secs>s ago). Stop it first with hermitd stop (run it from a separate terminal if this session is that hermit), then re-run this skill." Drop the parenthetical when age_secs is null. The container's entrypoint refuses to boot beside it and goes inert, so this must abort before anything is backed up, written, or built. Do not offer to stop it for the operator, and do not suggest HERMIT_FORCE_BOOT=1: that override is for split-state recovery, not for a hermit that is simply still running. If the operator reports that hermitd-stop itself refused ("No tmux session … but state activity Ns ago"), the recorded owner is a stale record, not a live hermit — the liveness it sees is this session's own; have them follow the pgrep -af "claude --channels" line hermitd-stop prints, kill any orphan it names, and re-run hermitd-stop once nothing is left.
  5. If any of existing.dockerfile / existing.entrypoint / existing.compose is true:
  • List them, then ask with AskUserQuestion (header: "Docker files"): No — keep existing (abort; remove or rename manually, then re-run) / Yes — back up (move to docker-backup/ and regenerate).
  • "Yes — back up" → move to docker-backup/, continue
  • "No — keep existing" → abort
  • Never overwrite .env — only append missing vars (step 5).
1.5. Setup mode gate

Determine whether to run in Quick or Advanced mode.

Argument-driven: if invoked with the positional argument quick (e.g. /hermitd:docker-setup quick), skip the question below and run Quick directly. The operator can always re-invoke /hermitd:docker-setup without the arg later to drop into Advanced.

Otherwise, ask:

questions: [
{
header: "Setup mode",
question: "How would you like to configure Docker?",
options: [
{ label: "Quick", description: "OAuth + bridge networking, auto-mirror trusted plugins, build immediately" },
{ label: "Advanced", description: "Full wizard — pick auth, networking, every plugin, every package" }
]
}
]

Quick-mode contract — security non-negotiables. Quick mode never bulk-accepts third-party plugins, never weakens the safelist, never skips the public-repo pre-flight, and never bypasses the write-time assertion. Those gates exist because that's the line where defaults stop being safe. Quick only auto-defaults the choices that have one obviously-correct answer (auth, networking, build-now) and the SAFE plugin batch (claude-plugins-official + gtapps/* — already vetted by the safelist). Minting the long-lived setup token is never one of those auto-defaulted choices — in both Quick and Advanced it's a post-login question at Step 8.

Branch on the choice for the rest of the skill:

  • Advanced → continue at Step 2, asking every question.
  • Quick → apply Quick defaults silently throughout (Step 2 auth+network, Step 7b SAFE mirror, Step 7b.packages safelisted-source auto-accept, Step 8 build-now). The Quick-specific behavior is called out inline at each downstream step.
2. Ask operator and analyze project

Browser choice: read browser.enabled from config now. Default to on unless it is already exactly false. Every setup run records this choice; upgrades also add or remove the managed block through the normal Dockerfile merge.

Quick: silently keep that browser choice and apply auth = oauth-token, docker.network_mode = "bridge". Skip the AskUserQuestion below. Continue at the project-dependencies scan below.

Advanced: ask auth method, networking, and browser choice in a single AskUserQuestion call:

questions: [
{
header: "Auth",
question: "Authentication method for the container?",
options: [
{ label: "Subscription", description: "Log in inside the container — the long-lived setup token is offered right after login (recommended)" },
{ label: "API Key", description: "Set ANTHROPIC_API_KEY in .env — bills per token instead of using a subscription" }
],
},
{
header: "Networking",
question: "Container network mode?",
options: [
{ label: "Bridge", description: "Isolated from host-local services (default)" },
{ label: "Host", description: "Direct access to localhost services — use if hermit needs host-bound services" }
]
},
{
header: "Browser",
question: "Include the hermit’s own browser?",
options: [
{ label: "On (Recommended)", description: "Public sites work without your laptop; full parallel use needs 4 GiB" },
{ label: "Off", description: "Leave browser automation to your existing setup" }
]
}
]

Record the browser answer as browser.enabled (true or false). Record auth choice as auth = oauth-token for Subscription, auth = api-key for API Key. Record networking choice as docker.network_mode ("bridge" or "host").

Project dependencies scan: Scan for signals that suggest extra system packages:

  • package.json native addons (sqlite3, sharp, canvas, bcrypt, etc.)
  • Python files (requirements.txt, pyproject.toml, Pipfile)
  • Build files (Makefile, CMakeLists.txt), version managers (.tool-versions)
  • Database config (prisma, knex, sequelize)
  • OPERATOR.md mentions of tools/stack
  • .claude/settings.json and .claude/settings.local.json permissions.allow entries — allowed Bash commands reveal tools the project expects (e.g. Bash(docker *) → docker CLI, Bash(python *) → python3, Bash(psql *) → postgresql-client). Check for commands that need system packages not in the base image.

Present findings conversationally with reasoning. If nothing found, say so. Collect as provisional candidates — confirmation is deferred to step 7b.packages after plugin selection, where plugin-declared deps are unioned in.

3. Read config and prepare

Read .hermit/config.json and extract:

  • tmux_session_name — resolve {project_name} with actual directory name
  • agent_name
  • Detect project path from pwd
4. Config inputs (rendering deferred to Step 7b.6)

Collect choices for config; the renderer reads only <PROJECT_ROOT>/.hermit/config.json, never stdin or installed Docker files. Do not write templates directly.

  • docker.packages: finalized apt package union from Step 7b.packages.
  • docker.network_mode: "bridge" or "host" from Step 2.
  • docker.recommended_plugins: confirmed entries from Step 7b.
  • docker.git_identity_mount: Step 1 preflight gitconfig_exists. If false, note: "No ~/.gitconfig found; commits inside the container have no host author identity. Create one and enable docker.git_identity_mount, or configure Git inside the container."
  • browser.enabled: Step 2 browser choice. Preserve browser.port on reruns; the renderer puts it on netguard when LAN containment is enabled, otherwise in the base stack.
  • Channel configuration from Step 7 drives state-directory env and mount lines and the managed channel approval drop-in.
  • docker.fleet_mesh: preserve the config value, absent means false. When true, the external volumes and pid namespace holder in docs/always-on.md must exist before startup.

Auth does not affect rendering. API keys belong in .env (env_file delivers them); subscription credentials live on the named volume. Never put the setup token in .env.

5. Auto-memory seed

The Step 1 preflight already resolved memory.path_key (Claude Code's own scheme: every non-alphanumeric character becomes -, dots included, leading dash kept — e.g. -home-user-myproject) and memory.seed_exists (whether MEMORY.md exists under <config-dir>/projects/<path_key>/memory/, where <config-dir> is CLAUDE_CONFIG_DIR when set and ~/.claude otherwise). Reuse those:

  • If `memory.seed_exists` is true: Copy MEMORY.md from that same <config-dir>/projects/<memory.path_key>/memory/ to .hermit/MEMORY-SEED.md. Tell the operator: "Found existing Claude Code memory for this project — seeding it into the container so your hermit starts with full context." Then ensure .hermit/MEMORY-SEED.md is in .gitignore (append if missing).
  • If false: Do nothing. No message, no prompt.

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Extension points

  • pluginCustom plugin integration

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/gtapps/hermitd/docker-setup/badge)](https://verified-skill.com/skills/gtapps/hermitd/docker-setup)

Something wrong with this skill or its page? Tell us.