gtapps/hermitd/docker-customize
Claude Code and agent skill by gtapps/hermitd
- community
Checking that the SKILL.md file is still in the repository.
Route a request to install a tool, binary, package, env var, persistent directory, side service, or personal/third-party skill in the hermit Docker container to the first channel that can carry it. Apt packages go in the Dockerfile operator block; boot-time shell work goes in docker-entrypoint.hermit-local.sh; compose and Dockerfile only when nothing else fits. Activates on messages like "install skills in the container", "install gog in the container", "add an apt package", "download a binary…
Install
npx vskill@latest install gtapps/hermitd/docker-customizeSKILL.md
The same SKILL.md was published earlier as gtapps/hermitd/docker-customize.
Docker Customize
Route each requested change to the surface below. Dockerfile.hermit and docker-compose.hermit.yml are plugin-owned. Their first line says Generated by hermitd <version> and names the four customization surfaces. Host hermitd start, restart and update render copies from .hermit/config.json. Keep both installed files until Convert succeeds on an unconverted install. Update the host plugin if the header names a newer version.
Files sit on the project bind mount, so file preparation can run inside the container or on the host. Locate the current shell with [ -f /.dockerenv ] || [ -f /run/.containerenv ] && echo container || echo host. Run plugin scripts with bun "${CLAUDE_PLUGIN_ROOT}/scripts/<name>.ts" on the host and .hermit/bin/hermitd-run <name> inside the container. Rebuild, restart and Compose validation require the host's Docker CLI. On an existing install, open the host wizard with hermitd setup docker-customize.
For personal and third-party skills, read Personal and third-party skills in Docker and use the routes below for their dependencies.
Apt packages
Add or remove packages through /hermitd:hermit-settings docker, which writes docker.packages using settings-edit and its protected-path prompt. Package names must match ^[a-z0-9][a-z0-9+\-.]+$. Preserve packages the operator already chose.
Rebuild on the host with hermitd restart --build; from stopped, use hermitd start --build. The renderer reads the current list before the build. Removing a package from the list takes effect through that rebuild.
Root and toolchain installs
Put root-only image setup in <project-root>/docker-build.hermit-local.sh. The image runs it with Bash as root after Claude Code and Bun are installed, then returns to USER claude. The file is optional and needs no executable bit. Preserve existing commands. Use set -euo pipefail so a failed install fails the build. For directories under /home/claude, use install -d -o claude -g claude and name every directory it creates, parents included (install -d -o claude -g claude /home/claude/.local /home/claude/.local/share /home/claude/.local/share/tool); it sets ownership only on the paths it names. The image's build context must include this file: if .dockerignore excludes everything by default, add !docker-build.hermit-local.sh.
Run bash -n on the hook. Apply it through the same host rebuild command as apt packages. The plugin never writes this file.
Boot-time shell
Put boot-time work in <project-root>/docker-entrypoint.hermit-local.sh. Persist files under .claude.local/. The managed entrypoint sources it twice:
HERMIT_ENTRY_PHASE=pre-boot: after channel directories and env resolution, before plugin installation.HERMIT_ENTRY_PHASE=pre-launch: immediately beforehermitd-start; side services and last-second overrides.
The hook runs as claude under set -euo pipefail. Anchor paths to ${PROJECT_DIR}. Preserve existing content and guard optional commands with || true. Create it with #!/usr/bin/env bash if absent; it is sourced and needs no executable bit. Check with bash -n, and run session-safe commands once now if needed. hermitd restart applies boot changes without rebuilding.
Volumes, ports and env
Write <project-root>/docker-compose.override.yml, preserving existing operator content. The stack order is base, security overlay if present, then operator override if present; the operator override wins. Use !override for a replacement list and !reset to remove an inherited value, rather than assuming ordinary list merging removes base entries. Keep API keys in .env; keys exported only in the host shell do not reach the container.
Before each validation command on the host, select the files again:
After validation, the operator runs hermitd restart in a host terminal, adding --build when the image changed. The restart shows changed inputs and asks for approval. To review and approve them before restarting, run hermitd approve in the terminal. The override belongs to the operator.
Convert
Convert existing Docker files only as a complete operation. If Dockerfile.hermit already has a first-line Generated by hermitd <version> header, run step 8 only and report nothing to convert.
- Read both installed files and any existing build hook and override. Snapshot
Dockerfile.hermitanddocker-compose.hermit.ymlto timestamped.bakcopies under.hermit/state/. Keep those recovery copies through retries. - Run
bun "${CLAUDE_PLUGIN_ROOT}/scripts/settings-edit.ts" .hermit/config.json migrate browser-default-onon the host. Preserve an existing browser decision. The migration accounts for an operator-installed browser. - Set
docker.git_identity_mountwith settings-edit from the installed compose mount targeting/home/claude/.gitconfig. A custom mount source must also be retained as a replacement in the override. - Reconcile
docker.packageswith the installed project-package apt install stanza, preserving operator-selected packages. Write the reconciled list with settings-edit. Do not guess when a shell expression prevents identifying the packages; report those lines as unplaced. - Render a candidate to a scratch directory inside the project with
bun "${CLAUDE_PLUGIN_ROOT}/scripts/render-docker-templates.ts" <project-root> --to <scratch-dir>. Check the verdict for errors. Keep the installed files untouched. An existing entrypoint is preserved by the renderer. - Diff installed and candidate files. Account for every changed or removed operator line:
- Move custom root commands from the marked customization stanza and root work added after
USER claudeto a candidatedocker-build.hermit-local.sh. Strip DockerfileRUNsyntax into shell commands and omit DockerfileUSERswitches. Convertmkdirunder/home/claudetoinstall -d -o claude -g claude, naming each directory themkdir -pcreated, parents included. Use the boot hook for work intended to run on every boot. - Move added volumes, env and ports to a candidate
docker-compose.override.yml. - Preserve changed or removed base entries through
!overrideor!reset. Validate those tags on the host withdocker compose ... config -q, selecting the scratch base, existing security overlay if present, and candidate override in that order. If validation cannot run or fails, leave the installed files untouched and report the affected lines as unplaced. - Build hook and override candidates as whole files, incorporating any pre-existing operator content verbatim. Never append conversion commands to live files: retries after interruption must not duplicate them. If a conflict prevents retaining existing content verbatim, report it as unplaced. Check the candidate shell hooks with
bash -n.
- Only after every edit is placed and the required checks pass, write the complete candidate hook and override, then run
bun "${CLAUDE_PLUGIN_ROOT}/scripts/render-docker-templates.ts" <project-root> --convertin place. Check its verdict. Otherwise leave both installed Docker files untouched, write no partial migration to operator files, and report each unplaced line in chat. - After a successful
--convert, delete the stale Docker merge state and step 5's scratch directory (omit it when step 5 did not run). Keep every.baksnapshot.
``bash rm -r .hermit/state/evolve-docker <scratch-dir> 2>/dev/null || true rm -f .hermit/state/Dockerfile.hermit.*.upstream* .hermit/state/docker-compose.hermit.yml.*.upstream* \ .hermit/state/pristine/docker/Dockerfile.hermit.template .hermit/state/pristine/docker/docker-compose.hermit.yml.template m=.hermit/state/template-manifest.json [ ! -f "$m" ] || { jq 'del(.files["docker/Dockerfile.hermit.template"], .files["docker/docker-compose.hermit.yml.template"])' "$m" > "$m.tmp" && mv "$m.tmp" "$m"; } || rm -f "$m.tmp" ``
Report where each customization went and the snapshot paths. A retry starts from the installed files and existing operator surfaces and writes whole candidates, preserving previous operator content; the generated-header check makes a completed conversion a no-op. Ask the host to run the next hermitd update to regenerate again, rebuild and restart. An update-launched evolve leaves that build to the waiting host update. Tmux agents skip conversion.
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-customize/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
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-customize)