Agent skill

Hermes S6 Container Supervision

by johnson7788 in johnson7788/MultiUserClaw

Modify, debug, or extend the s6-overlay supervision tree inside the Hermes Agent Docker image — adding new services, debugging profile gateways, understanding the Architecture B main-program pattern.

MITAuto-check: notesDevOps & Cloud

Install Hermes S6 Container Supervision

skills CLI
$ npx skills add johnson7788/MultiUserClaw --skill hermes-s6-container-supervision -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install johnson7788/MultiUserClaw hermes-s6-container-supervision --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/johnson7788/MultiUserClaw.git skills-src && mkdir -p .claude/skills && cp -r skills-src/hermes-agent/optional-skills/devops/hermes-s6-container-supervision .claude/skills/hermes-s6-container-supervision && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
hermes-s6-container-supervision
GitHub stars
327
Token cost
~2.8k tokens
SKILL.md length
1,011 words
Files
1
Skills in repo
9
Repo updated
First seen
Licence
MIT

At a glance

Modify, debug, or extend the s6-overlay supervision tree inside the Hermes Agent Docker image — adding new services, debugging profile gateways, understanding the Architecture B main-program pattern.

  • Works in 2 steps: cont-init.d scripts receive no CMD args… → /run/s6/basedir/bin/halt does NOT…
  • Tasks that involve Containers
  • SKILL.md covers When to use this skill, Architecture at a glance, Key files and Why Architecture B (CMD as…, plus 3 more sections
  • Calls docker

What it does

Hermes S6 Container Supervision is an agent skill from johnson7788/MultiUserClaw. Modify, debug, or extend the s6-overlay supervision tree inside the Hermes Agent Docker image — adding new services, debugging profile gateways, understanding the Architecture B main-program pattern.

Its SKILL.md is about 2.8k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in DevOps & Cloud, covering Containers and Debugging. It works with Docker. The repository describes itself as: 目前OpenClaw和NanoBot都是用于个人的,不太支持多用户,基于多用户重新修改Bot,没有对Openclaw进行任何更改,原生能力封装. The licence is MIT.

When your agent uses it

  • Tasks that involve Containers
  • Tasks that involve Debugging

Example prompts

  • “/hermes-s6-container-supervision”

Requirements

  • Docker

Workflow steps

2 steps, taken from the first numbered list in SKILL.md.

  1. cont-init.d scripts receive no CMD args — so the stage2 hook can't parse docker run chat -q "hi" to set HERMES_ARGS for a service run…
  2. /run/s6/basedir/bin/halt does NOT propagate the exit code written to /run/s6-linux-init-container-results/exitcode. Containers always exit…

What it can do on your machine

Read from SKILL.md and the folder at commit 2f88dfa. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • docker

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Hermes S6 Container Supervision loads about 2.8k tokens when it runs. Until then it costs about 58 tokens; SKILL.md has 1,011 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~58
When it runs · the whole SKILL.md, loaded when a task matches
~2.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:37
    │   │   ├── seed .env / config.yaml / SOUL.md

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from johnson7788/MultiUserClaw at commit 2f88dfa, republished under its MIT licence (© johnson7788). 1,011 words, ~2,810 tokens.

Download SKILL.mdSave it as .claude/skills/hermes-s6-container-supervision/SKILL.md (or your agent's skills folder).
name
hermes-s6-container-supervision
description
Modify, debug, or extend the s6-overlay supervision tree inside the Hermes Agent Docker image — adding new services, debugging profile gateways, understanding the Architecture B main-program pattern.
version
1.0.0
author
Hermes Agent
license
MIT
platforms
linux
environments
s6

Hermes s6-overlay Container Supervision

When to use this skill

Load this skill when you're working on:

  • Adding or removing a static service in the Hermes Docker image (something that should be supervised at every container start, like the dashboard)
  • Diagnosing why a per-profile gateway isn't starting, restarting, or surviving docker restart
  • Understanding why the container's CMD is /opt/hermes/docker/main-wrapper.sh and how leading-dash args reach the user's program
  • Modifying cont-init.d boot scripts (UID remap, volume seeding, profile reconciliation)
  • Changing the rendered run-script for per-profile gateways (Phase 4)

If you're just running the Hermes Agent and want to use Docker, see website/docs/user-guide/docker.md instead.

Architecture at a glance

/init                                  ← PID 1 (s6-overlay v3.2.3.0)
├── cont-init.d                        ← oneshot setup, runs as root
│   ├── 01-hermes-setup                ← docker/stage2-hook.sh
│   │   ├── UID/GID remap
│   │   ├── chown /opt/data
│   │   ├── chown /opt/data/profiles (every boot)
│   │   ├── seed .env / config.yaml / SOUL.md
│   │   └── skills_sync.py
│   └── 02-reconcile-profiles          ← hermes_cli.container_boot
│       ├── chown /run/service (hermes-writable for runtime register)
│       └── walk $HERMES_HOME/profiles/<name>/gateway_state.json
│           → recreate /run/service/gateway-<name>/
│           → auto-start only those with prior_state == "running"
│
├── s6-rc.d (static services, in /etc/s6-overlay/s6-rc.d/)
│   ├── main-hermes/run                ← exec sleep infinity (no-op slot)
│   └── dashboard/run                  ← if HERMES_DASHBOARD=1, runs `hermes dashboard`
│
├── /run/service (s6-svscan watches; tmpfs)
│   ├── gateway-coder/                 ← runtime-registered per-profile
│   │   ├── type        ("longrun")
│   │   ├── run         ("#!/command/with-contenv sh ... exec s6-setuidgid hermes hermes -p coder gateway run")
│   │   ├── down        (marker — present means "registered but don't auto-start")
│   │   └── log/run     (s6-log → $HERMES_HOME/logs/gateways/coder/current)
│   └── ...
│
└── CMD ("main program")               ← /opt/hermes/docker/main-wrapper.sh
    └── routes user args: bare exec | hermes subcommand | hermes (no args)
        — exec'd by /init with stdin/stdout/stderr inherited (TTY for --tui)

Key files

PathRole
Dockerfiles6-overlay install + cont-init.d wiring + ENTRYPOINT ["/init", "/opt/hermes/docker/main-wrapper.sh"]
docker/stage2-hook.shThe "old entrypoint logic" — UID remap, chown, seed, skills sync. Runs as cont-init.d/01-hermes-setup.
docker/cont-init.d/02-reconcile-profilesCalls hermes_cli.container_boot on every boot to restore profile gateway slots from the persistent volume.
docker/main-wrapper.shThe container's CMD. Routes user args, drops to hermes via s6-setuidgid, exec's the chosen program.
docker/s6-rc.d/main-hermes/runNo-op sleep infinity — slot exists so the s6-rc user bundle is valid; main hermes runs as the CMD, not as a supervised service.
docker/s6-rc.d/dashboard/runConditional service — exec sleep infinity unless HERMES_DASHBOARD is truthy.
docker/entrypoint.shBack-compat shim that execs the stage2 hook. External scripts that hard-coded the old entrypoint path still work.
hermes_cli/service_manager.pyS6ServiceManager: register_profile_gateway, unregister_profile_gateway, start/stop/restart/is_running, list_profile_gateways.
hermes_cli/container_boot.pyreconcile_profile_gateways() — walks persistent profiles, regenerates s6 slots, emits container-boot.log.
hermes_cli/gateway.py::_dispatch_via_service_manager_if_s6Intercepts hermes gateway start/stop/restart and routes to s6 when running in a container.

Why Architecture B (CMD as main program, not s6-supervised)

The original plan (v1–v3) called for main hermes to run as a supervised s6-rc service. Two real s6-overlay v3 mechanics blocked that:

  1. cont-init.d scripts receive no CMD args — so the stage2 hook can't parse docker run <image> chat -q "hi" to set HERMES_ARGS for a service run script to consume.
  2. /run/s6/basedir/bin/halt does NOT propagate the exit code written to /run/s6-linux-init-container-results/exitcode. Containers always exit 143 (SIGTERM) regardless. Confirmed by skarnet (s6 author) in issue #477: "if you want a container shutdown, you need to either have your CMD exit, or, if you have no CMD, write the container exit code you want then call halt".

So we use the s6-overlay-native CMD pattern: ENTRYPOINT ["/init", "/opt/hermes/docker/main-wrapper.sh"]. /init prepends the wrapper to user args automatically — so docker run <image> --version becomes /init main-wrapper.sh --version, and --version doesn't get intercepted by /init's POSIX shell. The wrapper drops to hermes via s6-setuidgid, then exec's the chosen program. The program's exit code becomes the container exit code, exactly matching the pre-s6 tini contract.

Trade-off: main hermes is unsupervised under s6. That exactly matches its behavior under tini (the pre-s6 image). Dashboard supervision is the only new guarantee — and per-profile gateways under /run/service/ get full supervision.

Quick recipes

Verify s6 is PID 1 in a running container
sh
docker exec <c> sh -c 'cat /proc/1/comm; readlink /proc/1/exe'
# Expect: s6-svscan or init / /package/admin/s6/.../s6-svscan
Inspect a profile gateway service
sh
# /command/ isn't on docker-exec PATH — use absolute path
docker exec <c> /command/s6-svstat /run/service/gateway-<name>
# "up (pid …) … seconds"            → running
# "down (exitcode N) … seconds, normally up, want up, …" → s6 wants it up but the process keeps exiting (crash loop)
# "down … normally up, ready …"     → user stopped it
Bring a service up/down manually
sh
docker exec <c> /command/s6-svc -u /run/service/gateway-<name>   # up
docker exec <c> /command/s6-svc -d /run/service/gateway-<name>   # down
docker exec <c> /command/s6-svc -t /run/service/gateway-<name>   # SIGTERM (restart)
Watch the cont-init reconciler log
sh
docker exec <c> tail -n 50 /opt/data/logs/container-boot.log
# 2026-05-21T06:18:05+0000 profile=coder prior_state=running action=started
# 2026-05-21T06:18:05+0000 profile=writer prior_state=stopped action=registered
Add a new static service
  1. Create docker/s6-rc.d/<name>/type with longrun\n and docker/s6-rc.d/<name>/run (use #!/command/with-contenv sh + # shellcheck shell=sh).
  2. Drop to hermes via s6-setuidgid hermes at the top of run (unless you specifically need root).
  3. Create empty docker/s6-rc.d/<name>/dependencies.d/base so it waits for the base bundle.
  4. Create empty docker/s6-rc.d/user/contents.d/<name> so it joins the user bundle.
  5. The COPY docker/s6-rc.d/ in the Dockerfile picks it up automatically — no other changes.
Change the per-profile gateway run command

Edit S6ServiceManager._render_run_script in hermes_cli/service_manager.py. The function is also called by hermes_cli/container_boot.py::_register_service during boot reconciliation, so it's the single source of truth. Update the corresponding assertion in tests/hermes_cli/test_service_manager.py::test_s6_register_creates_service_dir_and_triggers_scan.

Run the docker test harness
sh
docker build -t hermes-agent-harness:latest .
HERMES_TEST_IMAGE=hermes-agent-harness:latest scripts/run_tests.sh tests/docker/ -v
# Expect 19 passed, 0 xfailed against the s6 image

The harness lives in tests/docker/ and skips when Docker isn't available. The per-test timeout is bumped to 180s (see tests/docker/conftest.py).

Show full SKILL.md (405 more words)Show less

Common pitfalls

"command not found" via docker exec

/command/ (where s6-overlay puts its binaries) is on PATH only for processes spawned by the supervision tree — services, cont-init.d, main-wrapper.sh. docker exec <c> s6-svstat … will fail with "command not found"; always use the absolute path /command/s6-svstat. The hermes binary works because the Dockerfile adds /opt/hermes/.venv/bin to the runtime ENV PATH.

Profile directory ownership

The cont-init reconciler runs as hermes (s6-setuidgid hermes in 02-reconcile-profiles). If a profile dir ends up root-owned (e.g. because docker exec <c> hermes profile create … ran as root by default), the reconciler can't read SOUL.md and fails with PermissionError. Mitigation: stage2-hook.sh chowns $HERMES_HOME/profiles to hermes on every boot, idempotently. Don't remove that block.

Files written by docker exec are root-owned

docker exec defaults to root. Either pass --user hermes or rely on the stage2 chown sweep next reboot. Don't write files under $HERMES_HOME/profiles/<name>/ as root manually — the next reconcile pass will sweep them but in-flight operations may hit perm errors.

Service slot exists but s6-svstat says "s6-supervise not running"

The service directory is on tmpfs and was wiped on container restart. Either the cont-init reconciler hasn't run yet (give it a moment after docker restart) or it failed. Check docker logs <c> | grep '02-reconcile'.

Gateway starts then immediately exits (down (exitcode 1) in svstat)

Most likely the profile has no model or auth configured. The service slot is correct — the gateway itself is unconfigured. Run hermes -p <profile> setup first. The s6 supervisor will keep restarting it; that's the desired behavior (when you fix the config, the next attempt succeeds and stays up).

Reconciler skipped a profile

The reconciler keys on the presence of SOUL.md as the "real profile" marker. hermes profile create always seeds it. If a profile dir is missing SOUL.md (stray directory, partial restore, backup-in-progress), the reconciler skips it intentionally. Add a SOUL.md (even empty) to opt back in.

"Help, the container exits 143!"

Check whether something is invoking s6-svscanctl -t or /run/s6/basedir/bin/halt — both cause /init to begin stage 3 shutdown but return 143 (SIGTERM) rather than the desired exit code. This was the Phase 2 architecture pivot from A to B. For container shutdown with a real exit code, you must let the CMD (main-wrapper.sh) exit normally; do not try to control exit from a finish script.

  • hermes-agent-dev: General hermes-agent codebase navigation
  • hermes-tool-quirks: Specific Hermes-tool workarounds (sed/grep/etc.) — load when debugging the s6 stack's interaction with hermes built-in tools.

© johnson7788, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in hermes-agent/optional-skills/devops/hermes-s6-container-supervision of johnson7788/MultiUserClaw.

Open the folder on GitHubat commit 2f88dfa

Compare with similar skills

Hermes S6 Container Supervision next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Hermes S6 Container Supervision compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Hermes S6 Container Supervision this skilljohnson7788/MultiUserClaw327—~2.8kAutomated safety check: NotesMIT
Borg Live Debugkaranhudia/borg-ui1.7k—~1.4kAutomated safety check: NotesAGPL-3.0
.NET Crash Dump Collectiondotnet/skills5.6k2 repos~1.1kAutomated safety check: PassMIT
Medusa Cloud Local Buildmedusajs/medusa-agent-skills228—~1kAutomated safety check: NotesNone
Debug Firewallgithub/gh-aw-firewall149—~1.2kAutomated safety check: NotesMIT
Deploying To Azuremicrosoft-foundry/foundry-agent-webapp127—~2.2kAutomated safety check: WarnMIT

Similar skills

  • Borg Live Debug

    karanhudia/borg-ui

    Live Borg debugging by exec-ing into the borg-web-ui Docker container.

    1.7k GitHub stars~1.4k tokensUpdated yesterday
    DevOps & CloudAuto-check: notes
  • Official

    Configures automatic crash dumps or captures dumps from running processes for modern .NET apps on Linux, macOS and Windows, including Docker and Kubernetes.

    5.6k GitHub starsUsed in 2 repos~1.1k tokens
    DevOps & CloudAuto-check passed
  • Medusa Cloud Local Build

    medusajs/medusa-agent-skills

    Reproduces a Medusa Cloud build on your machine with mcloud local build, to debug build-failed deployments without pushing or waiting on Cloud.

    228 GitHub stars~1k tokensUpdated 6 days ago
    DevOps & CloudAuto-check: notes
  • Debug Firewall

    github/gh-aw-firewall

    Official

    Debug the AWF firewall by inspecting Docker containers (awf-squid, awf-agent), analyzing Squid access logs, checking iptables rules, and troubleshooting blocked domains or network issues.

    149 GitHub stars~1.2k tokensUpdated today
    DevOps & CloudAuto-check: notes
  • Deploying To Azure

    microsoft-foundry/foundry-agent-webapp

    Provides deployment commands and troubleshooting for Azure Container Apps.

    127 GitHub stars~2.2k tokensUpdated 5 mo ago
    DevOps & CloudAuto-check: warnings
  • Dotnet Debugging

    novotnyllc/dotnet-artisan

    Debugs Windows and Linux/macOS applications (native, .NET/CLR, mixed-mode) with WinDbg MCP (crash dumps, !analyze, !syncblk, !dlk, !runaway, !dumpheap, !gcroot, BSOD), dotnet-dump, lldb with SOS…

    232 GitHub stars~2.1k tokensUpdated 3 days ago
    DevelopmentAuto-check passed

More from johnson7788/MultiUserClaw

All 9 skills in this repo
  • Hyperframes

    johnson7788/MultiUserClaw

    Create HTML-based video compositions, animated title cards, social overlays, captioned talking-head videos, audio-reactive visuals, and shader transitions using HyperFrames.

    327 GitHub stars~3.6k tokensUpdated 1 mo ago
    Auto-check passed
  • Osint Investigation

    johnson7788/MultiUserClaw

    Public-records OSINT investigation framework — SEC EDGAR filings, USAspending contracts, Senate lobbying, OFAC sanctions, ICIJ offshore leaks, NYC property records (ACRIS), OpenCorporates…

    327 GitHub stars~3k tokensUpdated 1 mo ago
    Auto-check passed
  • Powerpoint

    johnson7788/MultiUserClaw

    Create, read, edit .pptx decks, slides, notes, templates. An agent skill from johnson7788/MultiUserClaw.

    327 GitHub stars~2.3k tokensUpdated 1 mo ago
    Auto-check passed
  • Computer Use

    johnson7788/MultiUserClaw

    Drive the user's desktop in the background — clicking, typing, scrolling, dragging — without stealing the cursor, keyboard focus, or switching virtual desktops / Spaces.

    327 GitHub starsUsed in 1 repo~2.8k tokens
    Auto-check: warnings
  • Hermes Agent Skill Authoring

    johnson7788/MultiUserClaw

    Author in-repo SKILL.md: frontmatter, validator, structure, and writing-quality principles.

    327 GitHub stars~2.7k tokensUpdated 1 mo ago
    Auto-check passed
  • Plan

    johnson7788/MultiUserClaw

    Plan mode: write an actionable markdown plan to .hermes/plans/, no execution.

    327 GitHub stars~2.2k tokensUpdated 1 mo ago
    Auto-check passed

Works with

Questions about Hermes S6 Container Supervision

What does Hermes S6 Container Supervision do?

Modify, debug, or extend the s6-overlay supervision tree inside the Hermes Agent Docker image — adding new services, debugging profile gateways, understanding the Architecture B main-program pattern. Hermes S6 Container Supervision is an agent skill from johnson7788/MultiUserClaw. Modify, debug, or extend the s6-overlay supervision tree inside the Hermes Agent Docker image — adding new services, debugging profile gateways, understanding the Architecture B main-program pattern.

When should I use Hermes S6 Container Supervision?

Hermes S6 Container Supervision fits situations like: tasks that involve Containers; tasks that involve Debugging.

How do I install Hermes S6 Container Supervision in Claude Code?

Run `npx skills add johnson7788/MultiUserClaw --skill hermes-s6-container-supervision -a claude-code`. Or copy the skill folder (hermes-agent/optional-skills/devops/hermes-s6-container-supervision in johnson7788/MultiUserClaw) into .claude/skills/hermes-s6-container-supervision in your project. Claude Code loads it when a task matches its description.

How do I install Hermes S6 Container Supervision in Codex?

Run `npx skills add johnson7788/MultiUserClaw --skill hermes-s6-container-supervision -a codex`. Or copy the skill folder (hermes-agent/optional-skills/devops/hermes-s6-container-supervision in johnson7788/MultiUserClaw) into .agents/skills/hermes-s6-container-supervision in your project. Codex loads it when a task matches its description.

Can I use Hermes S6 Container Supervision in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add johnson7788/MultiUserClaw --skill hermes-s6-container-supervision -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/hermes-s6-container-supervision, .gemini/skills/hermes-s6-container-supervision, .github/skills/hermes-s6-container-supervision and .opencode/skills/hermes-s6-container-supervision in your project.

What does Hermes S6 Container Supervision need to run?

Going by SKILL.md and its folder, Hermes S6 Container Supervision needs the command-line tools its instructions call (docker). Our summary lists: Docker.

Does Hermes S6 Container Supervision access the network?

SKILL.md names 1 domain. As links in the text: github.com. This is read from the text; nothing was executed.

Is Hermes S6 Container Supervision safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Hermes S6 Container Supervision use?

Hermes S6 Container Supervision is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Hermes S6 Container Supervision use?

About 2.8k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Hermes S6 Container Supervision?

Skills that share tags, products or a category with Hermes S6 Container Supervision: Borg Live Debug (karanhudia/borg-ui, 1.7k stars), .NET Crash Dump Collection (dotnet/skills, 5.6k stars), Medusa Cloud Local Build (medusajs/medusa-agent-skills, 228 stars) and Debug Firewall (github/gh-aw-firewall, 149 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Hermes S6 Container Supervision?

johnson7788 (a GitHub user) maintains it in johnson7788/MultiUserClaw, which has 327 GitHub stars. The repository holds 9 skills in this directory. The repository was last updated on August 13, 2026.

Source: johnson7788/MultiUserClaw on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.