jpskill.com
📦 その他 コミュニティ

devcontainers-best-practices

開発コンテナ(devcontainer.json)の編集、FeaturesやTemplatesの選択、関連ツールに関する質問に対し、仕様やリファレンスを参照し、最適な情報を提供する支援をするSkill。

📜 元の英語説明(参考)

Looks up the Development Container spec, devcontainer.json reference, and schema; finds Features and Templates; identifies tools that support devcontainers (VS Code, VS Code-based editors such as Cursor, Zed, Codespaces, DevPod, etc.). Use when editing devcontainer.json, choosing Features or Templates, or when the user asks about dev containers, devcontainer.json, or containers.dev.

🇯🇵 日本人クリエイター向け解説

一言でいうと

開発コンテナ(devcontainer.json)の編集、FeaturesやTemplatesの選択、関連ツールに関する質問に対し、仕様やリファレンスを参照し、最適な情報を提供する支援をするSkill。

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o devcontainers-best-practices.zip https://jpskill.com/download/10038.zip && unzip -o devcontainers-best-practices.zip && rm devcontainers-best-practices.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/10038.zip -OutFile "$d\devcontainers-best-practices.zip"; Expand-Archive "$d\devcontainers-best-practices.zip" -DestinationPath $d -Force; ri "$d\devcontainers-best-practices.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して devcontainers-best-practices.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → devcontainers-best-practices フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
1

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

[Skill 名] devcontainers-best-practices

Devcontainers ベストプラクティス

このスキルは、Development Container エコシステムに関する適切なドキュメントとリファレンスへ誘導します。devcontainer.json を操作する際、Features または Templates を選択する際、またはユーザーが dev containers、containers.dev、またはサポートツールについて質問する場合に使用してください。

クイックスタート

イメージと Feature を使用した最小限の devcontainer.json: "image": "mcr.microsoft.com/devcontainers/base:ubuntu", "features": { "ghcr.io/devcontainers/features/git:1": {} }。プロパティの詳細と検証については、クイックルックアップ の項目 1 と references/schema.md を参照してください。

このスキルを使用する場面

  • devcontainer.json の編集または検証
  • プロパティの検索 (構文、型、ツールサポート)
  • Feature または Template の選択または参照
  • スペックをサポートするツール、またはツール固有のプロパティ/制限事項の確認
  • スペックの理解 (ライフサイクル、マージロジック、イメージメタデータ)
  • Dev Container Feature の作成または公開 (references/features.md の Authoring セクションと containers.dev authoring guide を参照)
  • 複数の dev container の構成 (マルチプロジェクト、共有 Compose)。references/tools.mdVS Code / multi-container docs を参照

標準的なソース

このスキルとそのリファレンスに含まれるすべてのコンテンツは、以下のソースに由来します。

参照ファイル

詳細な資料は references/ ディレクトリにあります。必要なものだけをロードしてください。

必要 ファイル
完全なスペック、キーコンセプト、マージロジック、ライフサイクルを使用する場面 references/spec.md
JSON リファレンス vs スキーマ、標準 URL、検証方法 references/schema.md
サポートツール、ツール固有のプロパティ、制限事項 references/tools.md
VS Code ワークフロー、要件、プリビルド、ポート、拡張機能、制限事項、ドットファイル、コンテナの管理 references/vscode-containers.md
ヒントとコツ (OS、Git、パフォーマンス、トラブルシューティング、プロファイルの永続化、レポート) references/tips-and-tricks.md
公式 Features、OCI refs、バージョニング、オプション、インストール順序、Features の作成 references/features.md
公式 Templates、template vs Feature vs Dockerfile を使用する場面 references/templates.md

