Files
market/skills/dev-environment-setup/SKILL.md
yi-ge 1a50969b93 feat: 拆分 environment-setup 为 Python/Node.js 运行时双核心 + 父级路由
新增双核心 skill(深度集成 DesireCore Hatch/Volta + HTTP API + Socket.IO):
- python-runtime v1.0.1:Python 运行时管理
  · 四级降级:HTTP API → Hatch CLI 绝对路径 → 系统包管理器 → pyenv
  · references:hatch-desirecore / pyenv-fallback / virtualenv / troubleshooting
  · scripts/probe-python.sh:输出 JSON 快照供 Claude 解析决策
- nodejs-runtime v1.0.1:Node.js 运行时管理
  · 四级降级:HTTP API → Volta CLI → 系统包管理器/NodeSource → nvm/fnm
  · references:volta-desirecore / nvm-fallback / package-managers / troubleshooting
  · scripts/probe-node.sh:输出 JSON 快照(含 volta_tools / package_json_volta 等)

environment-setup → dev-environment-setup v2.0.1(重命名 + 重写为 router):
- 从 1380 行手册瘦身为 ~150 行索引
- 仅负责容器(Docker/Podman)/ WSL2 / 办公依赖速查 / 系统工具
- references/desirecore-runtime.md 沉淀 Hatch/Volta 路径表 + HTTP API 速查 +
  Socket.IO 事件契约,作为两个核心 skill 的共享底座
- references/decision-tree.md 定义四级降级决策树
- scripts/probe.sh + probe.ps1 系统级 JSON 探测

三个 SKILL.md 的 L0 改为场景驱动结构(何时使用 / 何时不要用 / 怎么做),
让 AI 凭名字与 L0 即可判断匹配场景。

注册更新:
- builtin-skills.json:新增 python-runtime / nodejs-runtime / dev-environment-setup
  (原 environment-setup 移除),按字母序,共 21 个 skill
- manifest.json:totalSkills 19→21,lastUpdated 2026-05-02

下游同步:
- docx / pdf / xlsx / pptx 中的环境引用从 environment-setup 拆分为
  python-runtime / nodejs-runtime / dev-environment-setup 三向指引

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-02 13:30:23 +08:00

7.1 KiB
Raw Blame History

name, description, version, type, risk_level, status, disable-model-invocation, tags, metadata, market
name description version type risk_level status disable-model-invocation tags metadata market
开发环境综合配置 Use this skill as a router/index when the user faces a development environment question that spans multiple domains: containers (Docker/Podman), WSL2 on Windows, office-skill dependencies (DOCX/PDF/XLSX/ PPTX), or system tools (LibreOffice/Poppler/Pandoc/Tesseract). For pure Python issues use python-runtime skill; for pure Node.js issues use nodejs-runtime skill. Triggers include: "setup environment", "PATH", "WSL", "WSL2", "docker not found", "podman", "container", "office dependency", "LibreOffice", "poppler", "pandoc", "tesseract", or any cross-cutting environment question. 使用场景:用户提到 环境配置、PATH、 容器、Docker、Podman、WSL、WSL2、办公依赖、系统工具或不确定属于 Python / Node.js 时的入口指引。 2.0.1 procedural low enabled true
environment
docker
container
wsl
office
system-tools
router
author updated_at
desirecore 2026-05-02
icon short_desc category maintainer channel
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"><defs><linearGradient id="env-a" x1="3" y1="3" x2="21" y2="21" gradientUnits="userSpaceOnUse"><stop stop-color="#34C759"/><stop offset="1" stop-color="#007AFF"/></linearGradient></defs><rect x="3" y="3" width="18" height="18" rx="3" fill="url(#env-a)" fill-opacity="0.1" stroke="url(#env-a)" stroke-width="1.5"/><path d="M7 8l3 3-3 3" stroke="url(#env-a)" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M13 16h4" stroke="url(#env-a)" stroke-width="1.5" stroke-linecap="round"/></svg> 开发环境综合入口(容器 / WSL / 办公依赖 / 系统工具) productivity
name verified
DesireCore Official true
latest

dev-environment-setup 技能v2.0.0 router

L0一句话摘要

何时使用:用户需要

  • 安装 / 排查 DockerPodman 容器("docker not found"、daemon 启动、镜像加速等)
  • 在 Windows 上配置 WSL2Linux 子系统)
  • 一次性安装 办公技能依赖DOCX / PDF / XLSX / PPTX 所需的 Python 包 + npm 包 + 系统工具)
  • 安装 系统工具LibreOffice / Poppler / Pandoc / Tesseract / qpdf / ImageMagick / Ghostscript / Git
  • 不确定 问题属于 Python 还是 Node.js需要先做综合诊断

