Skip to content

sb-dev/openquant / .agents/skills/docker-project-foundations

docker-project-foundations

Flagged

Use this skill when setting up, initializing, or Dockerizing a project, even if the user doesn't explicitly mention Docker but describes a need for containerized local development, adding a database or cache dependency, or running services without host-level installs. Covers Dockerfile, compose.yaml, and .dockerignore creation with Docker best practices.

FileKindSize
SKILL.mdskill md7.3 KB
agents/openai.yamlconfig269 B
assets/Dockerfile.simpleother959 B
assets/compose-dev.yamlconfig1.5 KB
assets/dockerignore-exampleother654 B
checks/verification.mdmarkdown4.1 KB
references/project-structure.mdmarkdown3.3 KB
scripts/verify-setup.shexecutablescript1.1 KB
skill.yamlconfig853 B

checks/verification.md

View on GitHub
# Verification Checklist

Use this checklist to verify that generated Docker project setup follows the skill's guidance.

## Required files

- [ ] `.dockerignore` exists at the project root (or at each build context root in a multi-service setup).
- [ ] `Dockerfile` exists at the project root (or at each build context root).
- [ ] `compose.yaml` exists at the project root.

## .dockerignore

- [ ] Excludes `.git` directory.
- [ ] Excludes dependency caches (`node_modules/`, `__pycache__/`, `.venv/`, `vendor/`).
- [ ] Excludes IDE/editor configs (`.vscode/`, `.idea/`).
- [ ] Excludes secret files (`.env`, `*.pem`, `*.key`).
- [ ] Excludes root and nested npm credential files with `**/.npmrc`.
- [ ] Does not exclude files that the build actually needs (source code, dependency manifests).

## Dockerfile

- [ ] Base image uses a specific version tag, not `latest`.
- [ ] Base image uses a minimal variant (`-slim` or `-alpine`) where available.
- [ ] Dependency manifests are copied and installed before source code (layer caching).
- [ ] A non-root `USER` is set before `CMD`/`ENTRYPOINT`.
- [ ] No secrets or credentials are hardcoded (`ENV SECRET=...`, `ARG PASSWORD=...`).
- [ ] Neither `COPY` nor `ADD` includes `.npmrc`; both npm installation steps use an optional BuildKit secret mount instead.
- [ ] Public-package builds work without `.npmrc`; private-registry builds receive it through `--secret id=npmrc,src=<config-path>`. Never test with real credentials in image layers or logs.
- [ ] Multi-stage build is used when a build step exists (compile, bundle, transpile).
- [ ] Production stage does not contain dev tools, test frameworks, or build toolchains.

## compose.yaml

- [ ] File is named `compose.yaml`, not `docker-compose.yml`.
- [ ] Infrastructure dependencies (databases, caches, queues) are defined as Compose services, not expected to be installed on the host.
- [ ] `depends_on` uses `condition: service_healthy` for services that need readiness.
- [ ] Infrastructure services have `healthcheck` definitions.
- [ ] Persistent data uses named volumes, not bind mounts.
- [ ] Application source code uses bind mounts for development live-reload.
- [ ] Application and datastore credentials use Compose interpolation rather than literal values, including passwords embedded in connection URLs.
- [ ] Application ports bind to loopback by default; widening to other interfaces is an explicit development choice.
- [ ] Unauthenticated datastores are not published to the host and remain reachable only on the Compose network.
- [ ] Datastore ports needed by local host tools bind to loopback only.
- [ ] Development-only credential fallbacks are clearly labeled, use Compose interpolation, and document a `.env` override.
- [ ] No host-level install instructions (`brew install`, `apt install`) for services that should be containerized.

## Development vs production

- [ ] Development configuration uses bind mounts for source code.
- [ ] Production configuration does not mount source code.
- [ ] A single `Dockerfile` supports both via build stages or build arguments when feasible.

## Validation script

Run the bundled script from the project root before the broader smoke tests, with the script path resolved under the skill directory:

```bash
bash "<skill-dir>/scripts/verify-setup.sh" [--help]
```

Replace `<skill-dir>` with the absolute path of this skill's directory, the folder that contains `SKILL.md` and this `checks/` folder. Do not change into the skill directory to run it; the script checks the current directory.

It checks `.dockerignore`, `Dockerfile`, and `compose.yaml`, then validates the Compose configuration. Exit status is `0` on success or help, `1` for missing files or invalid Compose configuration, and `2` for invalid arguments.

## Validation commands

Run these to smoke-test the generated setup:

```bash
# Verify compose file is syntactically valid
docker compose config --quiet

# Verify the Dockerfile builds successfully
docker compose build

# Verify services start and become healthy
docker compose up -d
docker compose ps   # All services should show "healthy" or "running"

# Clean up
docker compose down -v
```
writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deploymentStars: 319kUpdated Claude CodeCodexVerifiedInstall
xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.Stars: 197kUpdated Claude CodeCodexVerifiedInstall
shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy.Stars: 118kUpdated Claude CodeCodexVerifiedInstall
childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release.Stars: 118kUpdated Claude CodeCodexVerifiedInstall