agentleFS
filipe-camposfilipe-campos/walph/.claude/skills/containers/SKILL.md

containers

Skill9 starsChanged 4 days agoMITView on GitHub

Containers screen patterns: docker CLI owned per view (ipc/docker.ts, src/main/docker), process groups and one-shot tracking, id/compose validation, untrusted docker output sent to Claude, the containers takeover in the renderer and the fake docker for E2E. Use when creating or reviewing anything in src/main/docker, ipc/docker.ts or the containers screen.

9 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use observability.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • OpenAISkill

    observability

    Vercel Observability expert guidance — Drains (logs, traces, speed insights, web analytics), Web Analytics, Speed Insights, runtime logs, custom events, OpenTelemetry integration, and monitoring dashboards. Use when instrumenting, debugging, or optimizing application performance and user experience on Vercel.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 5 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Every docker process is spawned as a process group and owned by a view (or by the shared ps cache).

    line 8
  2. Very specific:

    EVERY docker process is an own process group (process/spawnGroup.ts, killed on timeout, view navigate/destroy and will-quit via …

    line 23

“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Containers (src/main/docker, ipc/docker.ts)

Every docker process is spawned as a process group and owned by a view (or by the shared ps cache).

Containers

  • ipc/docker.ts is wiring only (channels, validation, delegation). The docker CLI runs from the user-only docker.path (empty = docker of the login-shell PATH, docker/executable.ts; .cmd/.bat rejected on Windows). Modules in docker/: run.ts (specFor, spawnLive, run, the oneShots registry), viewState.ts (per-view ViewState: last ps, stats/logs streams, logSeq; stopStatsOf/stopLogsOf; the onViewReset stop), statsStream.ts / logsStream.ts (classes with start/stop, injected spawn, tested with testing/fakeGroupProcess.ts and fake timers), streams.ts (startStats, followLogs: spec + send + view state), ps.ts (fetchPs, shared psCache), commands.ts (info, actions, compose, inspect, investigation prompt), composeTarget.ts (members → validated working dir and files), exec.ts (dockerExecCommand, terminal source).
  • docker/** never imports from claude/**: the executable comes from env/executable.ts resolveExecutable, the env from env/childEnv.ts buildChildEnv and the PATH from env/loginShell.ts effectivePath().
  • Stream lines (logs -f, stats) are split with util/lineSplitter.ts createLineSplitter (CRLF aware, capped line).
  • EVERY docker process is an own process group (process/spawnGroup.ts, killed on timeout, view navigate/destroy and will-quit via killAllSpawnedGroups): continuous ones (stats, logs -f) through spawnLive, one-shot commands (run: compose up, actions, inspect…) through runCollect (process/runCollect.ts) with group: true and owner: oneShots.scope(sender); run only classifies the result into DockerError. One-shots are tracked in the view (oneShots registry in run.ts), killed on view reset and block hibernation (eviction guard docker) while running, except the shared ps (psCache), which belongs to no view; stats and logs -f are per view and only while the screen / the detail is open (logSeq is bumped even before the follow spawns, so a stop during specFor never leaves an orphan).
  • logs -f batches lines per LOGS_BATCH_MS tick (at most LOGS_BATCH_MAX per tick; the excess waits for the next tick, nothing is dropped). Above LOGS_HIGH_WATERMARK queued lines both pipes are paused (a main-side throughput cap, there is no renderer ack) until the queue falls to LOGS_LOW_WATERMARK; on exit the whole queue is delivered before docker:logsEnd.
  • Stdout over MAX_BUFFER (16 MB, runCollect maxBuffer with the default onOverflow: 'kill') kills the process and fails with DockerError reason outputTooLarge; it is never truncated silently. Stderr keeps only a bounded tail (verbose compose builds are not a failure).
  • Ids from the renderer pass resolveContainerRef (12–64 hex or a name from that view's last ps) and always go after --; compose dirs/files come only from the container labels and must exist.
  • Docker 27 with the daemon stopped exits 0 on info with an empty ServerVersion (parseInfo.ts → daemonDown); errors carry their DockerInfoError (DockerError), never reclassify the translated message.
  • Docker output in the Claude prompt is untrusted: investigation.ts delimited/truncated blocks, env values never leave main, secrets in the command masked (maskSecrets.ts).
  • Renderer: the takeover is screen: 'workbench' | 'containers' (NOT view, never in the session); everything else stays mounted and hidden (.workbench.takeover), toasts portal to body, Claude sessions don't count as seen while on containers, and executeCommand leaves the screen first for editor/tab commands (⌘W only leaves it; the registerOverlayPolicy in dockerActions.ts, registered by startDockerReactions).
  • E2E use e2e/fixtures/fake-docker.mjs (state in WALPH_FAKE_DOCKER_STATE, .calls.jsonl/.pids beside it).

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.