Devcontainer

From event4u-app/agent-config · View interactive version

Devcontainer is an AI agent skill from the GitHub repository event4u-app/agent-config. Wire up DevContainers / GitHub Codespaces — `devcontainer.json`, container images, secrets, VS Code features, port forwarding. NOT for tuning Copilot itself (use `copilot-config`).

How to use this skill

Skill file

devcontainer

When to use

Use this skill when working with DevContainer configuration, GitHub Codespaces setup, or development environment standardization.

Do NOT use when:

Procedure: Modify DevContainer

  1. Gather context — read .devcontainer/devcontainer.json, check .devcontainer/ for env files and docs, check agents/overrides/skills/devcontainer.md for project-specific overrides.
  2. Identify change type — classify: image change, feature addition, secret addition, extension change, or env var change.
  3. Make the change — edit devcontainer.json (or related files). Follow conventions below for secrets, features, and environment variables.
  4. Build and verify — run devcontainer build to confirm the container builds. Check that extensions load and ports forward correctly.
  5. Document — if adding a new secret or dependency, update the onboarding docs in .devcontainer/.

Architecture

Custom image

DevContainers typically use a pre-built custom image hosted on a container registry (GHCR, ECR, Docker Hub). Read devcontainer.json for the image URL.

The image should include:

Features (installed on top of the image)

Common features:

| Feature | Purpose |

|---|---|

| git | Git version control |

| github-cli | GitHub CLI (gh) for API access |

| docker-in-docker | Run Docker inside the DevContainer |

Secrets management

Secrets can be managed via:

Read devcontainer.json for the actual secret definitions and requirements.

Workspace

IDE integration

Conventions

Adding new secrets

  1. Add the secret definition to devcontainer.json → secrets section.
  2. Add a bind mount from .devcontainer/.secrets/<NAME> to /run/secrets/<NAME>.
  3. Document the secret with description and documentationUrl.
  4. Mark as required or optional.

Modifying the base image

Environment variables

Output format

  1. Updated devcontainer.json or related configuration files
  2. Summary of changes and rebuild requirements

Auto-trigger keywords

Validate

Gotcha

Do NOT

Related

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.