Token导航 LogoToken导航TokenDH.com
研究检索只读github未标认证来源可访问clear审计异常

devcontainerdevcontainer 搜索

Agent Skill

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

总安装

5,581

周安装

228

GitHub Stars

69

下载量

1,788
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/jwynia/agent-skills --skill devcontainer

简介

devcontainer 诊断 VS Code 与 Codespaces 容器环境问题,提供快速修复与配置建议。

  • 它分析 Dockerfile、docker-compose.yml 与 devcontainer.json 常见错误,提升启动成功率。
  • 适用于新成员环境搭建与疑难问题排查,减少因配置不当导致的调试时间浪费。
  • 使用前请确保 Docker 守护进程正常运行,注意技能可能读取本地文件与日志,需评估隐私风险。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Devcontainer Diagnostic

Diagnose devcontainer and Docker development environment problems. Help create reproducible, fast-starting development environments that work consistently across VS Code, GitHub Codespaces, and team members.

When to Use This Skill

Use this skill when:

  • Setting up a new devcontainer
  • Container startup is too slow
  • Configuration errors or conflicts
  • Different behavior in VS Code vs Codespaces
  • Multi-service development environment needed

Do NOT use this skill when:

  • Writing application code
  • Deploying to production
  • Configuring CI/CD pipelines

Core Principle

Development containers should provide instant productivity. Every configuration choice affects startup time, reproducibility, and team onboarding. Make these trade-offs explicit.

Diagnostic States

DV0: No Devcontainer Strategy

Symptoms: Manual setup, "check the README", works on one machine fails on others

Interventions:

  • Start with pre-built devcontainer base image
  • Use assets/devcontainer-simple.md template

DV1: Slow Container Startup

Symptoms: 5+ minute startup, heavy postCreateCommand, avoiding rebuilds

Key Questions:

  • How long does startup actually take?
  • What's in postCreateCommand?
  • Are you using prebuilds?

Interventions:

  • Move npm install/pip install to Dockerfile (cached)
  • Use mcr.microsoft.com/devcontainers/* base images
  • Configure prebuilds for team repos
  • Run scripts/analyze-devcontainer.ts

DV2: Configuration Problems

Symptoms: JSON errors, VS Code won't connect, features conflicting

Checklist:

  • devcontainer.json passes JSON validation
  • Using only ONE of: image, build.dockerfile, dockerComposeFile
  • Features are compatible and ordered correctly
  • Extensions use correct publisher.extension-name format

DV3: Environment Parity Issues

Symptoms: Works in VS Code, fails in Codespaces (or vice versa)

Common Issues:

IssueLocal VS CodeCodespaces
Docker socketUsually availableDocker-in-Docker needed
Secrets.env files workUse Codespaces secrets
File watchingNativeMay need polling

DV4: Multi-Service Complexity

Symptoms: Need database/cache/queue, services can't communicate

Interventions:

  • Use Docker Compose integration
  • Named volumes for persistence
  • Health checks for service readiness
  • Use assets/devcontainer-compose.md template

DV5: Dockerfile Issues

Symptoms: Build failures, huge images, no caching

Best Practices:

FROM mcr.microsoft.com/devcontainers/base:ubuntu

# Dependencies first (cached)
RUN apt-get update && apt-get install -y \
    build-essential && rm -rf /var/lib/apt/lists/*

# Copy deps then install (cached if deps unchanged)
COPY package*.json ./
RUN npm install

# Code last (changes frequently)
COPY . .

DV6: Devcontainer Validated

Indicators:

  • Startup under 2 minutes
  • Works in VS Code and Codespaces
  • New developers productive in 30 minutes

Available Scripts

ScriptPurposeUsage
analyze-devcontainer.tsFind issues and optimizationsdeno run --allow-read scripts/analyze-devcontainer.ts
validate-dockerfile.tsCheck Dockerfile best practicesdeno run --allow-read scripts/validate-dockerfile.ts
scan-image.tsVulnerability scanning (wraps Trivy)deno run --allow-run scripts/scan-image.ts [image]

Anti-Patterns

The Kitchen Sink

Installing every tool "just in case" - 10+ minute startups. Fix: Start minimal. Add only when needed.

The postCreateCommand Overload

Everything in postCreateCommand - runs every time. Fix: Move stable operations to Dockerfile.

The Snowflake Container

Manual changes inside running containers. Fix: ALL changes go in config files.

Templates

  • assets/devcontainer-simple.md - Basic single-container setup
  • assets/devcontainer-dockerfile.md - Custom Dockerfile approach
  • assets/devcontainer-compose.md - Multi-service setup

Related Skills

  • system-design - Multi-service architecture informs Compose config
  • pwa-development - Consistent environment for PWA toolchain

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

04

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

能力 5

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

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

平台分布

Claude Code

28.29%
按下载量换算506

OpenCode

23.15%
按下载量换算414

Antigravity

16.41%
按下载量换算293

Codex

10.92%
按下载量换算195

Gemini CLI

6.67%
按下载量换算119

windsurf

3.3%
按下载量换算59

安全审计

Gen Agent Trust Hub

未通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

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

来源信息

继续浏览同类 Skills