Docker Image Optimization
Skill2 starsChanged 4 months agoMITView on GitHub
Strategies for reducing builder image size and securing production containers.
- Deletes or force-pushes
In this repository24 other files it gives its agents.
- AGENTS.mdAGENTS.md
- Academic Paper SummarizationSkill
- Accessibility WCAG AuditSkill
- API Error TroubleshootingSkill
- CI/CD Pipeline TroubleshootingSkill
- Competitor Analysis SynthesisSkill
- Customer Onboarding AssistanceSkill
- Dependency Audit ResolutionSkill
- GDPR Data MappingSkill
- genome-analyzerSkill
- incident-distillerSkill
- Kubernetes Pod DebuggingSkill
- nve-genome-explorerSkill
- OWASP Input ValidationSkill
- repo-auditorSkill
- research-packagerSkill
- rule-patcherSkill
- Secret Leak RemediationSkill
- skill-curatorSkill
- skill-package-builderSkill
- SOC2 Policy VerificationSkill
- tama-community-summarizerSkill
- Technology Stack EvaluationSkill
- Ticket Triage and RoutingSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 6 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
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
- Very specific: line 13
When operating in the devops domain.
- Distinctive: line 14
When resolving incidents related to docker image optimization.
- Distinctive: line 17
If the issue requires manual human intervention.
- Distinctive: line 18
If the domain does not apply.
- Distinctive: line 35
Use a distroless or alpine base image for the final runtime stage.
- Distinctive: line 48
Always verify changes in a staging environment before applying to production.
- Distinctive: line 49
Do not execute destructive commands without explicit authorization.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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
Docker Image Optimization
Strategies for reducing builder image size and securing production containers.
When to use
- When operating in the
devopsdomain. - When resolving incidents related to docker image optimization.
When not to use
- If the issue requires manual human intervention.
- If the domain does not apply.
Triggers
- Pattern:
docker-image-optimization - Keywords: devops, docker
Inputs
- Context from the current user session or incident report.
Steps
1. Step 1
Analyze the current Dockerfile for multi-stage build support.
2. Step 2
Move compilation and heavy dependencies to the builder stage.
3. Step 3
Use a distroless or alpine base image for the final runtime stage.
4. Step 4
Clear package manager caches (e.g., apt-get clean or rm -rf /var/cache/apk/*) in the same layer they are installed.
Success signals
- The task is resolved without regressions.
- Logs confirm the procedure was successfully applied.
Failure modes
- Incorrect application of the steps leading to side effects.
Safety notes
- Always verify changes in a staging environment before applying to production.
- Do not execute destructive commands without explicit authorization.
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.