何时不要用:纯 Python 问题用 python-runtime,纯 Node.js 问题用 nodejs-runtime

怎么做:先跑 scripts/probe.shWindows 用 probe.ps1)取系统快照 JSON 按结果路由到对应 references 或子 skill同时也是 DesireCore 内置 Hatch / Volta / HTTP API / Socket.IO 集成的事实源(references/desirecore-runtime.md)。

L1路由规则

按用户问题的关键字直接转到对应 skill 或文档:

关键字 / 场景 路径
python / pip / venv / pyenv / hatch / virtualenv / PEP 668 python-runtime skill
node / npm / pnpm / yarn / volta / nvm / fnm / EACCES nodejs-runtime skill
docker / podman / container / 容器守护进程 references/container.md
WSL / WSL2 / Windows Linux 子系统 references/wsl.md
DOCX / PDF / XLSX / PPTX 依赖 / 办公技能依赖 references/office-deps.md
LibreOffice / poppler / pandoc / tesseract / qpdf references/system-tools.md
不确定属于哪类、想要快速诊断 先跑 scripts/probe.sh 看 JSON
DesireCore Hatch / Volta / HTTP API / Socket.IO references/desirecore-runtime.md
四级降级决策API → CLI → 包管理器 → 社区方案) references/decision-tree.md

L2详细规范

第一步:快速诊断

bash skills/dev-environment-setup/scripts/probe.sh > /tmp/env-probe.json
cat /tmp/env-probe.json | jq .

输出字段含义:见 references/probe-snapshot.md。Windows 用 scripts/probe.ps1

第二步:按结果路由

  • desirecore_api 非空 → 走 HTTP API 路径(references/desirecore-runtime.md
  • tools.python3.available = falsetools.node.available = false → 进入对应子 skill
  • tools.docker.available = false 且用户需容器 → references/container.md
  • wsl.installed = false 且 Windows 用户 → references/wsl.md

第三步:执行子 skill 决策树

python-runtimenodejs-runtime 都有自己的四级降级L1 API → L2 内置 CLI → L3 系统包管理器 → L4 社区方案),定义在共享的 references/decision-tree.md

第四步:办公技能依赖

办公四件套DOCX / PDF / XLSX / PPTX依赖速查references/office-deps.md。包含 Python 包、npm 包、系统工具的一键安装命令。

第五步:系统工具

LibreOffice / Poppler / Pandoc / Tesseract / qpdf / ImageMagick / Ghostscript 安装与故障排查:references/system-tools.md

DesireCore 内置环境管理底座

DesireCore 内置 HatchPython和 VoltaNode.js通过 HTTP API + Socket.IO 提供完整的环境管理能力。本 skill 与子 skillpython/nodejs都依赖

文档 内容
references/desirecore-runtime.md 二进制路径表、HTTP API 速查、Socket.IO 事件契约、EnvironmentSnapshot 数据结构
references/decision-tree.md 四级降级流程图、判定失败的具体信号、切换提示
references/probe-snapshot.md 探测脚本 JSON 输出协议

重要约束

  1. 不要把 python / node / pip / npm 强关键词写入本 skill description——这些归属各自的子 skill避免触发冲突。
  2. API 优先scripts/probe.sh 第一步检测 ~/.desirecore/agent-service.port;存在则推荐 HTTP API 路径。
  3. 缓存协同:任何安装/移除完成后,调 POST /api/runtime/environment/refresh 失效缓存,再发后续 GET。
  4. 跨平台:所有命令模板提供 macOS / Linux + WindowsPowerShell双版本。

子 skill 与文档清单

skills/
├── python-runtime/        # Python 环境Hatch 优先)
├── nodejs-runtime/        # Node.js 环境Volta 优先)
└── dev-environment-setup/         # 本 skill综合入口
    ├── references/
    │   ├── desirecore-runtime.md
    │   ├── decision-tree.md
    │   ├── probe-snapshot.md
    │   ├── container.md
    │   ├── wsl.md
    │   ├── office-deps.md
    │   └── system-tools.md
    └── scripts/
        ├── probe.sh
        └── probe.ps1

升级说明v1.x → v2.0.0

  • v1.x 是单文件 1380 行的全能手册,已拆分。
  • Python 相关 → python-runtime
  • Node.js 相关 → nodejs-runtime
  • Docker / WSL / 办公依赖 / 系统工具 → 本 skill 的 references/
  • DesireCore Hatch / Volta 从"可选社区方案"升级为强制 L1/L2 主路径

下游 skilldocx / pdf / xlsx / pptx应将 "Python 环境问题请参考 dev-environment-setup" 改写为 "Python 环境问题请参考 python-runtime / Node.js 环境问题请参考 nodejs-runtime"。