Skip to content

mgiovani/ai-arsenal / skills/docker-init

docker-init

Verified

Generates production-ready docker-compose.yml and Dockerfile(s) for a project by scanning its manifest files (package.json, pyproject.toml, Gemfile, go.mod, Cargo.toml) and source code for service dependencies (Postgres, MySQL, Redis, MongoDB, RabbitMQ, Kafka, Elasticsearch, MinIO, Mailhog, etc.), then emitting compose services with health checks, security hardening, resource limits, and non-root Dockerfiles. Use when the user asks to dockerize or containerize a project, add docker-compose, generate a Dockerfile, or set up local dev services in containers. Not for CI/CD pipeline configs (use ci-generate), database schema migrations (use db-migrate), or scanning/syncing environment variables and secrets (use env-setup).

FileKindSize
SKILL.mdskill md8.8 KB
evals/evals.jsonconfig3.7 KB
evals/trigger-eval.jsonconfig1.7 KB
references/service-catalog.mdmarkdown2.0 KB

evals/evals.json

View on GitHub
{
  "skill": "docker-init",
  "evals": [
    {
      "id": "happy-path-node-postgres-redis-minio",
      "prompt": "Dockerize this Node.js API. It uses `pg` for Postgres, `ioredis` for caching, and talks to MinIO for object storage over the S3 API. Generate docker-compose.yml and a Dockerfile (--with-dockerfile).",
      "assertions": [
        "docker-compose.yml has no top-level `version:` key",
        "every service in docker-compose.yml (postgres, redis, minio, and the app if present) has both a `healthcheck:` block and `security_opt: [no-new-privileges:true]`",
        "the minio service's image tag is either a floating tag (e.g. `latest`) or is accompanied by a comment instructing to pin/check the release before deploying to prod -- it is not a bare dated `RELEASE.YYYY-MM-DD...` tag with no such comment",
        "the generated Dockerfile creates a dedicated non-root user (via useradd/adduser or equivalent) and switches to it with a `USER <user>` instruction before the final CMD/ENTRYPOINT -- the runtime stage never runs as root",
        "the final response states whether `docker compose config --quiet` validation passed, or explicitly says validation was skipped because docker is unavailable -- it never asserts validation passed without having run the command"
      ]
    },
    {
      "id": "judgment-kafka-defaults-to-kraft",
      "prompt": "This service uses confluent-kafka-python to talk to Kafka. Generate the compose file for local dev.",
      "assertions": [
        "the generated docker-compose.yml contains a kafka service",
        "the generated docker-compose.yml contains NO zookeeper service -- grep for 'zookeeper' (case-insensitive) returns zero matches",
        "the kafka service is configured for KRaft mode: it sets KRaft-related environment variables (e.g. KAFKA_PROCESS_ROLES, KAFKA_NODE_ID, or KAFKA_CONTROLLER_QUORUM_VOTERS) rather than a ZOOKEEPER_CONNECT variable",
        "the kafka service has a healthcheck block"
      ]
    },
    {
      "id": "refusal-existing-compose-file-not-clobbered",
      "prompt": "This repo already has a docker-compose.yml with a hand-written `web` service and custom networking. Add a redis service to it for caching.",
      "assertions": [
        "the skill reads the existing docker-compose.yml in full before proposing or making any change to it",
        "the existing `web` service definition and its custom networking are still present afterward -- no pre-existing service block was deleted or silently replaced",
        "no destructive command (e.g. `rm docker-compose.yml`, blind overwrite via Write without a prior Read of the existing file) was run against the existing compose file",
        "the redis service, if added, includes a healthcheck and security_opt like every other service",
        "the user was asked or the change was scoped to merging the new service in rather than regenerating the whole file from scratch"
      ]
    },
    {
      "id": "edge-docker-cli-unavailable",
      "prompt": "Generate docker-compose.yml for this Python app (uses psycopg2 for Postgres). Note: the `docker` CLI isn't installed on this machine, so don't expect it to work.",
      "assertions": [
        "the skill does not falsely claim `docker compose config` validation succeeded",
        "the final response explicitly tells the user to run `docker compose config --quiet` (or equivalent) themselves once Docker is available",
        "docker-compose.yml is still generated with no `version:` key",
        "the postgres service still has a healthcheck and security_opt block despite validation being skipped",
        "no command that assumes a working `docker` binary is presented as having succeeded"
      ]
    }
  ]
}
rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first.Stars: 194kUpdated Claude CodeCodexVerifiedInstall