loom-docker

loom-docker is a skill for Claude Code, Codex from cosmix/loom. It costs 9 tokens per session (6,640 once invoked), scanned E, original, MIT.

A Docker and container guide covers Dockerfiles, Compose configurations, multi-stage builds, image security, networking, storage volumes, registries, and debugging. Containers package an application with the files and tools it needs to run.

In plain words
What is it for?
Use it to create and harden container builds, improve build caching, configure services and storage, publish images, and troubleshoot containers.
Why use it?
It helps avoid oversized, slow, stale, or insecure container images and makes build and runtime problems easier to diagnose.

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/cosmix/loom/loom-docker
Any agent
npx skills add cosmix/loom --skill loom-docker
Clone the repo
git clone --depth 1 https://github.com/cosmix/loom

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 loom-docker

README.md
[![agentmods](https://agentmods.dev/badge/skills/cosmix/loom/loom-docker.svg)](https://agentmods.dev/skills/cosmix/loom/loom-docker)
Your own site
<a href="https://agentmods.dev/skills/cosmix/loom/loom-docker"><img src="https://agentmods.dev/badge/skills/cosmix/loom/loom-docker.svg" alt="Measured on agentmods" height="20"></a>
Per session 9 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,640 The whole file, excluding the scripts and references it only reads on demand.
Security scan E 3 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.00009 $0.06640
Opus 5 $0.00005 $0.03320
Sonnet 5 $0.00002 $0.01328
Haiku 4.5 $0.00001 $0.00664

Measured today against content hash ee7beaa2a627, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade E, and why

loom-docker scanned grade E with 3 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 today.

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.

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

**`set -o pipefail` is needed for piped RUNs — but default `/bin/sh` may lack it.** POSIX `sh` reports only the last command's exit code, so `RUN wget -O- url | sh` exits 0 even when `wget` fails, committing a broken lay

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

- `--no-install-recommends`, clean caches in the same layer (`rm -rf /var/lib/apt/lists/*`).

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

CMD curl -f http://localhost:8000/health || exit 1
skills/loom-docker/SKILL.md · 477 lines

How it starts

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

Docker

Overview

Production-grade containers: Dockerfiles, compose, multi-stage builds, layer/cache optimization, security hardening, registries, debugging. The Expert Practices section below is the highest-value part — it states the mechanism behind each rule, which is what separates correct-but-naive Dockerfiles from production ones. Read it before writing anything non-trivial.

Writing Dockerfiles

Base image: official images; -alpine/-slim/distroless/scratch for runtime; pin by tag AND digest (python:3.12-slim@sha256:..., see Currency), never latest; multi-stage to drop build toolchains.

Layer ordering (cache): least-changing first (base → system deps → dependency manifests → source). Copy dependency manifests and install BEFORE copying source so a code edit doesn't bust the dependency layer — this single ordering rule is the biggest cache win.

Layer hygiene:

  • Keep apt-get update and apt-get install in the SAME RUN — in separate layers Docker reuses a stale cached update index when only the install list changes, silently installing outdated/vulnerable packages (docs call this "cache busting"). Details in Anti-Patterns.
  • --no-install-recommends, clean caches in the same layer (rm -rf /var/lib/apt/lists/*).
  • .dockerignore to keep context small (excludes .git, node_modules, build artifacts) — bloated context slows builds and busts cache.

Runtime & security: non-root numeric USER uid:gid (see Gotchas); --read-only root fs where possible; secrets via RUN --mount=type=secret, never ENV/ARG/COPY (see below); HEALTHCHECK; exec-form CMD/ENTRYPOINT (shell form breaks signals — see Anti-Patterns).

Why ARG/ENV are unsafe for secrets: ARG (incl. --build-arg) and ENV are recorded in image metadata, visible via docker history --no-trunc, docker inspect, and provenance attestations to anyone who can pull; ENV is additionally readable at runtime via /proc/self/environ. Unsetting in a later RUN does NOT scrub it — already committed in the earlier layer. Use RUN --mount=type=secret. ARG/ENV are safe only for non-sensitive values (versions, build flags).

Read the full file on GitHub · 477 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. today Changed · -33 tokens per session scan C → E ee7beaa2a627
  2. 4d ago First seen · 477 lines · 42 tokens per session scan C 3fbd04802a80

Subscribe to this mod's changes

loom-docker is a skill published in the GitHub repository cosmix/loom (54 stars, last pushed today), licensed MIT. It adds 9 tokens to every session and 6,640 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it E with 3 findings (downloads and executes remote code, recursive force delete, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.