跳到正文
cccskills
免费在 GitHub 公开

devcontainers

Dev Containers: reproducible dev environments in .devcontainer/ for VS Code, Codespaces and CI, plus an isolated container for running coding agents. Set up, add services, or harden for agents.

中文简介正在准备中。当前显示原文说明。

SebastianLuser/claude-code-arcane星标 3(GitHub 3 + cccskills 0)
集成工具Docker

实测评分 未实测

查看安装方法

包含的文件(1)

  • SKILL.md4.9 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Dev Containers

A .devcontainer/ folder gives everyone the same toolchain in one command: VS Code "Reopen in Container", GitHub Codespaces, or devcontainer up in CI. It is also the practical way to isolate a coding agent on Windows, where Claude Code's sandbox does not run natively.

Phase 1: Scope

ModeDoes
setupA single-container devcontainer.json for the project's stack
composeThe app container plus its services (database, cache) through Docker Compose
agentA container for running Claude Code isolated from the host

Detect the stack and versions from the lockfiles, .nvmrc, go.mod, .tool-versions or global.json before proposing anything.

Phase 2: devcontainer.json

{
  "name": "app",
  "image": "mcr.microsoft.com/devcontainers/typescript-node:<version>",
  "features": {
    "ghcr.io/devcontainers/features/github-cli:1": {}
  },
  "forwardPorts": [3000],
  "postCreateCommand": "npm ci",
  "remoteUser": "node",
  "customizations": {
    "vscode": { "extensions": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode"] }
  }
}
KeyRule
image / buildA mcr.microsoft.com/devcontainers/* image pinned to a version tag; build.dockerfile only when features cannot do it
featuresAdd tools (CLI, language runtimes) as features instead of apt lines; pin the major (:1)
postCreateCommandInstall from the lockfile (npm ci, go mod download), never npm install
remoteUserA non-root user
remoteEnv / containerEnvSecrets come from the host with ${localEnv:VAR}; never write them into the file, which is committed
forwardPortsOnly the ports the app serves

Versions match production: the same runtime major as the Dockerfile and CI.

Phase 3: Services (compose mode)

Point devcontainer.json at a compose file and keep the database in its own service:

{
  "dockerComposeFile": ["../docker-compose.yml", "docker-compose.devcontainer.yml"],
  "service": "app",
  "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
  "shutdownAction": "stopCompose"
}

The override file adds only what development needs (the workspace mount, command: sleep infinity); the base docker-compose.yml stays usable without Dev Containers. Healthchecks and depends_on: condition: service_healthy as in /docker-setup.

Phase 4: Coding agents (agent mode)

Anthropic publishes a reference container for Claude Code (.devcontainer/ in the anthropics/claude-code repo; docs page "Development containers"). It runs Claude Code as a non-root user and adds init-firewall.sh, which denies outbound traffic except an allowlist (npm registry, Anthropic API, GitHub, VS Code marketplace). It needs runArgs: ["--cap-add=NET_ADMIN", "--cap-add=NET_RAW"] and runs the script from postStartCommand.

  • Start from that reference instead of writing a firewall; add only the domains the project needs (your package registry, your API).
  • Keep Claude Code's config in a named volume (target=/home/node/.claude), not a host mount.
  • Never mount host secrets: ~/.ssh, ~/.aws, cloud credential files, the host's .env.
  • The docs allow --dangerously-skip-permissions inside it, with a warning to repeat to the user: the workspace is bind-mounted, so Claude can still change any project file on the host, and a malicious project can exfiltrate anything inside the container, including the Claude Code credentials, to any allowed domain. Keep git as the safety net (commit before, review the diff after), and on shared machines block the flag with permissions.disableBypassPermissionsMode: "disable" in managed settings (/coding-agent-guardrails).

Phase 5: Verify

Run npx @devcontainers/cli up --workspace-folder . and then npx @devcontainers/cli exec --workspace-folder . <test command>. The same two commands run the container in CI.

  • READY: the container builds and the project's tests pass inside it.
  • BLOCKED: it does not build or the tests fail inside it; report the failing step and its output. Docker not installed on the host also counts, with the install link.

Protocol

  • Show the files before writing them and ask "May I write these files?".
  • Prefer the official images and features over custom Dockerfiles.
  • Nix or Devbox are alternatives when the team already uses them; do not introduce them just for this.

Next steps

  • /docker-setup for the production images.
  • /ci-cd-setup to run CI in the same container.
  • /coding-agent-guardrails for the other layers around an agent.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Plan, design, and implement A/B tests and experiments with statistical rigor. Covers hypothesis frameworks, sample sizing, metrics, and result analysis.

中文简介正在准备中。当前显示原文说明。

SebastianLuser/claude-code-arcane32026年10月27日 更新

Web/mobile accessibility decision guide: WCAG 2.2 AA, ARIA, keyboard nav, focus management, contrast, testing. Use for: a11y, accessibility, wcag, aria, screen reader, keyboard, contrast.

中文简介正在准备中。当前显示原文说明。

SebastianLuser/claude-code-arcane32026年10月27日 更新

Generate, iterate, and scale ad creative for paid advertising across Google, Meta, LinkedIn, and X. Covers platform specs, creative frameworks, and quality validation.

中文简介正在准备中。当前显示原文说明。

SebastianLuser/claude-code-arcane32026年10月27日 更新

Musica interactiva para juegos: layering vertical, re-secuenciacion horizontal, stingers, reglas de transicion con sync points, y mapeo de estados de gameplay a musica. Usar para: musica adaptativa, sistema de musica dinamica, transiciones musicales, combat music.

中文简介正在准备中。当前显示原文说明。

SebastianLuser/claude-code-arcane32026年10月27日 更新

Design multi-agent systems, create agent architectures, define communication patterns, and build autonomous agent workflows with structured evaluation frameworks.

中文简介正在准备中。当前显示原文说明。

SebastianLuser/claude-code-arcane32026年10月27日 更新

Inter-agent communication protocol for C-suite agent teams. Defines invocation syntax, loop prevention, isolation rules, response formats, and quality loops.

中文简介正在准备中。当前显示原文说明。

SebastianLuser/claude-code-arcane32026年10月27日 更新

查看 SebastianLuser 的全部技能

报告此技能的问题