AGENT SKILL

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

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

  1. Parse all features from devcontainer.json
  2. Resolve installsAfter dependencies
  3. Execute feature install scripts in topological order
  4. Merge metadata (capabilities, mounts, env vars)
  5. 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

  1. Always pin versions — Use specific semver for reproducible builds
  2. Use installsAfter — Declare dependencies between features
  3. Prefer official features — ghcr.io/devcontainers/features/ maintained by spec authors
  4. Check feature options — Many features accept configuration (version, variant, etc.)
  5. Use feature lifecycle — Features can define their own onCreateCommand/postCreateCommand
  6. 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

ray-manaloto
ray-manaloto/macos-development-environment

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.

Skill与智能体开发
★ 1
ray-manaloto
ray-manaloto/macos-development-environment

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.

★ 1
ray-manaloto
ray-manaloto/macos-development-environment

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.

★ 1
ray-manaloto
ray-manaloto/macos-development-environment

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.

资料检索与研究
★ 1
ray-manaloto
ray-manaloto/macos-development-environment

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.

★ 1
ray-manaloto
ray-manaloto/macos-development-environment

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.

资料检索与研究
★ 1