Token导航 LogoToken导航TokenDH.com
研究检索执行命令github未标认证来源可访问clear审计提醒

setting-up-devcontainers设置开发容器

Agent Skill

setting-up-devcontainers 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

353

周安装

15

GitHub Stars

2

下载量

124
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:setting-up-devcontainers(设置开发容器)
来源仓库:https://github.com/taisukeoe/agentic-ai-skills-creator
仓库路径:skills/setting-up-devcontainers
安装命令:
npx skills add https://github.com/taisukeoe/agentic-ai-skills-creator --skill setting-up-devcontainers
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/taisukeoe/agentic-ai-skills-creator --skill setting-up-devcontainers

简介

setting-up-devcontainers 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。

  • 它支持按来源仓库、安装命令和原始 README 核验具体用法,适用于信息整理与定向搜索场景。
  • 通过 npx skills add 命令从指定 GitHub 仓库安装,需确认权限范围和维护状态后再部署。
  • 安装前建议检查是否会触发联网、命令执行或文件读写,避免误操作影响系统安全。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Setting Up Devcontainers for Claude Code

Generate complete .devcontainer/ configurations for Claude Code development environments with:

  • Pre-installed Claude Code (+ optional Codex CLI built into Docker image)
  • Persistent credentials and config via Docker volumes
  • Marketplace mode (if marketplace.json exists): Auto-enabled plugins and skills

Quick Start

User: Set up a devcontainer for this project
Agent: I'll check for marketplace.json and generate the devcontainer configuration.

Workflow

Step 1: Detect Mode

Check for .claude-plugin/marketplace.json:

ls .claude-plugin/marketplace.json

Mode determination:

  • Marketplace mode: If marketplace.json exists → full plugin/skill setup
  • Generic mode: If not found → Claude Code environment (+ optional Codex CLI)

For Marketplace mode, extract:

  • name - Marketplace name (used for volume naming)
  • plugins - Array of plugin definitions

For Generic mode, use:

  • Project directory name for volume naming

Step 2: Ask About Codex CLI Support (Optional)

Ask the user explicitly:

Do you want to add Codex CLI (OpenAI) support alongside Claude Code? - Yes: Adds Volta, Node.js, Codex CLI, and skill sync mechanism - No (default): Claude Code only

If yes:

  • Add Volta/Node.js/Codex CLI installation to Dockerfile (installed at build time)
  • Add ~/.codex/ volume mount for config persistence
  • Add sync-codex-skills.sh script (copies skills to ~/.codex/skills/) [Marketplace mode only]
  • Add Codex sync call to post-create.sh [Marketplace mode only]

Note: Both Claude Code and Codex CLI are installed at Docker build time for faster container startup.

Step 3: Discover Plugins and Skills [Marketplace Mode Only]

Skip this step in Generic mode.

For each plugin in marketplace.json:

  1. Read source path (e.g., "./plugins/plugin-name")
  2. Check for .claude-plugin/plugin.json in source directory
  3. Find skills path from plugin.json or use ./skills/ default
  4. List all SKILL.md files in skills directory
  5. Extract skill names from directory names

Build two lists:

  • enabledPlugins: {"plugin-name@marketplace-name": true,...}
  • allowedSkills: ["Skill(skill-1)", "Skill(skill-2)",...]

Step 4: Ask About Auto-Sync on Container Start [Marketplace Mode Only]

Skip this step in Generic mode.

Ask the user explicitly:

Do you want to automatically reinstall the marketplace on every container start? - Yes: Adds postStartCommand to run reinstall-marketplace.sh automatically - No (recommended for stable development): Run manually when needed Note: This is a workaround for Claude Code not detecting local plugin changes. Running on every start adds ~5-10 seconds delay.

Step 5: Generate Files from Templates

Use the templates in templates/ directory, substituting placeholders:

Common Placeholders

