Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

docker-development

БесплатноЗапускает вложенные скриптыНе проверен

Analyse Dockerfiles and Compose files for security, image size, cache and config problems, with CI-ready exit codes. Use when reviewing or optimising a…

borgheiот borghei★ 1 250 звёзд на GitHub

Об этом скилле

Docker Development

The agent reviews Dockerfiles and Compose files the way a careful platform engineer would: security first (root user, secrets, privileged containers, floating tags), then image size and build-cache order, then operability (health checks, restart policies, resource limits). The two analyzers catch the mechanical issues so the review can focus on the design.

When to Use

  • Reviewing or optimising a Dockerfile (size, cache hits, security).
  • Validating a docker-compose file before it is shared or deployed.
  • Adding a container lint step to CI.

Clarify First

Before running the analysis, settle the inputs below. When one is missing or vague and would change the result, ask about it; when it wouldn't, use a sensible default and say which one you used.

  • Target file: which Dockerfile or docker-compose.yml to analyze (sets --file and which tool runs).
  • Focus: full analysis vs security-only, and whether to check port conflicts (sets --security-only/--check-ports).
  • Output mode: human-readable vs JSON for CI (sets --format json and whether findings gate a pipeline).

Ask about the two or three inputs that matter most for this request, not the whole list. If the user wants a result straight away, produce it and state your assumptions at the top.

Workflow

  1. Analyse the Dockerfile with dockerfile_analyzer.py and the Compose file with compose_validator.py.
  2. Fix critical findings first: secrets in ENV/environment, root user, privileged mode, host port conflicts. Then floating tags, then layer and cache order, then health checks and limits.
  3. Change the design where the findings point to it: a multi-stage build when build tools ship in the runtime image, a non-root USER, dependency files copied before source.
  4. Verify by rerunning both tools (critical count must be 0), then a real docker build and docker compose config to confirm the files still work. The analyzers read text; only a build proves the image.

Quick Start

python3 scripts/dockerfile_analyzer.py --file examples/Dockerfile.sample                 # latest tag, ENV secret, root (exit 1)
python3 scripts/compose_validator.py --file examples/docker-compose.sample.yml          # port clash, privileged, literal passwords (exit 1)
python3 scripts/compose_validator.py --file examples/docker-compose.sound.yml           # clean (exit 0)
python3 scripts/compose_validator.py --file examples/docker-compose.sample.yml --check-ports   # port check only

In CI, write one report per tool (two JSON documents in one file is not valid JSON) and gate on the exit codes:

python3 scripts/dockerfile_analyzer.py --file Dockerfile --format json > dockerfile-report.json
python3 scripts/compose_validator.py --file docker-compose.yml --format json > compose-report.json

Tools Overview

Tool Checks Key flags Exit codes
dockerfile_analyzer.py Root user, latest/untagged base, secrets in ENV/ARG, oversized base images, runs of consecutive RUN layers, missing --no-install-recommends, cache-breaking COPY . before installs, single-stage builds with many steps, missing HEALTHCHECK, missing .dockerignore next to the Dockerfile --file, --security-only, `--format text json`
compose_validator.py Structure, circular depends_on, host port conflicts, Docker socket and sensitive mounts, privileged and host network mode, floating image tags, literal passwords/secrets/tokens in environment, restart policy, resource limits --file, --check-ports (runs only the port check), `--format text json`

Anti-Patterns

Mistake: Treating a clean analyzer run as a container security review. Why it happens: Zero findings looks like approval. Instead: The rules are text checks. Scan the built image for CVEs (Trivy, Grype or the registry's scanner) and review runtime privileges separately.

Mistake: "Fixing" a secret finding by moving the value to a build ARG. Why it happens: The warning disappears from ENV. Instead: Build args are stored in image history. Use BuildKit secrets (RUN --mount=type=secret) for build-time secrets and runtime environment or secret stores for the rest.

Mistake: Switching every base image to Alpine for size. Why it happens: Smaller looks strictly better. Instead: musl breaks some native wheels and binaries. Prefer -slim or distroless when Alpine causes rebuilds from source, and confirm with a test build.

Files

  • scripts/dockerfile_analyzer.py, scripts/compose_validator.py — the analyzers.
  • examples/Dockerfile.sample, examples/docker-compose.sample.yml (deliberately flawed), examples/docker-compose.sound.yml (passes).

Scope & Limitations

In Scope:

  • Dockerfile analysis with dockerfile_analyzer.py: laye
Полный SKILL.md на GitHub

Установить docker-development в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

examples/Dockerfile.sampleexamples/docker-compose.sample.ymlexamples/docker-compose.sound.ymlreferences/docker-best-practices.mdscripts/compose_validator.pyscripts/dockerfile_analyzer.py

FAQ

Что делает скилл docker-development?

Analyse Dockerfiles and Compose files for security, image size, cache and config problems, with CI-ready exit codes. Use when reviewing or optimising a Dockerfile, validating docker-compose, or adding a container lint step.

Как установить скилл docker-development?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл docker-development запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить docker-development с