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
In this repository49 other files it gives its agents.
- AGENTS.mdAGENTS.md
- maintainers/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- buying-researcherSkill
- cursor-cloud-agents-whenSkill
- debug-anthropicSkill
- debug-pocockSkill
- debugSkill
- discover-the-ideaSkill
- docs-google-styleSkill
- golang-safetySkill
- golang-securitySkill
- golang-testingSkill
- grok-acpSkill
- host-config-pyinfraSkill
- lang-cppSkill
- lang-csharpSkill
- lang-cSkill
- lang-dartSkill
- lang-goSkill
- lang-javaSkill
- lang-js-tsSkill
- lang-kotlinSkill
- lang-luaSkill
- lang-makefileSkill
- lang-phpSkill
- lang-powershellSkill
- lang-protobufSkill
- lang-pythonSkill
- lang-rubySkill
- lang-rustSkill
- lang-shellSkill
- lang-sqlSkill
- lang-swiftSkill
- lang-terraformSkill
- language-routerSkill
- lang-web-markupSkill
- modern-pythonSkill
- pr-reviewSkill
- sdlc-artifactsSkill
- sdlc-onboardingSkill
- security-hardeningSkill
- shell-safetySkill
- tddSkill
- tracker-sdlcSkill
- ui-craftSkill
- ux-designSkill
- verify-before-doneSkill
- yagniSkill
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
- Very specific: line 45
If CMD/ENTRYPOINT changed, run a throwaway container far enough to prove the binary starts.
- Very specific: line 60
No publish on 0.0.0.0 without asking.
≈ “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.
Files
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 itGrep 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 --fromwith explicit paths..dockerignorecovers.gitand secrets.ARGfor build-only;ENVfor runtime. Neither holds secrets.- One process per container. Do not add a supervisor "to run two things" unless compose already defines that pattern.
HEALTHCHECKonly if the project already uses them.RUNapt: update + install + clean in one layer if that is the file's style. No|| trueon apt.
Errors
- A failed
RUNmust fail the build.
Testing
- Build the image.
- If
CMD/ENTRYPOINTchanged, run a throwaway container far enough to prove the binary starts. docker compose configmust parse.
PR review
- Base pin: digest preferred when the project already pins digests.
USERset?- Secrets in any layer (including deleted files — layers keep history)?
COPYscope. Privileged flags in compose.
Security
- No
curl | sh. - No
privileged: trueas a default. - No publish on
0.0.0.0without 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
ENVor baked files. latestas the only pin.- Privileged mode as a default.
curl | shin aRUN.
Red flags
- "Need root for apt"
- "We'll put the key in ENV for now"
- "latest is fine for CI"
COPY . .with no.dockerignore
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
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.

