Install any skill in seconds. Free to start, no credit card required.
Get Started Free →This skill should be used when the user asks to "analyze a Dockerfile", "optimize Docker layers", "validate docker-compose", "check container best practices", or "audit Docker configurations".
.claude/skills/borghei-docker-development/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-02 | ✗→✓ | ▲ Improved | 191% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 18% | 0% |
| case-10 | ✓→✓ | = Same ✓ | 89% | 0% |
| case-04 | ✓→✓ | = Same ✓ | 5% | 0% |
| case-05 | ✓→✓ | = Same ✓ | 0% | 0% |
> Category: Engineering > Domain: Container Development & Optimization
The Docker Development skill provides automated analysis of Dockerfiles and docker-compose configurations. It identifies layer optimization opportunities, security issues, best practice violations, and compose service misconfigurations. Use this skill to enforce container standards across your team and catch issues before they reach production.
Before running the analysis, confirm these inputs. If any is unknown or vague, ASK — do not assume:
--file and which tool runs)--security-only/--check-ports)--format json and whether findings gate a pipeline)Stop rule: ask only the 2-3 that most change the output. If the user says "just draft it," proceed and list your assumptions at the top of the artifact.
bash# Analyze a Dockerfile for best practices python scripts/dockerfile_analyzer.py --file Dockerfile # Analyze with JSON output python scripts/dockerfile_analyzer.py --file Dockerfile --format json # Validate a docker-compose file python scripts/compose_validator.py --file docker-compose.yml # Check for port conflicts across compose files python scripts/compose_validator.py --file docker-compose.yml --check-ports
Analyzes Dockerfiles for best practices, security issues, and optimization opportunities.
| Feature | Description | |---------|-------------| | Layer optimization | Detects unnecessary layers, recommends combining RUN statements | | Multi-stage analysis | Validates multi-stage build patterns and final image size | | Security scanning | Flags running as root, use of latest tags, exposed secrets | | Base image checks | Recommends smaller base images (alpine, distroless, slim) | | Cache optimization | Identifies poor layer ordering that breaks Docker cache |
bash# Full analysis python scripts/dockerfile_analyzer.py --file Dockerfile # Security-focused scan python scripts/dockerfile_analyzer.py --file Dockerfile --security-only # JSON output for CI integration python scripts/dockerfile_analyzer.py --file Dockerfile --format json
Validates docker-compose files for correctness, dependency issues, and port conflicts.
| Feature | Description | |---------|-------------| | Schema validation | Checks compose file structure and syntax | | Dependency graph | Validates depends_on chains for circular dependencies | | Port conflict detection | Identifies duplicate host port bindings | | Volume mount checks | Validates volume paths and mount configurations | | Network analysis | Checks network definitions and service connectivity |
bash# Full validation python scripts/compose_validator.py --file docker-compose.yml # Check port conflicts only python scripts/compose_validator.py --file docker-compose.yml --check-ports # JSON output python scripts/compose_validator.py --file docker-compose.yml --format json
yaml# Example GitHub Actions step - name: Docker Lint run: | python scripts/dockerfile_analyzer.py --file Dockerfile --format json > results.json python scripts/compose_validator.py --file docker-compose.yml --format json >> results.json
| Pattern | Good | Bad | |---------|------|-----| | Base image | FROM python:3.12-slim | FROM python:latest | | User | USER appuser | Running as root | | Layer combining | RUN apt-get update && apt-get install -y pkg | Separate RUN for update and install | | COPY ordering | Copy requirements first, then code | Copy everything at once | | Multi-stage | Use builder stage + minimal runtime | Single stage with build tools | | Secrets | Use build secrets or env at runtime | COPY .env . or ENV SECRET=value | | Health checks | HEALTHCHECK CMD curl -f http://localhost/ | No health check defined | | .dockerignore | Include node_modules, .git, etc. | No .dockerignore file |
| Pattern | Good | Bad | |---------|------|-----| | Restart policy | restart: unless-stopped | No restart policy | | Resource limits | deploy.resources.limits set | Unlimited resources | | Named volumes | volumes: [db-data:/var/lib/postgresql] | Anonymous volumes | | Networks | Explicit network definitions | Default bridge only | | Environment | env_file: .env | Inline secrets in compose |
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-10 | pass→pass | 8,020 | 6,631 | -17% | 1 | 1 | 0% | 1,304 | 2,462 | +89% | 0 | 0 | — |
case-01 | fail→fail | 10,725 | 7,598 | -29% | 1 | 1 | 0% | 1,186 | 2,240 | +89% | 0 | 0 | — |
case-02 | fail→pass | 4,786 | 5,348 | +12% | 1 | 1 | 0% | 743 | 2,159 | +191% | 0 | 0 | — |
case-03 | fail→pass | 10,747 | 4,665 | -57% | 1 | 1 | 0% | 1,692 | 2,001 | +18% | 0 | 0 | — |
case-04 | pass→pass | 10,388 | 4,052 | -61% | 1 | 1 | 0% | 1,744 | 1,833 | +5% | 0 | 0 | — |
case-05 | pass→pass | 11,989 | 2,661 | -78% | 1 | 1 | 0% | 1,703 | 1,697 | -0% | 0 | 0 | — |
case-06 | pass→pass | 4,330 | 2,951 | -32% | 1 | 1 | 0% | 687 | 1,749 | +155% | 0 | 0 | — |
case-07 | pass→pass | 7,466 | 6,478 | -13% | 1 | 1 | 0% | 1,305 | 2,468 | +89% | 0 | 0 | — |
case-08 | pass→pass | 13,181 | 12,745 | -3% | 1 | 1 | 0% | 2,103 | 3,248 | +54% | 0 | 0 | — |
case-09 | pass→pass | 4,876 | 5,326 | +9% | 1 | 1 | 0% | 744 | 2,251 | +203% | 0 | 0 | — |
case-11 | pass→pass | 11,777 | 12,274 | +4% | 1 | 1 | 0% | 2,011 | 3,523 | +75% | 0 | 0 | — |
case-12 | pass→pass | 12,732 | 9,690 | -24% | 1 | 1 | 0% | 2,084 | 2,869 | +38% | 0 | 0 | — |
case-13 | pass→pass | 8,741 | 6,211 | -29% | 1 | 1 | 0% | 1,455 | 2,295 | +58% | 0 | 0 | — |
case-14 | pass→pass | 13,346 | 10,156 | -24% | 1 | 1 | 0% | 2,042 | 2,933 | +44% | 0 | 0 | — |
case-15 | pass→pass | 7,620 | 6,666 | -13% | 1 | 1 | 0% | 1,274 | 2,407 | +89% | 0 | 0 | — |
case-16 | pass→pass | 15,262 | 13,904 | -9% | 1 | 1 | 0% | 2,324 | 3,471 | +49% | 0 | 0 | — |
case-17 | pass→pass | 16,694 | 9,045 | -46% | 1 | 1 | 0% | 2,450 | 2,821 | +15% | 0 | 0 | — |
case-18 | pass→pass | 7,583 | 5,382 | -29% | 1 | 1 | 0% | 1,202 | 2,157 | +79% | 0 | 0 | — |
case-19 | pass→pass | 8,264 | 8,100 | -2% | 1 | 1 | 0% | 1,272 | 2,703 | +113% | 0 | 0 | — |
case-20 | pass→pass | 9,226 | 9,475 | +3% | 1 | 1 | 0% | 1,697 | 3,108 | +83% | 0 | 0 | — |
case-21 | pass→pass | 10,652 | 7,798 | -27% | 1 | 1 | 0% | 2,005 | 2,700 | +35% | 0 | 0 | — |
case-22 | pass→pass | 8,804 | 7,959 | -10% | 1 | 1 | 0% | 1,559 | 2,798 | +79% | 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.
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.