Awesome-omni-skill devcontainers
Expert in creating devcontainer configurations using DuploCloud features. Use when setting up development environments, configuring devcontainer.json, or adding DuploCloud tooling to a workspace. Knows feature detection, cloud CLI setup, Kubernetes access, AI tools, and 1Password SSH integration.
git clone https://github.com/diegosouzapw/awesome-omni-skill
T=$(mktemp -d) && git clone --depth=1 https://github.com/diegosouzapw/awesome-omni-skill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/devops/devcontainers" ~/.claude/skills/diegosouzapw-awesome-omni-skill-devcontainers && rm -rf "$T"
skills/devops/devcontainers/SKILL.mdDuploCloud Devcontainer Expert
Create devcontainer configurations using duplocloud/devcontainers features.
Naming Conventions
The devcontainer
name should be descriptive and creative. Use imagination to create a good name:
Sources for naming:
- Repository name (e.g.,
→ "DuploCloud Components Devspace")terraform-duplocloud-components - Project nickname from README (e.g., "Brook AI" → "Brook AI Devspace")
- Company + purpose (e.g., "Acme Infrastructure Devspace")
- Short descriptive name based on what the repo does
Format:
"<Project Name> Devspace"
Examples:
- for infrastructure repos"DuploCloud IaC Devspace"
- from README nickname"Brook AI Development"
- from org/project name"Playlab Platform Devspace"
- descriptive of purpose"Customer Portal Dev"
If no clear name: Use repo directory name, title-cased, with "Devspace" suffix.
First Step: Read Project README
Always start by reading the project's README.md to understand:
- What the project does
- Technology stack
- Cloud provider (AWS/GCP)
- Any existing infrastructure references
Read: README.md (or README.rst, readme.md)
Feature Detection
Search the workspace for indicators to determine which features to include.
Detection Patterns
| Feature | Search For | Indicators |
|---|---|---|
| terraform | , , | Terraform files present |
| aws-cli | , , , , | AWS references in code/config |
| gcloud-cli | , , , , | GCP references in code/config |
| kubernetes | , , , , | K8s manifests or Helm charts |
| github | , | GitHub workflows or references |
| git | Commit signing needed, version tags | Team uses signed commits |
| ai-claude | Team uses Claude | Anthropic AI preference |
| ai-codex | Team uses ChatGPT/OpenAI | OpenAI preference |
| ai-gemini | Team uses Gemini | Google AI preference |
| onepassword-cli | Team uses 1Password | SSH key management needed |
| direnv | files, per-dir env vars | direnv usage |
| openvpn | VPN access needed | Private network access |
Search Commands
# Cloud detection grep -r "aws\|s3://" --include="*.tf" --include="*.py" --include="*.yaml" . grep -r "gcloud\|gs://" --include="*.tf" --include="*.py" --include="*.yaml" . # Kubernetes detection find . -name "*.yaml" -exec grep -l "kind:\|apiVersion:" {} \; ls -la terraform/ modules/ 2>/dev/null # Git provider grep -r "github.com\|gitlab.com\|bitbucket.org" .
Required Feature
Always include duploctl - it's required for all other DuploCloud features:
"ghcr.io/duplocloud/devcontainers/duploctl:latest": {}
Feature Reference
| Feature | Purpose | When to Use |
|---|---|---|
| DuploCloud CLI | Always required |
| AWS CLI + JIT creds | AWS cloud projects |
| Google Cloud CLI | GCP cloud projects |
| Terraform + wrapper | Infrastructure as code |
| kubectl + JIT kubeconfig | K8s workloads |
| GitHub CLI + Copilot | GitHub repos |
| Git config + signing + plugins | Commit signing, version bumping |
| Anthropic Claude Code CLI | Claude AI assistance |
| OpenAI Codex CLI | OpenAI/ChatGPT assistance |
| Google Gemini CLI | Gemini AI assistance |
| 1Password + SSH keys | Team SSH management |
| direnv + DuploCloud direnvrc | Per-directory env vars |
| OpenVPN client | VPN access to private networks |
Detailed options: See
references/features.md
Config Folder Isolation Pattern
Important: All CLI configurations should be isolated to a workspace directory. This keeps state across container restarts and rebuilds.
Default folder:
config/ (can also be .config, .secrets, .tmp, .dev - ask user if unclear)
Why This Matters
- Container rebuilds don't lose CLI state
- AWS credentials, kubeconfig, gcloud auth persist
- Team members can gitignore personal configs
- Clean separation of workspace vs container state
Environment Variables Point to Config Folder
"containerEnv": { "AWS_CONFIG_FILE": "${containerWorkspaceFolder}/config/aws", "KUBECONFIG": "${containerWorkspaceFolder}/config/kubeconfig.yaml", "CLOUDSDK_CONFIG": "${containerWorkspaceFolder}/config/gcloud", "GOOGLE_APPLICATION_CREDENTIALS": "${containerWorkspaceFolder}/config/gcloud/application_default_credentials.json", "DUPLO_CONFIG": "${containerWorkspaceFolder}/config/duplo.yaml", "CODEX_HOME": "${containerWorkspaceFolder}/config/.codex", "XDG_CONFIG_HOME": "${containerWorkspaceFolder}/config" }
Config Folder Structure
config/ ├── aws # AWS CLI config ├── kubeconfig.yaml # kubectl config ├── gcloud/ # gcloud SDK config ├── duplo.yaml # duploctl config ├── op/ # 1Password CLI (via XDG_CONFIG_HOME) └── .codex/ # Codex skills and config
Add to .gitignore
config/ !config/.gitkeep
init.sh Creates Config Folder
mkdir -p "${VSCODE_CWD}/config"
Environment Variable Strategy
Use
${localEnv:VAR_NAME} to pull values from the host machine into feature configuration. This allows team members to customize their devcontainer without modifying the shared config.
Required Local Environment Variables
These must be set on the host machine (in shell profile or
.env):
| Variable | Purpose | Required |
|---|---|---|
| DuploCloud portal URL | Yes |
| DuploCloud API token | Yes |
| Git commit author name | Recommended |
| Git commit author email | Recommended |
| 1Password SSH key name | If using 1Password |
| 1Password account domain | If using 1Password |
| 1Password vault name | If using 1Password |
The .env File
Secrets are passed via
.env file (never committed to git). The runArgs mounts this file:
"runArgs": [ "--env-file=${localWorkspaceFolder}/.env" ]
Minimum .env contents:
DUPLO_HOST=https://yourportal.duplocloud.net DUPLO_TOKEN=your-duplo-token
Add to .gitignore:
.env
Lifecycle Scripts
init.sh - Ensure .env Exists
Create
.devcontainer/init.sh to bootstrap required files:
#!/usr/bin/env bash set -e echo "Init Devcontainer" VSCODE_CWD=${VSCODE_CWD:-$PWD} mkdir -p "${VSCODE_CWD}/config" # Create .env file if it doesn't exist if [ ! -f "${VSCODE_CWD}/.env" ]; then echo "Creating .env file with DUPLO credentials..." cat > "${VSCODE_CWD}/.env" << EOF DUPLO_HOST=${DUPLO_HOST} DUPLO_TOKEN=${DUPLO_TOKEN} EOF echo ".env file created" else echo ".env file already exists" fi
post-start.sh - Post-Start Commands
Create
.devcontainer/post-start.sh for commands after container starts:
#!/usr/bin/env bash set -e echo "Post start running" # Add custom post-start commands here
Lifecycle Configuration
"initializeCommand": ".devcontainer/init.sh", "postStartCommand": ".devcontainer/post-start.sh"
Basic Template
Default image: Python base (unless user specifies otherwise)
{ "name": "<Project> Devspace", "image": "mcr.microsoft.com/vscode/devcontainers/python:3.12", "features": { "ghcr.io/devcontainers/features/docker-outside-of-docker:1": { "moby": "false" }, "ghcr.io/duplocloud/devcontainers/duploctl:latest": {} }, "runArgs": [ "--env-file=${localWorkspaceFolder}/.env" ], "initializeCommand": ".devcontainer/init.sh", "postStartCommand": ".devcontainer/post-start.sh", "containerEnv": { "WORKSPACE_FOLDER": "${containerWorkspaceFolder}", "DUPLO_CONFIG": "${containerWorkspaceFolder}/config/duplo.yaml", "EDITOR": "code --wait" }, "customizations": { "vscode": { "extensions": [], "settings": {} } } }
Cloud-Specific Patterns
AWS Project
"features": { "ghcr.io/duplocloud/devcontainers/duploctl:latest": {}, "ghcr.io/duplocloud/devcontainers/aws-cli:latest": { "jit": true, "jitAdmin": true } }, "containerEnv": { "AWS_CONFIG_FILE": "${containerWorkspaceFolder}/config/aws", "AWS_DEFAULT_REGION": "us-east-1", "AWS_REGION": "us-east-1" }
GCP Project
"features": { "ghcr.io/duplocloud/devcontainers/duploctl:latest": {}, "ghcr.io/duplocloud/devcontainers/gcloud-cli:1": {} }, "containerEnv": { "CLOUDSDK_CONFIG": "${containerWorkspaceFolder}/config/gcloud", "CLOUDSDK_PYTHON": "/usr/local/bin/python", "GOOGLE_APPLICATION_CREDENTIALS": "${containerWorkspaceFolder}/config/gcloud/application_default_credentials.json" }
Kubernetes Access
"ghcr.io/duplocloud/devcontainers/kubernetes:1": { "jit": true, "jitAdmin": true, "plan": "nonprod01" }, "containerEnv": { "KUBECONFIG": "${containerWorkspaceFolder}/config/kubeconfig.yaml" }
Options:
: Enable automatic JIT authenticationjit
: Use admin privileges (requires admin token)jitAdmin
: DuploCloud infrastructure nameplan
AI Tools
Choose based on team's AI provider preference:
Claude (Anthropic)
"ghcr.io/duplocloud/devcontainers/ai-claude:1": { "skills": "tf-module" }
Skills installed to:
~/.claude/skills/
Codex (OpenAI)
"ghcr.io/duplocloud/devcontainers/ai-codex:1": { "skills": "tf-module" }, "containerEnv": { "CODEX_HOME": "${containerWorkspaceFolder}/.codex" }
Skills installed to:
$CODEX_HOME/skills/
Gemini (Google)
"ghcr.io/duplocloud/devcontainers/ai-gemini:1": { "skills": "tf-module" }
Skills installed to:
~/.gemini/skills/
GitHub Copilot
"ghcr.io/duplocloud/devcontainers/github:latest": { "installCopilot": true, "skills": "tf-module" }
1Password SSH Integration
Required Local Environment Variables
These must be set on the host machine for 1Password to work:
| Variable | Purpose | Example |
|---|---|---|
| 1Password account domain | |
| Vault containing SSH keys | |
| SSH key secret name in 1Password | |
| Enable auto SSH config | |
| Email for 1Password account | |
Feature Configuration
"ghcr.io/duplocloud/devcontainers/onepassword-cli:1": { "autoSsh": "${localEnv:OP_AUTO_SSH}", "sshSecretNames": "${localEnv:OP_SSH_SECRET}", "vault": "${localEnv:OP_VAULT_NAME}", "account": "${localEnv:OP_ACCOUNT}", "userEmail": "${localEnv:USER_EMAIL}" }
SSH Secret Requirements in 1Password
Critical: For auto SSH config to work, your 1Password SSH secret needs custom fields:
| Field | Required | Description | Example |
|---|---|---|---|
| Yes | Hostname for SSH | |
| Recommended | SSH username | |
| Optional | SSH port | |
Without the
field, keys download but SSH config isn't created.host
macOS SSH Agent Setup
Important for macOS users: You need to configure a Launch Agent to expose the 1Password SSH agent socket to devcontainers.
Follow: 1Password SSH Agent Compatibility
Verify SSH agent is working:
ssh-add -l
Debugging 1Password Issues
Common problems:
-
"No vault specified" error
- Ensure
orOP_VAULT_NAME
option is setvault - Service accounts/Connect Server require vault specification
- Ensure
-
SSH keys not configured
- Check SSH secret has
custom field in 1Passwordhost - Verify
isautoSsh
(not stringtrue
)"true"
- Check SSH secret has
-
Repeated account setup on rebuild
- Set
to workspace config folderXDG_CONFIG_HOME - 1Password data persists in
$XDG_CONFIG_HOME/op/
- Set
-
macOS SSH agent not forwarding
- Configure Launch Agent per 1Password docs
- Check
is set in containerSSH_AUTH_SOCK
-
Interactive login required every time
- Set
to skip email promptuserEmail - Use
for persistenceXDG_CONFIG_HOME - Consider Service Account token for automation
- Set
For detailed troubleshooting: Read the full feature README:
https://raw.githubusercontent.com/duplocloud/devcontainers/refs/heads/main/src/onepassword-cli/README.md
Authentication Methods (checked in order)
- Connect Server (
+OP_CONNECT_HOST
)OP_CONNECT_TOKEN - Service Account (
)OP_SERVICE_ACCOUNT_TOKEN - Desktop App Agent (Linux only,
)~/.1password/agent.sock - Interactive Login
Git Configuration
"ghcr.io/duplocloud/devcontainers/git:1": { "userName": "${localEnv:GIT_USERNAME}", "userEmail": "${localEnv:GIT_EMAIL}", "signingKey": "${localEnv:GIT_SIGNING_KEY}" }
Options:
: Git user.name (fallback:userName
env)GIT_USER
: Git user.email (fallback:userEmail
env)GIT_EMAIL
: Path to signing key relative tosigningKey~/.ssh
: Install GitKraken CLIinstallGitKraken
Included plugins:
- Semantic version bumping (git-bump
)git bump -v patch
- Export CI env vars (git-setenv
)eval $(git setenv bitbucket)
Integration with 1Password for signed commits:
{ "ghcr.io/duplocloud/devcontainers/onepassword-cli:1": { "autoSsh": true, "sshSecretNames": "GitHub SSH Key" }, "ghcr.io/duplocloud/devcontainers/git:1": { "signingKey": "GitHub_SSH_Key.pub" } }
OpenVPN Access
Note: Primarily useful for GitHub Codespaces. Can be disabled for local devcontainers.
"ghcr.io/duplocloud/devcontainers/openvpn:1": { "enabled": "${localEnv:DEVCONTAINER_VPN_ENABLED:-false}", "autoConnect": true }, "runArgs": ["--device=/dev/net/tun"]
Options:
: Enable/disable feature (use localEnv to toggle)enabled
: Auto-connect on container start (default: true)autoConnect
: Custom config directoryconfigDir
Required: Must add
--device=/dev/net/tun to runArgs.
direnv
"ghcr.io/duplocloud/devcontainers/direnv:1": {}
Installs direnv with DuploCloud-specific direnvrc at
$HOME/direnv/direnvrc.
Terraform Projects
"ghcr.io/duplocloud/devcontainers/terraform:1": {}, "customizations": { "vscode": { "extensions": ["hashicorp.terraform"], "settings": { "[terraform]": { "editor.defaultFormatter": "hashicorp.terraform", "editor.formatOnSave": true } } } }
Decision Flow
1. Read README.md for project context 2. Search workspace for cloud indicators (AWS/GCP) 3. Check for Terraform files 4. Check for Kubernetes references 5. Determine git provider 6. Add AI tools based on project complexity 7. Add 1Password if team uses it
Common Extensions by Stack
| Stack | Extensions |
|---|---|
| Python | |
| Terraform | |
| Kubernetes | |
| YAML | |
| GitHub | , |
| Database | |
| Git | |
| AWS | |
Extensions Auto-Installed by Features
| Feature | Extension |
|---|---|
| |
| |
| |
| |
| |
| |
| |
Learning More About Features
To learn about a specific feature's options, use web search to read its README:
https://raw.githubusercontent.com/duplocloud/devcontainers/refs/heads/main/src/<feature-name>/README.md
All feature README URLs:
https://raw.githubusercontent.com/duplocloud/devcontainers/refs/heads/main/src/duploctl/README.mdhttps://raw.githubusercontent.com/duplocloud/devcontainers/refs/heads/main/src/aws-cli/README.mdhttps://raw.githubusercontent.com/duplocloud/devcontainers/refs/heads/main/src/gcloud-cli/README.mdhttps://raw.githubusercontent.com/duplocloud/devcontainers/refs/heads/main/src/terraform/README.mdhttps://raw.githubusercontent.com/duplocloud/devcontainers/refs/heads/main/src/kubernetes/README.mdhttps://raw.githubusercontent.com/duplocloud/devcontainers/refs/heads/main/src/github/README.mdhttps://raw.githubusercontent.com/duplocloud/devcontainers/refs/heads/main/src/git/README.mdhttps://raw.githubusercontent.com/duplocloud/devcontainers/refs/heads/main/src/ai-claude/README.mdhttps://raw.githubusercontent.com/duplocloud/devcontainers/refs/heads/main/src/ai-codex/README.mdhttps://raw.githubusercontent.com/duplocloud/devcontainers/refs/heads/main/src/ai-gemini/README.mdhttps://raw.githubusercontent.com/duplocloud/devcontainers/refs/heads/main/src/onepassword-cli/README.mdhttps://raw.githubusercontent.com/duplocloud/devcontainers/refs/heads/main/src/direnv/README.mdhttps://raw.githubusercontent.com/duplocloud/devcontainers/refs/heads/main/src/openvpn/README.md
Skill Resources
| Resource | Contents |
|---|---|
| Detailed feature options and configuration |
| Workspace search patterns for feature selection |
| Ready-to-use template files |
Asset Templates
Use these templates as starting points - copy and customize:
| Template | Use Case |
|---|---|
| Minimal base template |
| AWS projects with JIT |
| Terraform/IaC projects |
| Full-featured with all tools |
| Initialize script (creates .env) |
| Post-start script placeholder |
Template placeholder:
{{PROJECT_NAME}} - replace with devcontainer name