PlaceholderValue
{{PROJECT_NAME}}Marketplace name (if exists) or project directory name
{{PROJECT_DIR}}Project directory name
{{CODEX_VOLUME_MOUNT}}If Codex: ,\n "source=codex-config-{{PROJECT_NAME}},..." else: empty
{{VOLTA_ENV_BLOCK}}If Codex: ENV VOLTA_HOME=... ENV PATH=... else: empty
{{CODEX_INSTALL_BLOCK}}If Codex: Volta/Codex RUN command, else: empty
{{CODEX_DIR_LIST}}If Codex: "$HOME/.codex" else: empty
{{CODEX_ALIASES}}If Codex: Codex alias lines, else: empty
{{CODEX_ALIAS_ECHO}}If Codex: echo " codex-f - codex --full-auto" else: empty
{{DEVCONTAINER_READY_MESSAGE}}"Claude Code devcontainer ready!" or "Claude Code + Codex CLI devcontainer ready!"

Marketplace Mode Placeholders

PlaceholderValue
{{ENABLED_PLUGINS}}Object entries like "plugin@market": true
{{ALLOWED_SKILLS}}Array entries like "Skill(name)"
{{PLUGIN_INSTALL_COMMANDS}}Plugin install commands (with `
{{CODEX_SETUP_BLOCK}}If Codex and Marketplace mode: Codex skill sync in post-create.sh, else: empty
{{CODEX_SYNC_BLOCK}}If Codex: Codex sync in reinstall-marketplace.sh, else: empty
{{POST_START_COMMAND}}If auto-sync: ,\n "postStartCommand": "bash.devcontainer/reinstall-marketplace.sh" else: empty
{{SETTINGS_BLOCK}}Shell commands to create settings.json with enabledPlugins/allowedSkills
{{MARKETPLACE_REGISTER_BLOCK}}Marketplace registration and plugin install commands
{{MARKETPLACE_SYNC_HINT}}echo "To sync marketplace: bash.devcontainer/reinstall-marketplace.sh"

Generic Mode Placeholders

PlaceholderValue
{{POST_START_COMMAND}}empty (no postStartCommand)
{{SETTINGS_BLOCK}}empty (no plugin settings needed)
{{MARKETPLACE_REGISTER_BLOCK}}empty (no marketplace registration)
{{CODEX_SETUP_BLOCK}}empty (no skill sync needed)
{{MARKETPLACE_SYNC_HINT}}empty

Templates:

Conditional logic:

  • Generic mode: Omit reinstall-marketplace.sh and sync-codex-skills.sh
  • If user chose no auto-sync: Remove postStartCommand from devcontainer.json
  • If user chose no Codex: Omit Volta/Codex sections

Step 6: Write Files and Set Permissions

  1. Create .devcontainer/ directory if not exists
  2. Write all generated files (without .template suffix)
  3. Make shell scripts executable: chmod +x.devcontainer/*.sh

Step 7: Provide Usage Instructions

Generic mode:

Devcontainer files created in .devcontainer/

To use:
1. Open project in VS Code
2. Click "Reopen in Container" when prompted
   (or use Command Palette: "Dev Containers: Reopen in Container")
3. Run 'claude' on first use to complete initial setup

Your credentials persist in Docker volumes.

Marketplace mode:

Devcontainer files created in .devcontainer/

To use:
1. Open project in VS Code
2. Click "Reopen in Container" when prompted
   (or use Command Palette: "Dev Containers: Reopen in Container")
3. Run 'claude' on first use to complete initial setup

Your credentials persist in Docker volumes.

To manually sync marketplace changes:
  bash .devcontainer/reinstall-marketplace.sh

Generated File Locations

Generic mode:

.devcontainer/
├── devcontainer.json         # Container configuration
├── Dockerfile                # Ubuntu + Claude Code (+ Volta/Codex if enabled)
└── post-create.sh            # Initial setup (config, aliases)

Marketplace mode:

.devcontainer/
├── devcontainer.json         # Container configuration
├── Dockerfile                # Ubuntu + Claude Code (+ Volta/Codex if enabled)
├── post-create.sh            # Initial setup (config, marketplace, Codex sync)
├── reinstall-marketplace.sh  # Marketplace sync script (+ Codex sync if enabled)
└── sync-codex-skills.sh      # Codex skill sync (only if Codex enabled)

Key Configuration Details

Volume Strategy

Uses named Docker volumes plus a symlink for complete persistence:

Docker Image (built once):
├── ~/.local/bin/claude      # Claude Code binary
└── ~/.volta/                # Volta + Node.js + Codex CLI (if enabled)

Volume 1: claude-config-${PROJECT_NAME} → ~/.claude/
├── .home-claude.json        # Setup state (symlink target)
├── .credentials.json        # Auth tokens
├── settings.json            # User settings
└── plugins/                 # Plugin data (Marketplace mode)

Volume 2: claude-data-${PROJECT_NAME} → ~/.local/share/claude/
└── (Claude Code data)       # Session data, etc.

Volume 3 (if Codex enabled): codex-config-${PROJECT_NAME} → ~/.codex/
├── config.toml              # Codex CLI configuration
├── sessions/                # Session data
└── skills/                  # Synced skills from marketplace (Marketplace mode)

Symlink (created by post-create.sh):
~/.claude.json → ~/.claude/.home-claude.json

Why this architecture?

LocationPurposePersistence Method
~/.local/bin/claudeClaude Code binaryDocker image (fast startup)
~/.volta/Codex CLI binaryDocker image (fast startup)
~/.claude/Config, credentials, settingsVolume mount
~/.local/share/claude/Claude session dataVolume mount
~/.claude.jsonInitial setup stateSymlink to volume
~/.codex/ (optional)Codex config, sessions, skillsVolume mount

Important: ~/.claude.json cannot be directly mounted as a volume (Docker creates a directory instead of a file). The symlink approach allows the file to persist inside the ~/.claude/ volume.

Shell Alias

The setup creates a persistent alias file in the volume:

  • post-create.sh creates ~/.claude/.shell-aliases (persists in volume)
  • post-create.sh adds source line to .zshrc (both modes, with duplicate protection)
  • reinstall-marketplace.sh also adds source line to .zshrc on every start (Marketplace mode only)
# ~/.claude/.shell-aliases (persisted)
alias claude-y='claude --dangerously-skip-permissions'

# If Codex enabled:
alias codex-f='codex --full-auto'

This survives container rebuilds because the alias file is stored in the volume.

Plugin Format [Marketplace Mode Only]

enabledPlugins must be object format (not array):

{
  "enabledPlugins": {
    "plugin-a@marketplace": true,
    "plugin-b@marketplace": true
  }
}

Marketplace Sync (Workaround) [Marketplace Mode Only]

reinstall-marketplace.sh is a workaround for Claude Code not automatically detecting local plugin/skill changes.

What it does:

  • Removes and re-adds the marketplace
  • Reinstalls all enabled plugins

When to run:

  • Manually after editing SKILL.md files: bash.devcontainer/reinstall-marketplace.sh
  • Or automatically via postStartCommand (if user opted in)

Error Handling

ErrorCauseSolution
No plugins foundEmpty plugins arrayWarn user, generate minimal config
Source path invalidPlugin source doesn't existReport error, skip invalid plugins
Existing.devcontainer/Files already presentAsk before overwriting
GID/UID 1000 already existsUbuntu base image has existing userUse getent to detect and rename existing user
Permission denied on configVolume owned by rootUse sudo chown in post-create.sh
claude: command not foundPATH not setExport PATH="$HOME/.local/bin:$PATH" in scripts
EISDIR on ~/.claude.jsonVolume mounted as directoryRemove directory, use symlink instead
JSON Parse error: Unexpected EOFEmpty ~/.claude.json fileInitialize with {} not empty file
Raw mode not supportedPlugin commands in non-interactive shellOnly run plugin commands if setup complete
Login required after rebuild~/.claude.json not persistedSymlink to file inside volume

References

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

26.11%
按下载量换算32

Codex

24.1%
按下载量换算30

Gemini CLI

17.42%
按下载量换算22

Antigravity

11.22%
按下载量换算14

OpenCode

6.69%
按下载量换算8

windsurf

2.96%
按下载量换算4

安全审计

Gen Agent Trust Hub

可疑

Socket

通过

Snyk

可疑

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/taisukeoe/agentic-ai-skills-creator --skill setting-up-devcontainers;npx skills add taisukeoe/agentic-ai-skills-creator --skill "setting-up-devcontainers" 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。

来源信息

继续浏览同类 Skills