クイックルックアップ

  1. devcontainer.json のプロパティまたは動作
    プロパティごとの詳細については、Dev Container metadata reference (または references/spec.md) を使用してください。検証には、devcontainer.json schema または Dev Container CLI を使用してください。references/schema.md を参照してください。

  2. ツールサポートまたはツール固有の設定
    ツールのリスト、customizations.* (例: customizations.vscode, customizations.codespaces)、および制限事項については、devcontainers.github.io/supporting を確認してください。references/tools.md に概要があります。

  3. 高度なシナリオ (環境変数、マウント、パフォーマンス、非 root ユーザー、リモート Docker、複数のコンテナ、Git 認証情報)
    VS Code Advanced container configuration を参照してください。references/vscode-containers.md に概要とワークフローへのリンクがあります。

  4. 複数の dev container (マルチプロジェクト、共有 Docker Compose)
    references/tools.md の「Multiple containers / multi-project」と Chris Ayers – Multiple dev containers を参照してください。

  5. OS 固有またはトラブルシューティング (Git、Docker Desktop、クリーンアップ、ログ)
    VS Code Dev Containers Tips and Tricks を参照してください。references/tips-and-tricks.md に概要があります。

  6. Feature ID、オプション、またはインストール順序
    公式 Features: containers.dev/features, github.com/devcontainers/features。OCI refs: ghcr.io/devcontainers/features/<name>:<version>references/features.md に詳細があります。Features の作成については、そちらの Authoring セクションと containers.dev/guide/feature-authoring-best-practices を参照してください。

  7. Template または "template vs Feature vs Dockerfile"
    公式 Templates: containers.dev/templates, github.com/devcontainers/templates。いつどれを使用するか: references/templates.md

  8. スペックの概念 (ライフサイクル、マージ、イメージメタデータ)
    完全なスペック: [cont

📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

Devcontainers Best Practices

This skill guides you to the right documentation and references for the Development Container ecosystem. Use it when working with devcontainer.json, selecting Features or Templates, or when the user asks about dev containers, containers.dev, or supporting tools.

Quick start

Minimal devcontainer.json using an image and a Feature: "image": "mcr.microsoft.com/devcontainers/base:ubuntu", "features": { "ghcr.io/devcontainers/features/git:1": {} }. For property details and validation, see Quick lookup item 1 and references/schema.md.

When to use this skill

  • Editing or validating devcontainer.json
  • Looking up a property (syntax, type, tool support)
  • Choosing or referencing a Feature or Template
  • Checking which tools support the spec or have tool-specific properties/limitations
  • Understanding the spec (lifecycle, merge logic, image metadata)
  • Authoring or publishing a Dev Container Feature (see the Authoring section in references/features.md and the containers.dev authoring guide)
  • Configuring multiple dev containers (multi-project, shared Compose); see references/tools.md and VS Code / multi-container docs

Canonical sources

All content in this skill and its references is traceable to these sources:

Reference files

Detailed material is in the references/ directory. Load only what you need.

Need File
When to use the full spec, key concepts, merge logic, lifecycle references/spec.md
JSON reference vs schema, canonical URLs, how to validate references/schema.md
Supporting tools, tool-specific properties, limitations references/tools.md
VS Code workflows, requirements, prebuild, ports, extensions, limitations, dotfiles, managing containers references/vscode-containers.md
Tips and tricks (OS, Git, performance, troubleshooting, profile persistence, reporting) references/tips-and-tricks.md
Official Features, OCI refs, versioning, options, install order, authoring Features references/features.md
Official Templates, when to use template vs Feature vs Dockerfile references/templates.md

Quick lookup

  1. Property or behavior in devcontainer.json
    Use the Dev Container metadata reference (or references/spec.md) for property-by-property details. For validation, use the devcontainer.json schema or Dev Container CLI; see references/schema.md.

  2. Tool support or tool-specific settings
    Check devcontainers.github.io/supporting for the list of tools, customizations.* (e.g. customizations.vscode, customizations.codespaces), and limitations. Summary in references/tools.md.

  3. Advanced scenarios (env vars, mounts, performance, non-root user, remote Docker, multiple containers, Git credentials)
    See VS Code Advanced container configuration. Summary and workflow links in references/vscode-containers.md.

  4. Multiple dev containers (multi-project, shared Docker Compose)
    See references/tools.md “Multiple containers / multi-project” and Chris Ayers – Multiple dev containers.

  5. OS-specific or troubleshooting (Git, Docker Desktop, cleanup, logs)
    See VS Code Dev Containers Tips and Tricks. Summary in references/tips-and-tricks.md.

  6. Feature ID, options, or install order
    Official Features: containers.dev/features, github.com/devcontainers/features. OCI refs: ghcr.io/devcontainers/features/<name>:<version>. Details in references/features.md. For authoring Features, see the Authoring section there and containers.dev/guide/feature-authoring-best-practices.

  7. Template or "template vs Feature vs Dockerfile"
    Official Templates: containers.dev/templates, github.com/devcontainers/templates. When to use which: references/templates.md.

  8. Spec concepts (lifecycle, merge, image metadata)
    Full spec: containers.dev/implementors/spec. Summary: references/spec.md.

Best practices (from official docs)

Only apply recommendations that are stated in the spec or official devcontainer documentation; cite the source when relevant.

When the spec or official docs do not state a recommendation, do not present it as a best practice; either omit it or phrase it as a suggestion with a clear citation.

Optional / community guidance: Community articles (e.g. Daytona – Ultimate guide to dev containers) suggest practices such as keeping images lightweight, caching dependencies, and using Docker Compose for multi-service setups. Use with attribution and prefer spec/official docs when they conflict.

Summary

  • Use this skill when editing devcontainer.json, choosing Features/Templates, authoring Features, or answering questions about dev containers or containers.dev.
  • Resolve questions via the canonical URLs above and the reference files under references/.
  • Best practices: cite containers.dev or devcontainers.github.io; only include guidance that appears there. For OS-specific or troubleshooting issues, consult VS Code Dev Containers Tips and Tricks and references/tips-and-tricks.md.