home / skills / sfc-gh-dflippo / snowflake-dbt-demo / devcontainer-setup

devcontainer-setup skill

/.claude/skills/devcontainer-setup

This skill helps you create AI-ready DevContainers with snowflake-ai-tools scaffolding, enabling rapid containerized development across AI workflows.

npx playbooks add skill sfc-gh-dflippo/snowflake-dbt-demo --skill devcontainer-setup

Review the files below or copy the command above to add this skill to your agents.

Files (7)
SKILL.md
3.5 KB
---
name: devcontainer-setup
description:
  Create Universal DevContainers optimized for AI agentic workflows with Claude Code, Snowflake CLI,
  Cortex Code, and dbt. Use when setting up development containers, configuring devcontainer.json,
  scaffolding AI-ready environments, or when the user mentions devcontainers, containerized
  development, or Docker development environments.
---

# DevContainer Setup Skill

## When to Use

- User asks to set up a DevContainer or development environment
- User mentions AI-ready development setup
- Project needs containerized development with multiple language runtimes

## Instructions

### Step 1: Create directory structure

```bash
mkdir -p .devcontainer/snowflake-ai-tools
```

### Step 2: Copy templates

Copy these files from the skill templates folder:

| Source                                                   | Destination                                                  |
| -------------------------------------------------------- | ------------------------------------------------------------ |
| `templates/devcontainer.json`                            | `.devcontainer/devcontainer.json`                            |
| `templates/snowflake-ai-tools/devcontainer-feature.json` | `.devcontainer/snowflake-ai-tools/devcontainer-feature.json` |
| `templates/snowflake-ai-tools/install.sh`                | `.devcontainer/snowflake-ai-tools/install.sh`                |

If no `requirements.txt` exists in project root, also copy:

| Source                       | Destination        |
| ---------------------------- | ------------------ |
| `templates/requirements.txt` | `requirements.txt` |

### Step 3: Make scripts executable

```bash
chmod +x .devcontainer/snowflake-ai-tools/install.sh
```

### Step 4: Remind user to create host directories

Run this on their host machine before opening the devcontainer:

```bash
mkdir -p ~/.m2 ~/.npm ~/.cache/uv ~/.cargo ~/.snowflake ~/.claude ~/.cursor
```

### Step 5: Remind user about config files

These should exist on the host:

- `~/.snowflake/connections.toml` - Snowflake CLI config
- `~/.claude/` - Claude Code config

## Template Locations

All templates are in this skill's `templates/` folder:

- [templates/devcontainer.json](templates/devcontainer.json)
- [templates/snowflake-ai-tools/](templates/snowflake-ai-tools/)
- [templates/requirements.txt](templates/requirements.txt)

## Troubleshooting

| Issue                      | Solution                                                                                  |
| -------------------------- | ----------------------------------------------------------------------------------------- |
| NPM EACCES errors          | `sudo chown -R $(whoami) "$HOME/.npm"`                                                    |
| UID mismatch on Linux      | Verify `updateRemoteUserUID: true` in devcontainer.json                                   |
| Cache permission issues    | Run `snowflake-ai-tools-setup` to re-fix permissions                                      |
| Mount directory not found  | Run `mkdir -p ~/.m2 ~/.npm ~/.cache/uv ~/.cargo ~/.snowflake ~/.claude ~/.cursor` on host |
| Tools not found            | Check Docker build logs for install errors                                                |
| Different user than vscode | Update mount targets and containerEnv paths in devcontainer.json                          |

## Reference

See [README.md](README.md) for detailed documentation on:

- What's included (features, tools, mounts)
- Compatibility (base images, architectures)
- Python environment setup

Overview

This skill creates Universal DevContainers optimized for AI agent workflows, bundling Claude Code, Snowflake CLI, Cortex Code, and dbt. It scaffolds the .devcontainer layout, copies ready-made templates, and prepares host mounts and config hints so containers work smoothly for data and model development. Use it to get a consistent, reproducible developer environment for agentic and data engineering tasks.

How this skill works

The skill scaffolds a .devcontainer directory and installs a feature pack that includes Snowflake and AI tooling. It copies devcontainer.json, a feature manifest, and an install script into the project, makes the scripts executable, and instructs the user to create host-side cache and config directories for seamless mounts. Finally, it provides common troubleshooting checks for permission and mount issues.

When to use it

  • You need a reproducible containerized dev environment for AI agents or data engineering
  • Setting up devcontainer.json or adding features like Snowflake CLI, Claude, or dbt
  • Onboarding new contributors who require the same toolchain and mounts
  • Preparing development for multi-language projects (Python, Node, Java, Rust)
  • Resolving inconsistent local setups caused by missing host caches or config files

Best practices

  • Create the .devcontainer/snowflake-ai-tools directory and copy templates before opening the container
  • Run chmod +x on install scripts so the container build can execute them
  • Create host directories (~/.m2, ~/.npm, ~/.cache/uv, ~/.cargo, ~/.snowflake, ~/.claude, ~/.cursor) to avoid mount failures
  • Keep Snowflake CLI and Claude config files on the host (~/.snowflake/connections.toml and ~/.claude/) rather than in the container
  • Set updateRemoteUserUID: true in devcontainer.json on Linux hosts to avoid UID mismatches

Example use cases

  • Scaffold a devcontainer for a dbt + Snowflake analytics project that also needs Claude Code for local agent testing
  • Provision a development environment for a multi-runtime repo (Python, Node, Java) that shares caches across containers
  • Onboard a new team member with a single command to copy templates and create required host folders
  • Fix permission and tool-install issues by re-running the included snowflake-ai-tools setup script

FAQ

What host directories must exist before opening the devcontainer?

Create ~/.m2, ~/.npm, ~/.cache/uv, ~/.cargo, ~/.snowflake, ~/.claude, and ~/.cursor on your host to ensure mounts are available.

Where should Snowflake and Claude configs live?

Keep Snowflake CLI config at ~/.snowflake/connections.toml and Claude Code configuration in ~/.claude/ on the host for secure, persistent access.