---
name: "dive-docker-image-layer-explorer"
description: "Explore Docker image layers, discover wasted duplicate space, and verify CI image efficiency."
metadata:
  author: "Alex Goodman"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "inspect docker layers dive"
  - "find wasted space docker image"
  - "enforce dive image efficiency ci"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# Dive Docker Image Layer Inspection & Efficiency Profiler

Analyzes container images with Dive: inspecting layer by layer file diffs, measuring image efficiency score (0-100%), detecting duplicate overwritten files, and automating CI efficiency thresholds.

## When to Invoke
Invoke this skill whenever you need to:
- inspect docker layers dive
- find wasted space docker image
- enforce dive image efficiency ci

## Execution SOP & Rules
1. Execute interactive analysis: dive <image_name:tag>.
2. Navigate layers with Tab and Arrow keys to inspect added, modified, and deleted files.
3. Run non-interactively in CI: CI=true dive <image> --ci-config .dive-ci.yaml.
4. Set failure thresholds: fail-if-efficiency-is-below: 0.95 and fail-if-wasted-bytes-is-above: 50MB.

## Verification Checklist
- Run local linting, syntax validation, and type-checks before reporting completion.
- Ensure all created or modified files adhere to workspace boundaries and avoid uncommitted secrets.
- Verify tests or build commands exit cleanly with return code 0.
