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.
npx agentmods add skills/cosmix/loom/loom-dockernpx skills add cosmix/loom --skill loom-dockergit clone --depth 1 https://github.com/cosmix/loomWrote 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.
[](https://agentmods.dev/skills/cosmix/loom/loom-docker)<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>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.
| Model | Per session | Once 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 |
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 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 updateandapt-get installin the SAMERUN— in separate layers Docker reuses a stale cachedupdateindex 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/*)..dockerignoreto 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/ENVare unsafe for secrets:ARG(incl.--build-arg) andENVare recorded in image metadata, visible viadocker history --no-trunc,docker inspect, and provenance attestations to anyone who can pull;ENVis additionally readable at runtime via/proc/self/environ. Unsetting in a laterRUNdoes NOT scrub it — already committed in the earlier layer. UseRUN --mount=type=secret.ARG/ENVare safe only for non-sensitive values (versions, build flags).
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.
- today Changed · -33 tokens per session scan C → E ee7beaa2a627
- 4d ago First seen · 477 lines · 42 tokens per session scan C 3fbd04802a80
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.
Other skills, from other repositories
hardcoded-secret
A bundle that leaks a real credential. This must never publish.
code-review
Perform thorough code reviews focusing on correctness, security, and maintainability.
checkpointed-workflow
Use when the user asks to assemble and validate a checkpointed report bundle.
deterministic-transform
Use when the user asks to transform a JSON data file deterministically.
document-formatter
Use when the user asks to format a document against the house style guide.
dangerous-skill
Example skill that demonstrates security scanner detection.