improve-docker
Skill4 starsChanged 26 days agoMITView on GitHub
Use when the user asks to audit their Docker setup, find improvement opportunities across their Dockerfiles/Compose, or wants a prioritized roadmap of fixes rather than a single scan — "audit my Docker", "improve my containers", "what's wrong with my infra images". Read-only on source; produces self-contained plans in plans/ for another agent to execute. Companion to the `docker-doctor` scan skill.
In this repository8 other files it gives its agents.
- AGENTS.mdAGENTS.md
- deslopSkill
- emil-design-engSkill
- improveSkill
- react-doctorSkill
- ultraciteSkill
- docker-authorSkill
- docker-doctorSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 29
Read references/audit.md and assess across all five categories.
- Very specific: line 39
Create plans/ and write one file per opportunity using references/plan-template.md.
- Distinctive: line 41
Every plan's verification step is mechanical:
≈ “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
Improve Docker
A read-only senior advisor for Docker infrastructure. It uses docker-doctor as machine-verified evidence, adds judgment the scanner can't (base-image strategy, build-context size, layer architecture, supply-chain), then writes one self-contained plan per opportunity for another agent — or a cheaper model — to implement.
Strict rule: this skill never edits Dockerfiles, Compose files, or app source. It only writes to plans/. Fixing is a separate step (/docker-doctor or docker-author).
Phase 1 — Recon
Gather structured evidence before forming any opinion.
npx @docker-doctor/cli@latest . --json > docker-doctor-report.json # diagnostics + score + project files- The JSON
projectfield lists every Dockerfile / Compose / .dockerignore discovered. - The JSON
diagnostics[]carryrule,category,severity,file,line,message,help(reportschemaVersion3+). Group bycategorydirectly — no second command is needed. - The JSON
failures[](schema 4+) lists files that were discovered but could not be parsed. Treat them as unknown, not clean. analyzedFiles(schema 6+) is how many files the score covers. When it is0,scoreandlabelarenulland there is no baseline score.- Note the exit code, the count of diagnostics per rule, and the
scoreandlabelas the baseline.
Phase 2 — Audit
Read references/audit.md and assess across all five categories. For each, combine the scanner's diagnostics with judgment the rules don't cover (audit.md lists what to look for beyond the rules). Fan out read-only subagents per category for a large project.
Phase 3 — Vet & prioritize
- Confirm each finding by reading the actual
file:line— discard anything you can't reproduce in the source. - Rank by leverage, not raw severity:
impact ÷ effort. A one-lineUSERfix on a public image outranks a large multi-stage refactor that shaves a few MB. Bucket into HIGH / MEDIUM / LOW. - De-duplicate: collapse findings that a single change resolves.
Phase 4 — Write plans
Create plans/ and write one file per opportunity using references/plan-template.md. Each plan must be self-contained — an executing agent should need nothing but the plan and the repo. Pull the concrete fix from the diagnostic's help text or npx @docker-doctor/cli@latest rules explain <full-rule-key>.
Every plan's verification step is mechanical:
npx @docker-doctor/cli@latest . --json > /tmp/docker-doctor-after.json; echo "exit=$?"The targeted rule's diagnostics must be gone at the planned locations, and no other rule may gain findings. Both the baseline and the verification scan must exit 0 or 1. Exit 2 means a file could not be analyzed, so the two reports cannot be compared. Fix that file and scan again first. The exit code must not go from 0 to 1. The score averages over every analyzed file, so treat it as a coarse signal and never as the pass condition.
End with a short plans/README.md index: findings by priority, the baseline score, and the target score once all plans are applied.
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.

