session-containers

session-containers is a skill for Claude Code, Codex from nikzlabs/shipit. It costs 56 tokens per session (4,990 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

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/nikzlabs/shipit/session-containers
Any agent
npx skills add nikzlabs/shipit --skill session-containers
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.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.svg" alt="Measured on agentmods" 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 4,990 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00056 $0.04990
Opus 5 $0.00028 $0.02495
Sonnet 5 $0.00011 $0.00998
Haiku 4.5 $0.00006 $0.00499

Measured 3d ago against content hash 973b6317a747, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 3d 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.

.claude/skills/session-containers/SKILL.md · 399 lines

How it starts

The opening of the file, as written. The whole thing — 399 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
  • Max 10 concurrent runners; evicts oldest idle runner if at capacity
  • 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 · 399 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. 3d 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 (6 stars, last pushed 4d ago), licensed Apache-2.0. It adds 56 tokens to every session and 4,990 once invoked, about $0.0003 per session on Opus 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.

Related

Other skills, from other repositories

tsk-config

Use this skill when the user wants to set up or configure tsk Docker container images, customize their tsk.toml for Docker builds, configure stack/agent/project layers, or troubleshoot tsk container build issues.

dtormoen/tsk-tsk · 46 tokens

cnpg

Create and operate CloudNativePG (CNPG) Postgres databases on Kubernetes the GitOps/Flux way - on managed cloud (GKE + GCS via Workload Identity) OR self-hosted (K3s/bare-metal + any S3-compatible store via a credentials secret). Covers Cluster + ScheduledBackup manifests, barman WAL archiving, pgvector, PITR…

vanducng/skills · 155 tokens

devops

Deployment and infrastructure operations. Use when writing or debugging a Dockerfile, docker build/run, docker compose; running terraform plan/apply/destroy or editing .tf files and modules; using kubectl, debugging pods (CrashLoopBackOff, ImagePullBackOff, OOMKilled), applying manifests, or writing Helm charts…

vanducng/skills · 167 tokens

lanes-sessions

Use when managing Lanes issues or driving Claude Code sessions through the lanes MCP tools — creating issues, starting/stopping/inspecting sessions, batch-launching work across worktrees, reading terminal output, attaching labels and components by UUID, or moving issues across the backlog/todo/in-progress/done…

lanes-sh/app · 99 tokens

lanes-forms

Use when the user wants a form backend or contact form set up (a live POST endpoint that captures submissions and emails them), OR wants an agent to fill in / submit to a form on their behalf. Lanes Forms creates and manages hosted form endpoints from Claude Code. Triggers on "set up a contact form", "provision a…

lanes-sh/app · 105 tokens

github-lanes-bridge

Use when bridging GitHub and Lanes — importing GitHub issues into Lanes for local Claude Code execution, batch-spawning sessions per ticket, decomposing one GitHub issue into multiple Lanes sub-issues with dependencies, or posting session results (PR links, comments, follow-up issues) back to GitHub. Triggers on…

lanes-sh/app · 161 tokens