Skip to content

Instantly share code, notes, and snippets.

@bmingles
Last active February 22, 2026 06:09
Show Gist options
  • Select an option

  • Save bmingles/2346bea0b6ef7d386105b22dbd147e40 to your computer and use it in GitHub Desktop.

Select an option

Save bmingles/2346bea0b6ef7d386105b22dbd147e40 to your computer and use it in GitHub Desktop.
VS Code Claude Extension "Yolo" Devcontainer
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/debian
{
"name": "Debian",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/base:bookworm",
"features": {
"ghcr.io/devcontainers/features/go:1": {
"version": "latest"
},
"ghcr.io/devcontainers/features/node:1": {
"nodeGypDependencies": true,
"version": "24.13.1",
"pnpmVersion": "latest",
"nvmVersion": "latest"
}
},
"mounts": [
// Bash history
"source=claude-code-bashhistory-${devcontainerId},target=/commandhistory,type=volume",
// Named volume: isolated settings per container
"source=claude-code-config-${devcontainerId},target=/home/vscode/.claude,type=volume",
// Bind-mount auth token file so login persists across rebuilds
"source=${localEnv:HOME}/.claude.json,target=/home/vscode/.claude.json,type=bind,consistency=cached",
// Bind-mount skills from host into project directory for easier debugging of skills.
// Can remove the `readonly` setting if you want to edit them from the container
"source=${localEnv:HOME}/.claude/skills,target=${containerWorkspaceFolder}/.claude/skills,type=bind,consistency=cached,readonly"
],
// This needs to happen so that Claude can write to the volume which is needed
// to login and store settings.
"postCreateCommand": "sudo chown -R vscode:vscode /home/vscode/.claude",
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
"containerEnv": {
"CLAUDE_CONFIG_DIR": "/home/vscode/.claude"
},
// Configure tool-specific properties.
"customizations": {
"vscode": {
"extensions": [
"anthropic.claude-code",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode"
],
"settings": {
// "Yolo" permissions for Claude
"claudeCode.allowDangerouslySkipPermissions": true,
"claudeCode.initialPermissionMode": "bypassPermissions",
// Other VS Code preferences
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"workbench.colorCustomizations": {
"statusBar.background": "#5a021e",
"titleBar.activeBackground": "#5a021e"
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment