mise-devcontainer-patterns

Define canonical devcontainer.json patterns for mise-powered projects.

1|1|Updated Apr 8, 2026
One-click install
npx skills add https://github.com/ray-manaloto/claude-code-marketplace --skill mise-devcontainer-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mise-devcontainer-patterns
Source: https://github.com/ray-manaloto/claude-code-marketplace/tree/main/mise-toolkit/skills/mise-devcontainer-patterns
Command: npx skills add https://github.com/ray-manaloto/claude-code-marketplace --skill mise-devcontainer-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill provides canonical devcontainer.json patterns for projects using mise, enabling repeatable, secure, and predictable container-based development environments across multi-folder workspaces.

Core Features & Use Cases

  • OnCreate vs PostCreate: document how to place tool installation in onCreateCommand and source-dependent setup in postCreateCommand to optimize prebuild caching.
  • Environment & Trust: configure containerEnv, remoteEnv, and MISE_TRUSTED_CONFIG_PATHS to enforce security and reliability.
  • Mounts & User: specify SSH key forwarding and respect a dedicated remoteUser for consistent container behavior.
  • Multi-Workspace Patterns: guide organizing multiple repos under /workspaces and trusting their config.

Quick Start

Draft and review a complete devcontainer.json pattern that integrates mise with onCreateCommand, postCreateCommand, mounts, environment shims, and trust rules.

{
  "name": "myproject",
  "image": "mcr.microsoft.com/devcontainers/base:debian",
  "onCreateCommand": "curl https://mise.run | sh && echo 'eval \"$(/home/vscode/.local/bin/mise activate bash)\"' >> /home/vscode/.bashrc && /home/vscode/.local/bin/mise trust && /home/vscode/.local/bin/mise install",
  "postCreateCommand": "mise exec -- npm ci || true",
  "containerEnv": {
    "MISE_TRUSTED_CONFIG_PATHS": "/workspaces"
  },
  "remoteEnv": {
    "PATH": "/home/vscode/.local/share/mise/shims:${containerEnv:PATH}"
  },
  "mounts": [
    "source=${localEnv:HOME}/.ssh,target=/home/vscode/.ssh,type=bind,consistency=cached,readonly"
  ],
  "customizations": {
    "vscode": {
      "extensions": [
        "hverlin.mise-vscode"
      ],
      "settings": {
        "terminal.integrated.defaultProfile.linux": "bash"
      }
    }
  },
  "remoteUser": "vscode",
  "waitFor": "onCreateCommand"
}

Frequently Asked Questions about mise-devcontainer-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure a devcontainer.json for a mise project?

Configuring a devcontainer for mise requires setting onCreateCommand to install mise and run mise trust, postCreateCommand for source-dependent setup, and remoteEnv PATH to include mise shims for deterministic startup.

What's the difference between onCreateCommand and postCreateCommand for mise devcontainers?

In mise devcontainers, onCreateCommand handles tool installation to optimize prebuild caching, while postCreateCommand executes source-dependent setup like installing npm dependencies after the container is created.

How do I set up mise trusted config paths for multi-folder workspaces in Codespaces?

Set the containerEnv variable MISE_TRUSTED_CONFIG_PATHS to /workspaces in your devcontainer.json to enforce security and trust configuration across multiple repos organized under that directory.

Can I mount SSH keys and use mise shims in a VSCode devcontainer?

Yes, use the mounts property to bind-mount your local ~/.ssh directory read-only, and set remoteEnv PATH to prepend mise shim paths to the container PATH for consistent VSCode and Codespaces behavior.

Does mise work with GitHub Codespaces prebuilds?

Yes, mise works with Codespaces prebuilds by placing tool installation in onCreateCommand and setting waitFor to onCreateCommand, ensuring deterministic prebuild caching and reliable startup before the container becomes available.

Why are mise shims missing from my PATH in a devcontainer?

Mise shims are missing when remoteEnv PATH is not configured to include /home/vscode/.local/share/mise/shims, preventing the container from locating mise-managed executables during VSCode terminal sessions.