gtapps/hermitd/docker-setup
Claude Code and agent skill by gtapps/hermitd
- community
- ext:[{"type":"plugin","description":"Custom plugin integration"}]
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-setupSemi-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> allowlistchannel-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> --writechannel-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, runhermitd setup docker-setupfrom 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, runhermitd 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:
- If
docker_versionis null: "Docker isn't installed — grab it from https://docs.docker.com/get-docker/ and come back!" - If
config_existsis false: "Run/hermitd:hatchfirst, then come back." - If
is_wslis true: abort — "Clone inside WSL2 (e.g./home/you/project) and run from there." - If
live_owneris non-null ({ mode, age_secs }): abort: "A live<mode>hermit owns this project's state (activity<age_secs>s ago). Stop it first withhermitd stop(run it from a separate terminal if this session is that hermit), then re-run this skill." Drop the parenthetical whenage_secsis 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 suggestHERMIT_FORCE_BOOT=1: that override is for split-state recovery, not for a hermit that is simply still running. If the operator reports thathermitd-stopitself 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 thepgrep -af "claude --channels"linehermitd-stopprints, kill any orphan it names, and re-runhermitd-stoponce nothing is left. - If any of
existing.dockerfile/existing.entrypoint/existing.composeis 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:
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:
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.jsonnative 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.jsonand.claude/settings.local.jsonpermissions.allowentries — 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 nameagent_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 preflightgitconfig_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. Preservebrowser.porton 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 indocs/always-on.mdmust 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.mdfrom 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.mdis 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
- SKILL.md in the repositoryCheckingplugins/hermitd/skills/docker-setup/SKILL.md
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
[](https://verified-skill.com/skills/gtapps/hermitd/docker-setup)