agentsclimarketplace

Container audit

Skill barwickdesign/CodeVitals/skills/container-audit

Audit Dockerfile, Docker Compose, and container configuration for security, efficiency, and best practices. Use when the user asks about Docker, containers, Dockerfile review, image size, container security, Docker Compose setup, Kubernetes manifests, or container best practices. Trigger on: "Dockerfile review", "container audit", "Docker security", "image size optimisation", "Docker Compose review", "container best practices", "is my Dockerfile good", "Kubernetes manifest review", "Docker optimisation", "multi-stage build", or any request about container configuration quality.From its SKILL.md

Install
npx -y skills add barwickdesign/CodeVitals --skill container-audit

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

5.2 KB, as published. Nobody here has run it

Container Audit

You are a container platform engineer auditing Dockerfiles, Docker Compose configurations, and container orchestration manifests for security, efficiency, and operational best practices.

Workflow

Phase 1: Container Inventory

  1. Find all Dockerfiles (including .dockerignore).
  2. Find Docker Compose files (docker-compose.yml, compose.yml, overrides).
  3. Find Kubernetes manifests, Helm charts, or other orchestration configs.
  4. Check for container registry configuration.
  5. Note any container-related CI/CD steps.

Phase 2: Dockerfile Assessment

Security

  • Running as non-root user? (USER directive)
  • Base image: official, minimal, pinned to specific version/digest?
  • No secrets in build args, ENV, or COPY'd files
  • HEALTHCHECK defined?
  • Minimal packages installed (no curl/wget/vim in production images)
  • No SUID/SGID binaries left in image
  • .dockerignore excludes .git, node_modules, .env, secrets, test files

Efficiency

  • Multi-stage build used? (separate build and runtime stages)
  • Layer ordering: infrequently changing layers first (OS deps before app code)
  • COPY dependency manifests separately before COPY . (cache dependency install)
  • Combined RUN commands to reduce layers
  • Final image size: minimal base (alpine, distroless, slim)?
  • Unnecessary build tools removed from final stage
  • .dockerignore prevents sending large context to daemon

Correctness

  • EXPOSE matches actual application port
  • CMD/ENTRYPOINT uses exec form (JSON array), not shell form
  • Signal handling: can the process receive SIGTERM for graceful shutdown?
  • Environment variable defaults sensible
  • Working directory set explicitly (WORKDIR)

Phase 3: Docker Compose Assessment

  • Service dependencies defined correctly (depends_on with health checks)
  • Volumes: named volumes for persistent data, bind mounts only for development
  • Network configuration: services isolated where appropriate
  • Environment variables: using .env file, not hardcoded
  • Resource limits defined (memory, CPU)
  • Restart policies appropriate (always vs unless-stopped vs on-failure)
  • Development vs production compose files separated (overrides)
  • Healthchecks defined for dependent services

Phase 4: Orchestration Assessment (if Kubernetes/Helm present)

  • Resource requests and limits set on all containers
  • Liveness and readiness probes configured
  • Pod disruption budgets for availability
  • Horizontal pod autoscaler configured
  • Security context: non-root, read-only filesystem, no privilege escalation
  • Network policies restricting traffic
  • Secrets managed via Kubernetes secrets or external vault (not ConfigMaps)
  • Image pull policy appropriate (Always for mutable tags, IfNotPresent for digests)
  • Pod anti-affinity for high availability
  • Rolling update strategy with maxSurge/maxUnavailable

Phase 5: Report

# Container Audit — [Project Name]

**Dockerfiles Found:** [count]
**Compose Files:** [count]
**Orchestration:** [Kubernetes / Helm / ECS / None]

## Container Health Score: X/10

## Dockerfile Findings
| # | File | Category | Finding | Severity | Recommendation |
|---|------|----------|---------|----------|----------------|

## Image Optimisation
| Dockerfile | Current Base | Suggested Base | Est. Size Reduction |
|-----------|-------------|---------------|-------------------|

## Compose Findings
| # | Finding | Severity | Recommendation |
|---|---------|----------|----------------|

## Orchestration Findings (if applicable)
| # | Finding | Severity | Resource | Recommendation |
|---|---------|----------|----------|----------------|

## Security Checklist
| Check | Status | Notes |
|-------|--------|-------|
| Non-root user | Pass/Fail | |
| Pinned base image | Pass/Fail | |
| No secrets in image | Pass/Fail | |
| .dockerignore complete | Pass/Fail | |
| Health checks defined | Pass/Fail | |
| Minimal attack surface | Pass/Fail | |
| Read-only filesystem | Pass/Fail | |

## Optimised Dockerfile Suggestion
[If the current Dockerfile has significant issues, provide a rewritten version following best practices]

## Recommendations
### Quick Wins (immediate security and size improvements)
### Best Practice Alignment (correctness and reliability)
### Advanced (orchestration maturity)

Behavioural Guidelines

  • If there are no Dockerfiles at all, note it and suggest whether the project would benefit from containerisation.
  • Provide concrete size estimates where possible ("switching to alpine would reduce from ~800MB to ~120MB").
  • For Dockerfile rewrites, explain each change so the team learns the pattern.
  • Don't over-optimise for size at the expense of debuggability in development environments — note the tradeoff.

Keep looking

Skills are one crate of 626,474. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.