loom-docker

loom-docker is a skill for Claude Code from cosmix/loom. It costs 9 tokens per session (6,640 once invoked), scanned A, 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 Code

Written for Claude Code: allowed-tools in frontmatter.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is RUN CGO_ENABLED=0 GOOS=linux go build -ldflags='-w -s' -o /app/bin/server ./cmd/server.

Good fit Use it to create and harden container builds, improve build caching, configure services and storage, publish images, and troubleshoot containers.

Compare 6 skills from other repositories ↓
View source ↗ cosmix/loom
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/cosmix/loom
agentmods
npx agentmods add skills/cosmix/loom/loom-docker

Made for: Claude Code.

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/github.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/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 loom-docker

Your own site · 80×15
<a href="https://agentmods.dev/skills/cosmix/loom/loom-docker"><img src="https://agentmods.dev/badge/skills/cosmix/loom/loom-docker.svg" alt="Reviewed on agentmods" width="80" 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 A 0 findings. A grade says what 26 rules found in the file — not that it is safe. ✓ AI security review Sonnet 5 · 7 Sept 2026 📄 Read the review
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.00009 $0.06640
Opus 5.5 $0.00004 $0.02656
Sonnet 5.5 $0.00002 $0.01328
Haiku 4.5 $0.00001 $0.00664

Measured 1mo ago against content hash ee7beaa2a627, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

loom-docker 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 1mo 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.

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. 1mo ago Changed · -33 tokens per session scan C → E ee7beaa2a627
  2. 1mo 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 (63 stars, last pushed 2d ago), licensed MIT. It adds 9 tokens to every session and 6,640 once invoked, about $0.0000 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-30.

Related

Other skills, from other repositories

wrangler

Run or troubleshoot Wrangler CLI commands in projects that have a wrangler.jsonc, wrangler.json, or wrangler.toml file, including local development, Previews, deployment, and resource management. For new projects and projects without a Wrangler configuration file, use the cf CLI instead.

cloudflare/skills · 60 tokens

managing-astro-local-env

Manage local Airflow environment with Astro CLI (Docker and standalone modes). Use when the user wants to start, stop, or restart Airflow, view logs, query the Airflow API, troubleshoot, or fix environment issues. For project setup, see setting-up-astro-project.

astronomer/agents · 63 tokens

aws-cloudformation-ecs

Provides AWS CloudFormation patterns for ECS clusters, task definitions, services, container definitions, auto scaling, blue/green deployments, CodeDeploy integration, ALB integration, service discovery, monitoring, logging, template structure, parameters, outputs, and cross-stack references. Use when creating ECS…

giuseppe-trisciuoglio/developer-kit · 101 tokens

spring-boot-project-creator

Creates and scaffolds a new Spring Boot project (3.x or 4.x) by downloading from Spring Initializr, generating package structure (DDD or Layered architecture), configuring JPA, SpringDoc OpenAPI, and Docker Compose services (PostgreSQL, Redis, MongoDB). Use when creating a new Java Spring Boot project from scratch…

giuseppe-trisciuoglio/developer-kit · 89 tokens

aws-cloudformation-task-ecs-deploy-gh

Provides patterns to deploy ECS tasks and services with GitHub Actions CI/CD. Use when building Docker images, pushing to ECR, updating ECS task definitions, deploying ECS services, integrating with CloudFormation stacks, configuring AWS OIDC authentication for GitHub Actions, and implementing production-ready…

giuseppe-trisciuoglio/developer-kit · 106 tokens

nextjs-deployment

Provides comprehensive patterns for deploying Next.js applications to production. Use when configuring Docker containers, setting up GitHub Actions CI/CD pipelines, managing environment variables, implementing preview deployments, or setting up monitoring and logging for Next.js applications. Covers standalone output…

giuseppe-trisciuoglio/developer-kit · 71 tokens