shipit: Skill for Claude Code

.agents/skills/session-containers/SKILL.md

session-containers is a skill for Claude Code, Codex from nikzlabs/shipit. It costs 56 tokens per session (6,363 once invoked), scanned A, original, Apache-2.0.

A skill for managing Docker containers that host coding sessions and the runners that communicate with them. It covers creating, monitoring, reusing, disposing of, and shutting down those sessions.

In plain words
What is it for?
Use it when creating or destroying session containers, tracking runner state, cleaning up idle or orphaned containers, monitoring health, reconnecting sessions, or debugging container behavior.
Why use it?
It keeps container and session state coordinated, including cases where an idle container was removed or a connection must be restored.

Skill for Claude CodeCodex

Written for Claude Code: user-invocable in frontmatter. Also seen: mentions CLAUDE.md; mentions subagents; installed under .agents/ (shared by several agents).

This is nikzlabs/shipit's own configuration. It tells Claude Code and Codex how to work on shipit itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything shipit configures →

Reuse

Borrowing it

Nothing to install: this file belongs to nikzlabs/shipit. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/nikzlabs/shipit/main/.agents/skills/session-containers/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/nikzlabs/shipit

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for session-containers

README.md
[![agentmods](https://agentmods.dev/badge/skills/nikzlabs/shipit/session-containers/github.svg)](https://agentmods.dev/skills/nikzlabs/shipit/session-containers)
Your own site
<a href="https://agentmods.dev/skills/nikzlabs/shipit/session-containers"><img src="https://agentmods.dev/badge/skills/nikzlabs/shipit/session-containers/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for session-containers

Your own site · 80×15
<a href="https://agentmods.dev/skills/nikzlabs/shipit/session-containers"><img src="https://agentmods.dev/badge/skills/nikzlabs/shipit/session-containers.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 56 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,363 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00056 $0.06363
Opus 5.5 $0.00022 $0.02545
Sonnet 5.5 $0.00011 $0.01273
Haiku 4.5 $0.00006 $0.00636

Measured 8d ago against content hash 2d37cef4b976, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

session-containers scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/session-containers/SKILL.md · 453 lines

How it starts

The opening of the file, as written. The whole thing — 453 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Session Containers & Runners

This skill covers Docker container management, session runners, idle disposal, and reconnection. For session creation/activation/switching, see the session-lifecycle skill.

Key Components

Component Location Role
SessionRunner orchestrator/session-runner.ts In-process implementation (test-only). Spawns agent/terminal directly
ContainerSessionRunner orchestrator/container-session-runner.ts Production implementation. Delegates to per-session Docker container via HTTP+SSE
SessionContainerManager orchestrator/session-container.ts Docker orchestration: create, destroy, health monitor, orphan cleanup
SessionRunnerRegistry orchestrator/session-runner.ts App-level map of session ID -> runner

Runner Lifecycle

SessionRunnerRegistry

  • Maintains Map<string, SessionRunnerInterface> (session ID -> runner)
  • getOrCreate(sessionId, sessionDir, agentId):
    1. Return existing non-disposed runner if found
    2. Call runner factory to create new runner
    3. Register "disposed" listener for auto-cleanup from map
    4. Wire runner.on("idle") -> onRunnerIdle(sessionId) callback
  • get(sessionId): Returns runner if exists and not disposed
  • No runner-count cap; reclaim is memory-budget driven (see Idle Container Cleanup)
  • disposeAll(opts?) for graceful shutdown and full reset. Forced — it kills running agents unless the caller passes { preserveAgent: true }, which shutdown does and full reset does not

Runner Factory (Production)

buildRunnerFactory() (in app-lifecycle.ts) handles three cases, keyed on the container's current status. A pre-booted standby container (warm pool — see the session-lifecycle skill) shows up here as an existing container that is running or starting, so it's just a data condition on these same cases — there is no separate "warm" code path.

factory(opts):
  existing = containerManager.get(opts.sessionId)

  CASE 1: existing && status === "running"          (incl. a ready standby)
    -> mgr.claimStandby(sessionId)                  (clears standby flag if set)
    -> Reconnect: new ContainerSessionRunner({ workerUrl: existing.workerUrl })
    -> No container creation -- SSE replay delivers current state. Instant.

  CASE 2: existing && status === "starting"         (standby still booting)
    -> runner = new ContainerSessionRunner({ workerUrl: "http://0.0.0.0:0" })
    -> poll up to 30s (500ms): once running -> claimStandby + setWorkerUrl
       if it never becomes ready -> fall through to a fresh create
    (returns runner immediately; the poll runs in a fire-and-forget async block)

  CASE 3: no existing container, OR stale (stopping/stopped)
    -> runner = new ContainerSessionRunner({ workerUrl: "http://0.0.0.0:0" })
    -> createContainerForRunner({ destroyExisting: !!existing })
       (destroys the stale one first, then mgr.create + runner.setWorkerUrl)

Read the full file on GitHub · 453 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago Changed · +2 lines 2d37cef4b976
  2. 28d ago Changed 8d7e35c96254
  3. 1mo ago Changed · -8 lines f433e74b72ab
  4. 1mo ago Changed · +60 lines e83933a0e65f
  5. 1mo ago First seen · 399 lines · 56 tokens per session scan A 973b6317a747

Subscribe to this mod's changes

session-containers is a skill published in the GitHub repository nikzlabs/shipit (9 stars, last pushed today), licensed Apache-2.0. It adds 56 tokens to every session and 6,363 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.