ワンクリックで
devcontainer-sync
Keep devcontainer.json in sync when software is installed, removed, or configured inside the dev container
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Keep devcontainer.json in sync when software is installed, removed, or configured inside the dev container
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Write Bash commands that don't trigger unnecessary permission prompts. Use Read/Edit/Grep instead of head/tail/sed/awk/cat/echo; split chained commands (&&, ;, ||) into separate Bash calls; drop diagnostic suffixes like `; echo "EXIT=$?"`. The allowlist matches whole command strings — every mismatch costs the user attention.
Commit user-named files atomically via scripts/commit-pathspec.sh (which wraps `git commit -m "..." -- <files>` and writes the provenance token the pre-commit hook validates). Applies the CLAUDE.md "Pre-commit hook failures on unrelated changes" protocol when the hook fails. Never adds --no-verify silently — explicit user approval is required.
Scaffold a new epic file in docs/developers/tasks/open/ and run housekeep
Scaffold a new idea file in docs/developers/ideas/open/ and regenerate the ideas OVERVIEW.md
Set a task to active — updates status, moves to active/, runs housekeep. Also resumes paused tasks (paused/ → active/ or active/ with closed prerequisites).
Mark a task as closed — writes effort_actual, moves the file to closed/, runs housekeep, and commits
| name | devcontainer-sync |
| description | Keep devcontainer.json in sync when software is installed, removed, or configured inside the dev container |
Policy: Whenever you install, remove, or configure software while running inside a dev container,
you MUST also update .devcontainer/devcontainer.json so the change is persisted for the next
container rebuild. A change that exists only in the running container is lost on rebuild.
We are inside a dev container when any of the following is true:
REMOTE_CONTAINERS is set (VS Code Dev Containers).CODESPACES is set (GitHub Codespaces)./.dockerenv exists (generic Docker runtime)./workspaces/ (convention used by both VS Code and Codespaces).Check with:
[ -n "$REMOTE_CONTAINERS" ] || [ -n "$CODESPACES" ] || [ -f /.dockerenv ] && echo "inside devcontainer"
If none of these match, we are on a native host. Skip this skill — no devcontainer update is needed.
The file is at .devcontainer/devcontainer.json. Choose the right section:
| Change type | Where in devcontainer.json |
|---|---|
apt-get install <pkg> | Add <pkg> to the apt-get install invocation inside postCreateCommand |
apt-get remove <pkg> | Remove <pkg> from the apt-get install list in postCreateCommand |
npm install -g <pkg> | Add/remove from the npm install -g call in postCreateCommand |
pip install <pkg> | Add/remove from the pip install call in postCreateCommand |
uv tool install <pkg> | Add/remove from the uv tool install calls in postCreateCommand |
| New feature (e.g. Docker-in-Docker) | Add an entry under "features": {} |
| VS Code extension | Add/remove from customizations.vscode.extensions |
| Environment variable | Add/remove from "remoteEnv": {} |
| Mounted volume | Add/remove from "mounts": [] |
postCreateCommand as a single shell string joined with &&. Do not split it into an
array — the existing format uses a string.features over postCreateCommand for runtimes with an official Dev Container
Feature (Node.js, Python, Go, Docker, etc.). Only fall back to postCreateCommand for packages
that have no feature."
devcontainer.jsonupdated — rebuild the container (Dev Containers: Rebuild Container) to apply the change to fresh environments."
jqBefore (excerpt):
"postCreateCommand": "sudo apt-get update -q && sudo apt-get install -y -q lcov doxygen && npm install -g markdownlint-cli2 ..."
After:
"postCreateCommand": "sudo apt-get update -q && sudo apt-get install -y -q lcov doxygen jq && npm install -g markdownlint-cli2 ..."
Add a comment near the postCreateCommand key (or inline if the JSON allows) explaining jq is needed for the relevant script/skill.