[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-d0f8ab65-b360-4f9e-9631-eaa7621492c4":3,"$fxmqgXzqKrnrf_8dC5CtV6qmBquuwJUUSalokyQzKG10":42},{"id":4,"title":5,"description":6,"categoryId":7,"moduleId":8,"tags":9,"prompt":10,"icon":11,"source":12,"sourceUrl":13,"authorId":14,"authorName":15,"isPublic":16,"stars":17,"runs":18,"createdAt":19,"updatedAt":19,"module":20,"category":27,"packages":33},"d0f8ab65-b360-4f9e-9631-eaa7621492c4","devcontainer-setup","创建带有Claude Code、语言特定工具（Python\u002FNode\u002FRust\u002FGo）和持久卷的devcontainer。用于向项目添加devcontainer支持、设置隔离的开发环境或配置沙盒化的Claude Code工作区。","cat_coding_backend","mod_coding","sickn33,coding","---\nname: devcontainer-setup\ndescription: Creates devcontainers with Claude Code, language-specific tooling (Python\u002FNode\u002FRust\u002FGo), and persistent volumes. Use when adding devcontainer support to a project, setting up isolated development environments, or configuring sandboxed Claude Code workspaces.\nrisk: safe\nsource: vibeship-spawner-skills (Apache 2.0)\ndate_added: 2026-03-06\n---\n\n# Devcontainer Setup Skill\n\nCreates a pre-configured devcontainer with Claude Code and language-specific tooling.\n\n## When to Use\n- User asks to \"set up a devcontainer\" or \"add devcontainer support\"\n- User wants a sandboxed Claude Code development environment\n- User needs isolated development environments with persistent configuration\n\n## When NOT to Use\n\n- User already has a devcontainer configuration and just needs modifications\n- User is asking about general Docker or container questions\n- User wants to deploy production containers (this is for development only)\n\n## Workflow\n\n```mermaid\nflowchart TB\n    start([User requests devcontainer])\n    recon[1. Project Reconnaissance]\n    detect[2. Detect Languages]\n    generate[3. Generate Configuration]\n    write[4. Write files to .devcontainer\u002F]\n    done([Done])\n\n    start --> recon\n    recon --> detect\n    detect --> generate\n    generate --> write\n    write --> done\n```\n\n## Phase 1: Project Reconnaissance\n\n### Infer Project Name\n\nCheck in order (use first match):\n\n1. `package.json` → `name` field\n2. `pyproject.toml` → `project.name`\n3. `Cargo.toml` → `package.name`\n4. `go.mod` → module path (last segment after `\u002F`)\n5. Directory name as fallback\n\nConvert to slug: lowercase, replace spaces\u002Funderscores with hyphens.\n\n### Detect Language Stack\n\n| Language | Detection Files |\n|----------|-----------------|\n| Python | `pyproject.toml`, `*.py` |\n| Node\u002FTypeScript | `package.json`, `tsconfig.json` |\n| Rust | `Cargo.toml` |\n| Go | `go.mod`, `go.sum` |\n\n### Multi-Language Projects\n\nIf multiple languages are detected, configure all of them in the following priority order:\n\n1. **Python** - Primary language, uses Dockerfile for uv + Python installation\n2. **Node\u002FTypeScript** - Uses devcontainer feature\n3. **Rust** - Uses devcontainer feature\n4. **Go** - Uses devcontainer feature\n\nFor multi-language `postCreateCommand`, chain all setup commands:\n```\nuv run \u002Fopt\u002Fpost_install.py && uv sync && npm ci\n```\n\nExtensions and settings from all detected languages should be merged into the configuration.\n\n## Phase 2: Generate Configuration\n\nStart with base templates from `resources\u002F` directory. Substitute:\n\n- `{{PROJECT_NAME}}` → Human-readable name (e.g., \"My Project\")\n- `{{PROJECT_SLUG}}` → Slug for volumes (e.g., \"my-project\")\n\nThen apply language-specific modifications below.\n\n## Base Template Features\n\nThe base template includes:\n\n- **Claude Code** with marketplace plugins (anthropics\u002Fskills, trailofbits\u002Fskills, trailofbits\u002Fskills-curated)\n- **Python 3.13** via uv (fast binary download)\n- **Node 22** via fnm (Fast Node Manager)\n- **ast-grep** for AST-based code search\n- **Network isolation tools** (iptables, ipset) with NET_ADMIN capability\n- **Modern CLI tools**: ripgrep, fd, fzf, tmux, git-delta\n\n---\n\n## Language-Specific Sections\n\n### Python Projects\n\n**Detection:** `pyproject.toml`, `requirements.txt`, `setup.py`, or `*.py` files\n\n**Dockerfile additions:**\n\nThe base Dockerfile already includes Python 3.13 via uv. If a different version is required (detected from `pyproject.toml`), modify the Python installation:\n\n```dockerfile\n# Install Python via uv (fast binary download, not source compilation)\nRUN uv python install \u003Cversion> --default\n```\n\n**devcontainer.json extensions:**\n\nAdd to `customizations.vscode.extensions`:\n```json\n\"ms-python.python\",\n\"ms-python.vscode-pylance\",\n\"charliermarsh.ruff\"\n```\n\nAdd to `customizations.vscode.settings`:\n```json\n\"python.defaultInterpreterPath\": \".venv\u002Fbin\u002Fpython\",\n\"[python]\": {\n  \"editor.defaultFormatter\": \"charliermarsh.ruff\",\n  \"editor.codeActionsOnSave\": {\n    \"source.organizeImports\": \"explicit\"\n  }\n}\n```\n\n**postCreateCommand:**\nIf `pyproject.toml` exists, chain commands:\n```\nrm -rf .venv && uv sync && uv run \u002Fopt\u002Fpost_install.py\n```\n\n---\n\n### Node\u002FTypeScript Projects\n\n**Detection:** `package.json` or `tsconfig.json`\n\n**No Dockerfile additions needed:** The base template includes Node 22 via fnm (Fast Node Manager).\n\n**devcontainer.json extensions:**\n\nAdd to `customizations.vscode.extensions`:\n```json\n\"dbaeumer.vscode-eslint\",\n\"esbenp.prettier-vscode\"\n```\n\nAdd to `customizations.vscode.settings`:\n```json\n\"editor.defaultFormatter\": \"esbenp.prettier-vscode\",\n\"editor.codeActionsOnSave\": {\n  \"source.fixAll.eslint\": \"explicit\"\n}\n```\n\n**postCreateCommand:**\nDetect package manager from lockfile and chain with base command:\n- `pnpm-lock.yaml` → `uv run \u002Fopt\u002Fpost_install.py && pnpm install --frozen-lockfile`\n- `yarn.lock` → `uv run \u002Fopt\u002Fpost_install.py && yarn install --frozen-lockfile`\n- `package-lock.json` → `uv run \u002Fopt\u002Fpost_install.py && npm ci`\n- No lockfile → `uv run \u002Fopt\u002Fpost_install.py && npm install`\n\n---\n\n### Rust Projects\n\n**Detection:** `Cargo.toml`\n\n**Features to add:**\n\n```json\n\"ghcr.io\u002Fdevcontainers\u002Ffeatures\u002Frust:1\": {}\n```\n\n**devcontainer.json extensions:**\n\nAdd to `customizations.vscode.extensions`:\n```json\n\"rust-lang.rust-analyzer\",\n\"tamasfe.even-better-toml\"\n```\n\nAdd to `customizations.vscode.settings`:\n```json\n\"[rust]\": {\n  \"editor.defaultFormatter\": \"rust-lang.rust-analyzer\"\n}\n```\n\n**postCreateCommand:**\nIf `Cargo.lock` exists, use locked builds:\n```\nuv run \u002Fopt\u002Fpost_install.py && cargo build --locked\n```\nIf no lockfile, use standard build:\n```\nuv run \u002Fopt\u002Fpost_install.py && cargo build\n```\n\n---\n\n### Go Projects\n\n**Detection:** `go.mod`\n\n**Features to add:**\n\n```json\n\"ghcr.io\u002Fdevcontainers\u002Ffeatures\u002Fgo:1\": {\n  \"version\": \"latest\"\n}\n```\n\n**devcontainer.json extensions:**\n\nAdd to `customizations.vscode.extensions`:\n```json\n\"golang.go\"\n```\n\nAdd to `customizations.vscode.settings`:\n```json\n\"[go]\": {\n  \"editor.defaultFormatter\": \"golang.go\"\n},\n\"go.useLanguageServer\": true\n```\n\n**postCreateCommand:**\n```\nuv run \u002Fopt\u002Fpost_install.py && go mod download\n```\n\n---\n\n## Reference Material\n\nFor additional guidance, see:\n- `references\u002Fdockerfile-best-practices.md` - Layer optimization, multi-stage builds, architecture support\n- `references\u002Ffeatures-vs-dockerfile.md` - When to use devcontainer features vs custom Dockerfile\n\n---\n\n## Adding Persistent Volumes\n\nPattern for new mounts in `devcontainer.json`:\n\n```json\n\"mounts\": [\n  \"source={{PROJECT_SLUG}}-\u003Cpurpose>-${devcontainerId},target=\u003Ccontainer-path>,type=volume\"\n]\n```\n\nCommon additions:\n- `source={{PROJECT_SLUG}}-cargo-${devcontainerId},target=\u002Fhome\u002Fvscode\u002F.cargo,type=volume` (Rust)\n- `source={{PROJECT_SLUG}}-go-${devcontainerId},target=\u002Fhome\u002Fvscode\u002Fgo,type=volume` (Go)\n\n---\n\n## Output Files\n\nGenerate these files in the project's `.devcontainer\u002F` directory:\n\n1. `Dockerfile` - Container build instructions\n2. `devcontainer.json` - VS Code\u002Fdevcontainer configuration\n3. `post_install.py` - Post-creation setup script\n4. `.zshrc` - Shell configuration\n5. `install.sh` - CLI helper for managing the devcontainer (`devc` command)\n\n---\n\n## Validation Checklist\n\nBefore presenting files to the user, verify:\n\n1. All `{{PROJECT_NAME}}` placeholders are replaced with the human-readable name\n2. All `{{PROJECT_SLUG}}` placeholders are replaced with the slugified name\n3. JSON syntax is valid in `devcontainer.json` (no trailing commas, proper nesting)\n4. Language-specific extensions are added for all detected languages\n5. `postCreateCommand` includes all required setup commands (chained with `&&`)\n\n---\n\n## User Instructions\n\nAfter generating, inform the user:\n\n1. How to start: \"Open in VS Code and select 'Reopen in Container'\"\n2. Alternative: `devcontainer up --workspace-folder .`\n3. CLI helper: Run `.devcontainer\u002Finstall.sh self-install` to add the `devc` command to PATH\n\n## Limitations\n- Use this skill only when the task clearly matches the scope described above.\n- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.\n- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.\n","","imported","https:\u002F\u002Fgithub.com\u002Fsickn33\u002Fantigravity-awesome-skills","user_system_seed","SkillOPIC",true,202,1040,"2026-05-16 13:15:17",{"id":8,"name":21,"slug":22,"icon":23,"description":24,"sort":25,"createdAt":26},"编程开发","coding","mdi-code-braces","代码生成、调试、审查，提升开发效率",2,"2026-05-16 12:53:40",{"id":7,"name":28,"slug":29,"icon":30,"description":31,"moduleId":8,"sort":25,"skillCount":32,"createdAt":26},"后端开发","backend","mdi-server","API、数据库、服务端架构",296,[34],{"id":35,"skillId":4,"version":36,"fileName":37,"fileSize":38,"filePath":39,"fileHash":40,"manifest":41,"createdAt":19},"30bd2733-453e-4064-ac60-1393bb9d1628","1.0.0","devcontainer-setup.zip",3180,"uploads\u002Fskills\u002Fd0f8ab65-b360-4f9e-9631-eaa7621492c4\u002Fdevcontainer-setup.zip","a3d6100bc83eb7e8bb3b7c906698b91f690b59117ff3703814618c566b5ff625","[{\"path\":\"SKILL.md\",\"isDirectory\":false,\"size\":8239}]",{"code":43,"message":44,"data":45},200,"success",{"items":46,"stats":47,"page":50},[],{"averageRating":48,"totalRatings":48,"ratingCounts":49},0,[48,48,48,48,48],{"limit":51,"offset":48,"hasMore":52,"nextOffset":51,"ratedOnly":16},15,false]