devcontainer-features
This skill should be used when the user asks about "devcontainer features", "feature installation", "installsAfter", "feature registry", "ghcr.io features", "docker-in-docker feature", "composable dev environment", "create custom feature", "publish devcontainer feature", or needs to configure the devcontainer feature system for modular environment composition.
- License 许可
- MIT
- 最近更新
- 2026-08-03
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- devcontainer-features
- description
- This skill should be used when the user asks about "devcontainer features", "feature installation", "installsAfter", "feature registry", "ghcr.io features", "docker-in-docker feature", "composable dev environment", "create custom feature", "publish devcontainer feature", or needs to configure the devcontainer feature system for modular environment composition.
02 资源文件 1
- 参考文档references/feature-system.md3.2 KB
03 SKILL.md 正文
Dev Container Feature System
Overview
Features are composable, OCI-distributed modules that add tools and capabilities to dev containers. Each feature is a self-contained package with install scripts, lifecycle commands, and metadata. Features enable building modular dev environments without monolithic Dockerfiles.
Feature Configuration
Adding Features
{
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
"ghcr.io/devcontainers/features/node:1": { "version": "18" },
"ghcr.io/devcontainers/features/python:1": { "version": "3.12" }
}
}
Reference Format
<registry>/<namespace>/<feature>:<version>
- Registry:
ghcr.io,mcr.microsoft.com, or custom OCI registry - Namespace: Organization or user (e.g.,
devcontainers) - Feature: Descriptive name (e.g.,
docker-in-docker,node,python) - Version: Semver required for reproducibility (e.g.,
2,1.0,1.0.5)
Feature Metadata (devcontainer-feature.json)
Each feature defines:
- Feature ID and version
- Lifecycle commands: onCreateCommand, postCreateCommand, postAttachCommand
- Dependencies via
installsAfter - Configuration schema for options
- Container metadata (mounts, privileged, capAdd)
Installation Order
- Parse all features from devcontainer.json
- Resolve
installsAfterdependencies - Execute feature install scripts in topological order
- Merge metadata (capabilities, mounts, env vars)
- Final merged config passed to container creation
Common Features
Docker-in-Docker
{
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
"mounts": [
{ "source": "dind-var-lib-docker", "target": "/var/lib/docker", "type": "volume" }
]
}
Language Runtimes
{
"ghcr.io/devcontainers/features/node:1": { "version": "22" },
"ghcr.io/devcontainers/features/python:1": { "version": "3.12" },
"ghcr.io/devcontainers/features/rust:1": { "version": "latest" }
}
CLI Tools
{
"ghcr.io/devcontainers/features/github-cli:1": {},
"ghcr.io/devcontainers/features/kubectl-helm-minikube:1": {}
}
Best Practices
- Always pin versions — Use specific semver for reproducible builds
- Use installsAfter — Declare dependencies between features
- Prefer official features —
ghcr.io/devcontainers/features/maintained by spec authors - Check feature options — Many features accept configuration (version, variant, etc.)
- Use feature lifecycle — Features can define their own onCreateCommand/postCreateCommand
- Volume mount caches — Pair features with named volumes for persistent caches
Feature CLI Commands
For full CLI reference, see the devcontainer-cli skill. Key feature subcommands:
devcontainer features test --workspace-folder . --features ghcr.io/org/feature:1
devcontainer features package ./src/my-feature --output-folder ./dist
devcontainer features publish ./dist --registry ghcr.io --namespace myorg
devcontainer features info ghcr.io/devcontainers/features/node:1
Additional Resources
Reference Files
For the complete feature specification and publishing workflow:
references/feature-system.md— Full feature metadata, installation order, and publishing
Related Skills
- devcontainer-cli — Full CLI reference including feature subcommands
- devcontainer-setup — Configuring features during project setup
04 同仓库更多 Skills
next-workflow-step
Use this skill when the user wants to transition to the next workflow step, wrap up a session cleanly, prepare a handoff, or says things like "next step", "continue the workflow", "wrap up", "hand off", "move to the next phase", "what's next in embrace", or "prepare for /clear". Also triggers when the current octo:embrace phase appears complete and no explicit next action is set.
source-discovery
This skill should be used when the user asks to "find sources", "discover URLs", "catalog a source", "classify a URL", "search for libraries", "check what exists", or mentions source discovery, URL cataloging, source classification, or research source management.
review-synthesis
This skill should be used when the user asks to "summarize review findings", "prioritize fixes", "rank review issues", "combine reviewer feedback", "create action items from review", or mentions review synthesis, finding prioritization, severity ranking, or review result summarization.
research-scoring
This skill should be used when the user asks to "score research", "check research quality", "evaluate coverage", "measure improvement", "assess research completeness", or mentions research scoring, quality metrics, coverage gaps, improvement baseline, or research pipeline status.
notebooklm-integration
This skill should be used when the user asks to "ingest into NotebookLM", "query NotebookLM", "add sources to notebook", "cross-source synthesis", "check stale sources", or mentions NotebookLM, notebook integration, source ingestion, or knowledge consolidation.
evidence-synthesis
This skill should be used when the user asks to "synthesize findings", "combine research", "cross-reference sources", "summarize evidence", "write a deep review", or mentions evidence synthesis, finding consolidation, cross-source analysis, or research summarization.