devcontainers-best-practices

Looks up the Development Container spec, devcontainer.json reference, and schema; finds Features and Templates; identifies tools that support devcontainers (VS Code, VS Code-based editors such as Cursor, Zed, Codespaces, DevPod, etc.). Use when editing devcontainer.json, choosing Features or Templates, or when the user asks about dev containers, devcontainer.json, or containers.dev.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "devcontainers-best-practices" with this command: npx skills add afonsograca/devcontainers-best-practices/afonsograca-devcontainers-best-practices-devcontainers-best-practices

Devcontainers Best Practices

This skill guides you to the right documentation and references for the Development Container ecosystem. Use it when working with devcontainer.json, selecting Features or Templates, or when the user asks about dev containers, containers.dev, or supporting tools.

Quick start

Minimal devcontainer.json using an image and a Feature: "image": "mcr.microsoft.com/devcontainers/base:ubuntu", "features": { "ghcr.io/devcontainers/features/git:1": {} }. For property details and validation, see Quick lookup item 1 and references/schema.md.

When to use this skill

  • Editing or validating devcontainer.json
  • Looking up a property (syntax, type, tool support)
  • Choosing or referencing a Feature or Template
  • Checking which tools support the spec or have tool-specific properties/limitations
  • Understanding the spec (lifecycle, merge logic, image metadata)
  • Authoring or publishing a Dev Container Feature (see the Authoring section in references/features.md and the containers.dev authoring guide)
  • Configuring multiple dev containers (multi-project, shared Compose); see references/tools.md and VS Code / multi-container docs

Canonical sources

All content in this skill and its references is traceable to these sources:

Reference files

Detailed material is in the references/ directory. Load only what you need.

NeedFile
When to use the full spec, key concepts, merge logic, lifecyclereferences/spec.md
JSON reference vs schema, canonical URLs, how to validatereferences/schema.md
Supporting tools, tool-specific properties, limitationsreferences/tools.md
VS Code workflows, requirements, prebuild, ports, extensions, limitations, dotfiles, managing containersreferences/vscode-containers.md
Tips and tricks (OS, Git, performance, troubleshooting, profile persistence, reporting)references/tips-and-tricks.md
Official Features, OCI refs, versioning, options, install order, authoring Featuresreferences/features.md
Official Templates, when to use template vs Feature vs Dockerfilereferences/templates.md

Quick lookup

  1. Property or behavior in devcontainer.json
    Use the Dev Container metadata reference (or references/spec.md) for property-by-property details. For validation, use the devcontainer.json schema or Dev Container CLI; see references/schema.md.

  2. Tool support or tool-specific settings
    Check devcontainers.github.io/supporting for the list of tools, customizations.* (e.g. customizations.vscode, customizations.codespaces), and limitations. Summary in references/tools.md.

  3. Advanced scenarios (env vars, mounts, performance, non-root user, remote Docker, multiple containers, Git credentials)
    See VS Code Advanced container configuration. Summary and workflow links in references/vscode-containers.md.

  4. Multiple dev containers (multi-project, shared Docker Compose)
    See references/tools.md “Multiple containers / multi-project” and Chris Ayers – Multiple dev containers.

  5. OS-specific or troubleshooting (Git, Docker Desktop, cleanup, logs)
    See VS Code Dev Containers Tips and Tricks. Summary in references/tips-and-tricks.md.

  6. Feature ID, options, or install order
    Official Features: containers.dev/features, github.com/devcontainers/features. OCI refs: ghcr.io/devcontainers/features/<name>:<version>. Details in references/features.md. For authoring Features, see the Authoring section there and containers.dev/guide/feature-authoring-best-practices.

  7. Template or "template vs Feature vs Dockerfile"
    Official Templates: containers.dev/templates, github.com/devcontainers/templates. When to use which: references/templates.md.

  8. Spec concepts (lifecycle, merge, image metadata)
    Full spec: containers.dev/implementors/spec. Summary: references/spec.md.

Best practices (from official docs)

Only apply recommendations that are stated in the spec or official devcontainer documentation; cite the source when relevant.

When the spec or official docs do not state a recommendation, do not present it as a best practice; either omit it or phrase it as a suggestion with a clear citation.

Optional / community guidance: Community articles (e.g. Daytona – Ultimate guide to dev containers) suggest practices such as keeping images lightweight, caching dependencies, and using Docker Compose for multi-service setups. Use with attribution and prefer spec/official docs when they conflict.

Summary

  • Use this skill when editing devcontainer.json, choosing Features/Templates, authoring Features, or answering questions about dev containers or containers.dev.
  • Resolve questions via the canonical URLs above and the reference files under references/.
  • Best practices: cite containers.dev or devcontainers.github.io; only include guidance that appears there. For OS-specific or troubleshooting issues, consult VS Code Dev Containers Tips and Tricks and references/tips-and-tricks.md.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

openclaw-version-monitor

监控 OpenClaw GitHub 版本更新,获取最新版本发布说明,翻译成中文, 并推送到 Telegram 和 Feishu。用于:(1) 定时检查版本更新 (2) 推送版本更新通知 (3) 生成中文版发布说明

Archived SourceRecently Updated
Coding

ask-claude

Delegate a task to Claude Code CLI and immediately report the result back in chat. Supports persistent sessions with full context memory. Safe execution: no data exfiltration, no external calls, file operations confined to workspace. Use when the user asks to run Claude, delegate a coding task, continue a previous Claude session, or any task benefiting from Claude Code's tools (file editing, code analysis, bash, etc.).

Archived SourceRecently Updated
Coding

ai-dating

This skill enables dating and matchmaking workflows. Use it when a user asks to make friends, find a partner, run matchmaking, or provide dating preferences/profile updates. The skill should execute `dating-cli` commands to complete profile setup, task creation/update, match checking, contact reveal, and review.

Archived SourceRecently Updated