python-devcontainer
Skill1 starsChanged 53 days agoMITView on GitHub
ALWAYS load alongside the python-project skill for any new or existing Python project. Creates a Dev Container configuration for Python projects using uv. Ask the user if they want devcontainers set up during project scaffolding.
In this repository28 other files it gives its agents.
- journal-coachSkill
- github-templatesSkill
- node-ciSkill
- renovateSkill
- create-readmeSkill
- markdown-styleSkill
- mermaid-syntaxSkill
- obsidian-vaultSkill
- ste100Skill
- forge-detectSkill
- forgejo-issueSkill
- forgejo-prSkill
- web-frontendSkill
- docker-pythonSkill
- pyproject-tomlSkill
- python-ciSkill
- python-cliSkill
- python-projectSkill
- architecture-briefSkill
- design-advisorSkill
- saas-anti-pattern-reviewSkill
- saas-transition-chain-reviewSkill
- saas-transition-reviewSkill
- saas-transition-strategySkill
- security-reviewerSkill
- technical-debt-reviewSkill
- commit-messageSkill
- discord-sendSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 5 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
When scaffolding a new Python project, or when adding Dev Containers to an existing one:
- Distinctive: line 16
Ask: *"Do you want to set up a Dev Container for this project?"*
- Distinctive: line 20
If yes, proceed with Step 2.
- Very specific: line 24
Read the project's pyproject.toml:
- Very specific: line 55
Read assets/devcontainer.json.tmpl and substitute placeholders:
- Very specific: line 64
Write the result to .devcontainer/devcontainer.json.
- Distinctive: line 66
Create the directory before writing:
- Distinctive: line 79
After creating the Dev Container, add the following badge to README.md:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Dev Container setup
When scaffolding a new Python project, or when adding Dev Containers to an existing one:
Step 1: Ask the user
Ask: "Do you want to set up a Dev Container for this project?"
If no, skip.
If yes, proceed with Step 2.
Step 2: Gather project metadata
Read the project's pyproject.toml:
| Info | Source |
| Python version | requires-python field — extract the minor version (e.g. >=3.12 → 3.12) |
| uv version | [tool.uv] required-version — extract the bare version (e.g. "==0.11.18" → 0.11.18) |
| Sync command | If [dependency-groups] has a dev group, use uv sync --group dev; otherwise use uv sync |
Then extract the uv version from [tool.uv] required-version:
uv_version=$(grep "^required-version" pyproject.toml \
| sed 's/.*"\([0-9.]*\)".*/\1/')This strips any leading operator (==, >=, ~=) and returns the bare version (e.g. 0.11.18).
Then fetch the image digest for the selected Python version:
curl -s "https://mcr.microsoft.com/v2/devcontainers/python/manifests/2-{python_version}-trixie" \
-H "Accept: application/vnd.oci.image.index.v1+json" \
-H "Accept: application/vnd.docker.distribution.manifest.list.v2+json" \
-o /dev/null -w "%{header_json}" 2>/dev/null \
| python3 -c "import json,sys; print(json.load(sys.stdin).get('docker-content-digest',['N/A'])[0])"This returns the manifest list digest (e.g. sha256:132c3dc2b618d194d5d56e4b385e11f5f67b265008a3d7cdddf806ab3ff8572b).
Step 3: Substitute and write
Read assets/devcontainer.json.tmpl and substitute placeholders:
| Placeholder | Value |
|---|---|---|
| {{python_version}} | The minor version from step 2 (e.g. 3.12) |
| {{python_image_digest}} | The SHA256 digest from step 2 (e.g. sha256:132c3dc2b618d194d5d56e4b385e11f5f67b265008a3d7cdddf806ab3ff8572b) |
| {{uv_version}} | The bare uv version from step 2 (e.g. 0.11.18) |
| {{post_create_command}} | The sync command from step 2 (e.g. uv sync --group dev) |
Write the result to .devcontainer/devcontainer.json.
Create the directory before writing:
mkdir -p .devcontainerThe devcontainer-lock.json is auto-generated by VS Code on first build — do not create it manually.
SELinux (Fedora/RHEL): On systems with SELinux enforcing, Docker bind-mounts of files with
user_home_tcontext causePermission deniedinside the container. The--security-opt label=disableflag inrunArgsdisables SELinux separation for the container. It is a no-op on macOS and Windows.
Cache invalidation: Feature options in devcontainer.json are passed as env vars to the install script, but Docker's build cache only tracks files — not env vars. After changing feature options, use Dev Containers: Rebuild Container Without Cache in VS Code.
Step 4: README badge
After creating the Dev Container, add the following badge to README.md:
[](https://containers.dev)Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

