agentleFS
alexderzalexderz/agentic-toolbox/skills/lang-docker/SKILL.md

lang-docker

Skill5 starsChanged 46 days agoMITView on GitHub

use this when writing or reviewing Dockerfiles, *.dockerfile, or compose files. do not use as a substitute for shell-safety on a real .sh file.

  • Pipes a download into a shell

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    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:

    If CMD/ENTRYPOINT changed, run a throwaway container far enough to prove the binary starts.

    line 45
  2. Very specific:

    No publish on 0.0.0.0 without asking.

    line 60

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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

Dockerfile

No scripts/. Process skills that may load with this one, and the skill for .sh files: language-router Load-with list, Map.

Iron law

Non-root. Pinned bases. No secrets in layers.

Tooling / verify

docker build -t tmp-check .
docker compose config    # when compose changed
# hadolint if the repo already has it

Grep the Dockerfile for curl |, latest, and ENV/ARG that look like keys.

Idioms a linter misses

  • Multi-stage so compilers die in the builder stage.
  • COPY --from with explicit paths.
  • .dockerignore covers .git and secrets.
  • ARG for build-only; ENV for runtime. Neither holds secrets.
  • One process per container. Do not add a supervisor "to run two things" unless compose already defines that pattern.
  • HEALTHCHECK only if the project already uses them.
  • RUN apt: update + install + clean in one layer if that is the file's style. No || true on apt.

Errors

  • A failed RUN must fail the build.

Testing

  • Build the image.
  • If CMD/ENTRYPOINT changed, run a throwaway container far enough to prove the binary starts.
  • docker compose config must parse.

PR review

  • Base pin: digest preferred when the project already pins digests.
  • USER set?
  • Secrets in any layer (including deleted files — layers keep history)?
  • COPY scope. Privileged flags in compose.

Security

  • No curl | sh.
  • No privileged: true as a default.
  • No publish on 0.0.0.0 without asking.
  • Secrets via BuildKit secret mounts, not ENV.

Always

  • Pin. Non-root. .dockerignore.

Ask first

  • Running as root to "make it work."
  • Publishing ports on all interfaces.
  • Adding a second process manager.

Never

  • Secrets in ENV or baked files.
  • latest as the only pin.
  • Privileged mode as a default.
  • curl | sh in a RUN.

Red flags

  • "Need root for apt"
  • "We'll put the key in ENV for now"
  • "latest is fine for CI"
  • COPY . . with no .dockerignore

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.