What this prompt does
This prompt creates a GitHub Codespaces / Dev Container configuration for a [language]/[framework] project so anyone can go from clone to coding in minutes. It generates a devcontainer.json built on your [base_image], installs the [vscode_extensions] and [dev_features] you need, runs a post-create command to install dependencies and run migrations, and forwards your [ports] with labels. The goal is a reproducible environment that matches production rather than each developer's local machine.
It works because it captures the whole environment as code, matched as closely as possible to production. Docker Compose stands up your [services] (database, cache), the shell is customised with [shell_tools], and prebuilt images keyed to [prebuild_trigger] cut cold-start time toward your [startup_target] seconds. Matching the container to production is what spares you the long tail of works-on-my-machine bugs that come from environment drift, and a README section explains exactly how to launch and use the Codespace.
When to use it
- Onboarding new collaborators and wanting setup to take minutes, not an afternoon
- Standardising the dev environment across a team so everyone runs the same stack
- Reproducing production locally to avoid works-on-my-machine bugs
- Spinning up dependent
[services]like a database and cache with Docker Compose - Pre-installing the right
[vscode_extensions]and[dev_features]for your stack - Reducing Codespaces cold-start time toward a
[startup_target]with prebuilds
Example output
You get a full Dev Container setup: a devcontainer.json using [base_image], the listed [vscode_extensions], feature installs for [dev_features], a post-create command for dependencies and migrations, port forwarding for [ports] with labels, env vars sourced from GitHub Secrets, a Docker Compose file for [services], a customised shell with [shell_tools], a prebuilt-image config triggered on [prebuild_trigger], and a README section on launching and using Codespaces.
Pro tips
- Pick a
[base_image]that matches your runtime version (for example the official PHP 8.3 image) so the container mirrors production closely - Forward every port you actually use in
[ports]with labels, including the framework, the dev server, and each service, so nothing is reachable but unlabelled - Define your
[services]in Docker Compose at the versions production runs, since a mismatched database version is a classic source of subtle bugs - Use a
[prebuild_trigger]on your main branches so cold starts approach[startup_target]instead of rebuilding from scratch each time - Source secrets from GitHub Secrets rather than committing them; the config wires env vars in for you without exposing credentials
- Put dependency install and migrations in the post-create command so a fresh Codespace is ready to run, not half-configured
- Pre-install the
[vscode_extensions]your stack relies on, so the editor lights up with the right language support the moment the Codespace opens - Keep
[shell_tools]to what the team actually uses so the shell stays fast and familiar rather than bloated