Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Create optimized Dockerfiles with multi-stage builds, security hardening, and vulnerability scanning for minimal, secure container images.
.claude/skills/williamzujkowski-container-image-optimizer/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-04 | ✗→✓ | ▲ Improved | 59% | 0% |
| case-12 | ✗→✓ | ▲ Improved | 110% | 0% |
| case-15 | ✗→✓ | ▲ Improved | 127% | 0% |
| case-07 | ✓→✗ | ▼ Worse | 49% | 0% |
| case-09 | ✓→✓ | = Same ✓ | 125% | 0% |
Trigger conditions:
Not for:
Time normalization:
NOW_ET using NIST/time.gov semantics (America/New_York, ISO-8601): 2025-10-26T01:33:54-04:00NOW_ET for all citation access datesInput validation:
application_language must be one of: nodejs, python, go, java, rustbuild_type must be: development or productionbase_image if specified must be recognized (alpine, distroless, scratch, ubuntu, debian)exposed_port must be valid port number (1-65535)Source freshness:
Decision thresholds:
Step 1: Generate multi-stage Dockerfile
Step 2: Create .dockerignore
Output:
Abort conditions:
All T1 steps plus:
Step 1: Advanced image optimization
Step 2: Security hardening
Step 3: Build optimization
Step 4: Generate security report
Output:
Abort conditions:
All T1 + T2 steps plus:
Step 1: Multi-architecture builds
Step 2: Advanced security
Step 3: CI/CD integration
Output:
Base image selection:
Language-specific optimizations:
Security scan thresholds:
Ambiguity handling:
Required fields (all tiers):
dockerfile# Dockerfile structure FROM <build-base> AS builder WORKDIR /build COPY <dependencies-file> . RUN <install-dependencies> COPY . . RUN <build-command> FROM <runtime-base> WORKDIR /app COPY --from=builder /build/<artifacts> . USER <non-root-user> EXPOSE <port> CMD [<entrypoint>]
yamlbuild_instructions: command: "docker build -t app:version ." buildkit_features: ["cache-mounts", "secrets"] estimated_build_time: "2-5 minutes" image_metrics: final_size_mb: integer layer_count: integer optimization_ratio: "percentage reduction vs single-stage"
Additional T2 fields:
yamlsecurity_report: scanner: "trivy | grype" scan_timestamp: "ISO-8601" vulnerabilities: critical: integer high: integer medium: integer low: integer recommendations: ["array of remediation steps"] dockerfile_best_practices: non_root_user: boolean minimal_base: boolean layer_optimization: boolean healthcheck_present: boolean
Additional T3 fields:
yamlmulti_arch_support: platforms: ["linux/amd64", "linux/arm64"] buildx_config: "buildx command" supply_chain_security: sbom_file: "syft SBOM JSON" signature_verification: "cosign verification command" ci_cd_integration: github_actions: "workflow YAML" automated_scanning: boolean
dockerfile# T1 Example: Node.js Multi-Stage Dockerfile FROM node:18-alpine AS builder WORKDIR /build COPY package*.json ./ RUN npm ci --only=production COPY . . RUN npm run build FROM node:18-alpine WORKDIR /app RUN addgroup -g 1001 -S nodejs && \ adduser -S nodejs -u 1001 COPY --from=builder /build/dist ./dist COPY --from=builder /build/node_modules ./node_modules USER nodejs EXPOSE 3000 CMD ["node", "dist/index.js"]
# .dockerignore
node_modules
.git
.env
*.md
.github
tests
coverageToken budgets (enforced):
Safety checks:
Auditability:
Determinism:
Validation requirements:
docker build without errorsOfficial Documentation (accessed 2025-10-26T01:33:54-04:00):
Base Images:
Security Tools:
Optimization Guides:
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 7,256 | 7,395 | +2% | 1 | 1 | 0% | 1,728 | 4,445 | +157% | 0 | 0 | — |
case-02 | fail→fail | 13,766 | 16,487 | +20% | 1 | 1 | 0% | 2,906 | 6,126 | +111% | 0 | 0 | — |
case-03 | fail→fail | 22,844 | 15,036 | -34% | 1 | 1 | 0% | 5,378 | 6,044 | +12% | 0 | 0 | — |
case-04 | fail→pass | 12,630 | 17,814 | +41% | 1 | 1 | 0% | 2,591 | 4,109 | +59% | 0 | 0 | — |
case-05 | fail→fail | 17,092 | 10,683 | -37% | 1 | 1 | 0% | 4,159 | 5,218 | +25% | 0 | 0 | — |
case-06 | fail→fail | 23,216 | 15,557 | -33% | 1 | 1 | 0% | 5,528 | 6,348 | +15% | 0 | 0 | — |
case-07 | pass→fail | 14,934 | 9,371 | -37% | 1 | 1 | 0% | 3,161 | 4,722 | +49% | 0 | 0 | — |
case-08 | fail→fail | 8,435 | 7,364 | -13% | 1 | 1 | 0% | 1,850 | 4,110 | +122% | 0 | 0 | — |
case-09 | pass→pass | 8,836 | 9,777 | +11% | 1 | 1 | 0% | 2,185 | 4,919 | +125% | 0 | 0 | — |
case-10 | pass→pass | 14,702 | 8,903 | -39% | 1 | 1 | 0% | 3,249 | 4,578 | +41% | 0 | 0 | — |
case-11 | pass→pass | 12,398 | 9,645 | -22% | 1 | 1 | 0% | 2,697 | 4,676 | +73% | 0 | 0 | — |
case-16 | pass→pass | 18,283 | 16,265 | -11% | 1 | 1 | 0% | 3,489 | 6,159 | +77% | 0 | 0 | — |
case-12 | fail→pass | 8,093 | 3,463 | -57% | 1 | 1 | 0% | 1,628 | 3,417 | +110% | 0 | 0 | — |
case-13 | pass→pass | 9,094 | 8,528 | -6% | 1 | 1 | 0% | 1,888 | 4,373 | +132% | 0 | 0 | — |
case-14 | pass→pass | 6,423 | 5,360 | -17% | 1 | 1 | 0% | 1,370 | 3,700 | +170% | 0 | 0 | — |
case-15 | fail→pass | 11,003 | 10,168 | -8% | 1 | 1 | 0% | 2,044 | 4,642 | +127% | 0 | 0 | — |
case-17 | pass→pass | 11,345 | 10,087 | -11% | 1 | 1 | 0% | 2,139 | 4,992 | +133% | 0 | 0 | — |
case-18 | pass→pass | 8,284 | 8,516 | +3% | 1 | 1 | 0% | 1,836 | 4,539 | +147% | 0 | 0 | — |
case-19 | pass→pass | 11,588 | 9,202 | -21% | 1 | 1 | 0% | 2,260 | 4,598 | +103% | 0 | 0 | — |
case-20 | fail→fail | 14,338 | 11,590 | -19% | 1 | 1 | 0% | 2,794 | 4,939 | +77% | 0 | 0 | — |
case-21 | pass→pass | 10,400 | 13,288 | +28% | 1 | 1 | 0% | 2,101 | 5,357 | +155% | 0 | 0 | — |
case-22 | pass→pass | 9,197 | 6,527 | -29% | 1 | 1 | 0% | 1,569 | 3,913 | +149% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +9 percentage points is the difference between those two pass rates over the 22 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.