devcontainer

Write and review devcontainer.json configurations, Features, and Templates per the Development Container Specification.

Updated Sep 9, 2026
One-click install
npx skills add https://github.com/DeepSpaceCartel/skills --skill devcontainer-deepspacecartel
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: devcontainer
Source: https://github.com/DeepSpaceCartel/skills/tree/main/skills/devcontainer
Command: npx skills add https://github.com/DeepSpaceCartel/skills --skill devcontainer-deepspacecartel

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Dev Container configuration spans three distinct concepts — devcontainer.json, Features, and Templates — with subtle rules around lifecycle scripts, install ordering, variable substitution, and metadata merging that are easy to get wrong. This Skill provides the full Development Container Specification knowledge needed to author, review, and debug reproducible containerized development environments. ## Core Features & Use Cases - devcontainer.json authoring and review: Covers every property across image, Dockerfile, and Docker Compose scenarios, including lifecycle scripts, port attributes, host requirements, and variable substitution. - Feature and Template authoring: Explains devcontainer-feature.json and devcontainer-template.json, the options-to-env-var contract, install ordering via dependsOn/installsAfter/overrideFeatureInstallOrder, and OCI/tarball distribution with the devcontainer-lock.json lockfile. - Use Case: A developer's Feature installs in the wrong order and their postCreateCommand behaves differently than expected. Use this Skill to diagnose that installsAfter only reorders already-queued Features while dependsOn recursively adds dependencies, and that string vs. array lifecycle commands change shell execution semantics. ## Quick Start Review my .devcontainer/devcontainer.json and explain why my Feature install order and postCreateCommand are not behaving as expected.

Frequently Asked Questions about devcontainer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write a devcontainer.json for my project?▼

Create a devcontainer.json at .devcontainer/devcontainer.json and pick exactly one scenario: image, build.dockerfile, or dockerComposeFile plus service. Layer common properties like features, forwardPorts, lifecycle commands, and customizations on top of the chosen scenario.

What is the difference between dependsOn and installsAfter in Dev Container Features?▼

dependsOn is a hard, recursive dependency that adds the referenced Feature to the install set even if never requested. installsAfter is a soft, non-recursive hint that only reorders Features already queued for install and silently ignores anything not queued.

Does devcontainer.json work with Docker Compose?▼

Yes, set dockerComposeFile and service to use a Compose scenario, where service names the main container tooling attaches to. Image and Dockerfile properties are not used because Compose already expresses them per service.

Why does my lifecycle command behave differently as a string versus an array?▼

A string runs through /bin/sh so shell parsing, quoting, and && apply, while an array execs the executable directly with no shell and passes quotes literally. An object runs each named value in parallel as a group.

What is the difference between containerEnv and remoteEnv?▼

containerEnv is baked into the container, visible to every process including the entrypoint, and requires a rebuild to change. remoteEnv applies only to processes the supporting tool spawns, can change without a rebuild, but is invisible to the container entrypoint.

Can I store secret values in devcontainer.json?▼

No, the secrets property only declares which secrets a project wants with a description and docs URL, never values. Actual secret values are injected out-of-band by the supporting tool through a secrets file, OS keychain, or cloud secret store.