- implements blueprint 028 - rewrite 290 cross-skill markdown links across 59 files to unchecked backtick-wrapped /skill-name prose (R-023), so skill content resolves under any install depth — symlinked, flat-copied, or whole-tree - add skills/productivity/conjure-a-skill/scripts/skill-ref-check — validates every /skill-name mention resolves to a real skill folder, the replacement coverage link-check lost on these references - add scripts/link-skills.sh, mirroring mattpocock/skills, symlinking every skill into ~/.claude/skills and ~/.agents/skills - docs(readme): point Install at link-skills.sh and npx skills@latest add for non-Claude-Code harnesses
2.5 KiB
2.5 KiB
name, description, disable-model-invocation
| name | description | disable-model-invocation |
|---|---|---|
| add-docker-secrets | Wire build-time (BuildKit mounts) and runtime (env_file/compose) secrets without leaking into image layers. | true |
add-docker-secrets
When to use
- User says "docker secrets", "add a secret", "/add-docker-secrets".
- A containerized project needs a credential: API key at runtime, or a token to install private packages at build time.
Process
- Classify the secret — build time or runtime?
- Build time: needed only while the image builds (private PyPI
index, GitHub PAT for
renv/remotesinstalls). - Runtime: needed by the running code (NCBI/Entrez key, database password, service token).
- Build time: needed only while the image builds (private PyPI
index, GitHub PAT for
- Build-time → BuildKit secret mount. Never
ARG/ENV:RUN --mount=type=secret,id=gh_pat \ GITHUB_PAT=$(cat /run/secrets/gh_pat) R -e "renv::restore()"
The secret exists only during that# docker-compose.yml services: dev: build: secrets: [gh_pat] secrets: gh_pat: file: ./secrets/gh_pat.txtRUN; it never lands in a layer. - Runtime →
env_file(simple) or composesecrets:(file-based).
Code readsservices: dev: env_file: .env # KEY=value lines, never committedSys.getenv("ENTREZ_KEY")/os.environ["ENTREZ_KEY"]— no fallback default containing a real value. - Hygiene check — all three must hold before finishing:
.env,secrets/in.gitignore..env,.env.*,secrets/in.dockerignore(soCOPY . .can't leak them into a layer).docker history <image>shows no secret in any layer command.
- Provide a
.env.examplewith placeholder values so the required keys are documented without the values.
Output / done criteria
- Secret reaches the build or the process, and
docker historyplusgit statusshow no trace of its value. .env.examplelists every required key.
Guardrails
- Never pass secrets via
ARGorENVin a Dockerfile — both persist in image metadata and layer history. - Never
COPYa file containing a secret into any stage. - Never commit
.envorsecrets/; check.gitignorebefore writing them. - Never echo a secret value into logs, justfile recipes, or compose
environment:literals.
See also
/containerize-project— the three-stage setup this hardens; its.dockerignoretemplates already exclude.envand.env.*.