dev-container
Build a reusable Docker development container baseline with spec-driven validation across Alpine, Debian, Ubuntu, or compatible custom images. Use when a repo needs a configurable dev container, layered tool installs, and a way to verify container state.
- License 许可
- MIT
- 最近更新
- 2026-11-12
- Stars
- ★ 13
- Forks
- 6
01 前言 Front Matter
- name
- dev-container
- description
- Build a reusable Docker development container baseline with spec-driven validation across Alpine, Debian, Ubuntu, or compatible custom images. Use when a repo needs a configurable dev container, layered tool installs, and a way to verify container state.
- allowed-tools
- Read, Grep, Glob, ApplyPatch, Bash, Question
- argument-hint
- [scaffold|validate|update] [target-dir]
- disable-model-invocation
- true
02 资源文件 27
- 参考文档commands/dev-container.md5.3 KB
- 参考文档manifest.yaml597 B
- 脚本scripts/recommend_features.py2.2 KB
- 脚本scripts/scaffold.py1.8 KB
- 参考文档templates/container/baseline/apk.txt186 B
- 参考文档templates/container/baseline/apt.txt194 B
- 参考文档templates/container/baseline/npm.txt5 B
- 参考文档templates/container/baseline/pip.txt3 B
- 其他templates/container/Dockerfile863 B
- 参考文档templates/container/features/docker/apk.txt30 B
- 参考文档templates/container/features/docker/apt.txt25 B
- 参考文档templates/container/features/postgres/apk.txt18 B
- 参考文档templates/container/features/postgres/apt.txt18 B
- 参考文档templates/container/features/rust/apk.txt11 B
- 参考文档templates/container/features/rust/apt.txt12 B
- 参考文档templates/container/features/sqlite/apk.txt7 B
- 参考文档templates/container/features/sqlite/apt.txt8 B
- 参考文档templates/container/README.md2.3 KB
- 脚本templates/container/scripts/build-image.sh1.8 KB
- 脚本templates/container/scripts/create-user.sh1.1 KB
- 脚本templates/container/scripts/install-system-packages.sh349 B
- 脚本templates/container/scripts/installers/apk.sh1.5 KB
- 脚本templates/container/scripts/installers/apt.sh1.6 KB
- 脚本templates/container/scripts/run-container.sh721 B
- 脚本templates/container/scripts/run-validation.sh1.2 KB
- 脚本templates/container/scripts/validate-container.py8.1 KB
- 参考文档templates/container/specs/dev-baseline.json2.2 KB
03 SKILL.md 正文
Dev Container
Purpose
Scaffold and maintain a reusable Docker development container with:
- a baseline package manifest
- optional feature packs
- host-side build and validation wrappers
- an in-container validator driven by a machine-readable spec
- an interactive intake flow so the container can be tailored to the repo and the user's needs
Inputs
-
optional mode:
scaffold,validate, orupdate -
optional source directory to inspect; default is the current working directory
-
optional output directory for the generated bundle; default is
~/containers/<repo-slug>/<container-name>/ -
Template paths are resolved from
${AGENTS_SKILLS_ROOT}/dev-container/.
Steps
- Follow the command specification in
${AGENTS_SKILLS_ROOT}/dev-container/commands/dev-container.md. - Use
${AGENTS_SKILLS_ROOT}/dev-container/scripts/scaffold.pyto copy the container bundle into the chosen bundle root when scaffolding. - Use
${AGENTS_SKILLS_ROOT}/dev-container/scripts/recommend_features.pyto infer feature-pack and base-image recommendations from the inspected source repo before editing the spec. - Ask the user targeted setup questions before scaffolding or materially changing the baseline:
- source repo or working directory to inspect
- output location for the bundle, defaulting outside the repo under
~/containers/<repo-slug>/<container-name>/ - a sensible container bundle name derived from repo context when the user does not specify one
- base image family (
alpine,debian,ubuntu, orcustom) - exact base image tag
- package manager (
apkoraptfor v1) - required baseline tools and CLIs
- optional feature packs
- whether
sudois required - repo-specific validation commands
- Keep the determinism split explicit:
- declarative state lives in
<bundle-root>/baseline/,<bundle-root>/features/, and<bundle-root>/specs/ - repeatable execution lives in
<bundle-root>/scripts/ - repo-specific reasoning and adaptation happen in the agent workflow
- declarative state lives in
- Do not claim the container baseline works until
<bundle-root>/scripts/run-validation.shsucceeds or the failure is explicitly reported.
Output
- portable bundle root with Dockerfile, package manifests, feature packs, validation spec, and scripts
- updated spec or feature-pack configuration based on repo context and user-requested tools
- validation evidence from the host wrapper and in-container validator
04 同仓库更多 Skills
personal-knowledge
Save sources to the private Harnessy learning library, sync delivered readings, answer questions from saved evidence, browse its wiki, and generate weekly learning reviews.
valid-skill
A valid skill for testing purposes.
unknown-field
A skill with an unknown frontmatter field.
nested-child
Nested skill should be ignored.
root-skill-preferred
Root skill should win.
no-frontmatter
暂无简介