Env Troubleshoot logo

Env Troubleshoot

Community
312362115
env-troubleshoot

环境排障技能:结构化排查开发环境问题。 覆盖 Node.js/Python/Docker 环境、依赖安装失败、端口冲突、权限问题等。 触发词:装不上、跑不起来、报错了、环境问题、npm install 失败、Docker 起不来、端口被占。 触发场景:依赖安装失败、服务启动报错、Docker 构建失败、环境变量缺失、版本冲突。 即使用户没有说"环境问题",只要是开发环境配置/启动相关的报错,都应触发此技能。

Overview

Publisher312362115
Repositoryclaude
Skill nameenv-troubleshoot
Stars
107
Forks
17
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by 312362115 on GitHub. Read the source before you install it.

Installation

Install the Env Troubleshoot AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/312362115/claude/tree/main/skills/env-troubleshoot
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/312362115/claude.git /tmp/claude
mkdir -p .claude/skills
cp -r /tmp/claude/skills/env-troubleshoot .claude/skills/env-troubleshoot
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Env Troubleshoot in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Env Troubleshoot on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Env Troubleshoot is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

环境排障(Env Troubleshoot)

环境问题的特点:每个人遇到的都不一样,但解决思路是一样的。 核心方法:读错误信息 → 定位问题类别 → 对症处理。


排障流程

环境报错
  │
  ├─ 1. 读错误信息(完整读,不跳过)
  ├─ 2. 分类问题
  ├─ 3. 按类别排查
  ├─ 4. 修复并验证
  └─ 5. 记录(如果是常见问题,建议加到项目 docs/guides/)

问题分类与排查

类别 1:依赖安装失败

常见错误:

错误特征可能原因排查步骤
ERESOLVE unable to resolvenpm 依赖版本冲突1. 读冲突详情 2. npm ls <冲突包> 3. 确定哪个依赖要求了不兼容版本
node-gyp rebuild FAILED原生模块编译失败1. 检查 node 版本 2. 检查 Python/build-tools 3. xcode-select --install(macOS)
EACCES permission denied权限不足1. 不要用 sudo 装 npm 2. 检查 npm 全局目录权限 3. 用 nvm 管理 node
network timeout网络问题1. 检查代理设置 2. 切换镜像源 npm config set registry
ModuleNotFoundError (Python)包未安装或虚拟环境未激活1. which python 确认解释器 2. 检查 venv 是否激活 3. pip install -r requirements.txt

类别 2:服务启动失败

错误特征可能原因排查步骤
EADDRINUSE :::3000端口被占用lsof -i :3000 找到占用进程,kill 或换端口
Error: Cannot find module模块缺失1. rm -rf node_modules && npm install 2. 检查路径拼写
ECONNREFUSED 127.0.0.1:5432依赖服务未启动检查 DB/Redis/等依赖服务是否运行
环境变量相关错误.env 缺失或变量缺失1. cp .env.example .env 2. 对照检查必填变量
SyntaxError: Unexpected tokenNode/TS 版本不匹配检查 node -v 和 engines 字段,检查 tsconfig

类别 3:Docker 问题

错误特征可能原因排查步骤
Cannot connect to Docker daemonDocker 未启动启动 Docker Desktop 或 systemctl start docker
no space left on device磁盘/Docker 空间不足docker system prune 清理无用镜像和容器
COPY failed: file not foundDockerfile 路径错误检查 COPY 源路径相对于 build context
构建卡在某一层网络问题或依赖下载慢检查 Docker 镜像源配置
容器启动后立即退出启动命令出错docker logs <container> 看日志

类别 4:版本冲突

场景排查步骤
Node.js 版本不对1. node -v 2. 检查 .nvmrc 或 engines 3. nvm use 切换
Python 版本不对1. python --version 2. 检查 pyproject.toml 3. 用 pyenv 切换
TypeScript 编译错误1. 检查 tsconfig.json target 2. npx tsc --version
全局工具版本冲突which <tool> 确认用的哪个,必要时用 npx 跑项目本地版本

类别 5:权限问题

场景排查步骤
macOS 文件权限ls -la 检查权限,chmod 修复
Git hook 没有执行权限chmod +x .git/hooks/* 或 chmod +x .husky/*
SSH key 权限chmod 600 ~/.ssh/id_*,chmod 700 ~/.ssh

排障原则

  • 先读错误信息:80% 的环境问题,错误信息本身就包含了答案。不要跳过错误信息直接猜
  • 从最简单的可能性开始:先检查服务是否启动、端口是否对、环境变量是否配了,再深入
  • 重现优先:如果用户描述的错误不完整,先复现问题再排查
  • 不要盲目清理:rm -rf node_modules 是最后手段,不是第一步。先理解为什么出错
  • 记录解法:如果是项目特有的环境问题,建议用户加到 docs/guides/ 或 README

通用排查命令速查

bash
# Node.js 环境
node -v && npm -v              # 版本检查
npm ls --depth=0               # 已安装依赖
npm cache clean --force        # 清理缓存
npx envinfo                    # 环境信息汇总

# Python 环境
python --version && pip --version
which python                   # 确认解释器路径
pip list                       # 已安装包
python -m venv .venv && source .venv/bin/activate  # 创建虚拟环境

# 端口/进程
lsof -i :3000                  # 查端口占用
kill -9 <PID>                  # 杀进程

# Docker
docker ps -a                   # 所有容器
docker logs <container>        # 容器日志
docker system df               # 磁盘占用
docker system prune            # 清理

# 通用
echo $PATH                     # PATH 检查
env | grep -i proxy            # 代理设置

Frequently asked questions

What does the Env Troubleshoot AI skill do?

环境排障技能:结构化排查开发环境问题。 覆盖 Node.js/Python/Docker 环境、依赖安装失败、端口冲突、权限问题等。 触发词:装不上、跑不起来、报错了、环境问题、npm install 失败、Docker 起不来、端口被占。 触发场景:依赖安装失败、服务启动报错、Docker 构建失败、环境变量缺失、版本冲突。 即使用户没有说"环境问题",只要是开发环境配置/启动相关的报错,都应触发此技能。

Why use Env Troubleshoot on TypingMind?

Because you install it once and use it with any model. Env Troubleshoot is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Env Troubleshoot in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/312362115/claude/tree/main/skills/env-troubleshoot. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Env Troubleshoot?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Env Troubleshoot?

As many as you like. As long as a model supports skills, you can use Env Troubleshoot with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Env Troubleshoot AI skill free?

Yes. It is published on GitHub by 312362115 under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