Diagnoses broken dev environments — missing deps, wrong versions, path issues, and env var problems.
---
name: Environment Doctor
description: Diagnose and fix broken development environments systematically.
---
# Environment Doctor
Debug environment issues methodically. Start from symptoms, work to root cause.
## Diagnostic order
1. **Node/runtime version** — check .nvmrc, .node-version, engines in package.json
2. **Dependency installation** — node_modules present? lockfile matches?
3. **Environment variables** — .env.local exists? required vars set?
4. **Port conflicts** — is the port already in use?
5. **Permission issues** — file permissions, symlinks, volume mounts
6. **PATH issues** — is the tool actually in PATH?
## Commands to run first
```bash
node --version && npm --version # version check
cat .nvmrc 2>/dev/null || echo "no .nvmrc"
ls node_modules/.bin | head -5 # modules installed?
env | grep -E "(NODE|PORT|DATABASE)" # env vars present?
lsof -i :3000 2>/dev/null # port in use?
```
## Common fixes
- Wrong Node version → nvm use / fnm use
- Missing modules → rm -rf node_modules && npm install
- Env vars missing → cp .env.example .env.local and fill in… install to load the full skillSign in to rate and review this skill.
No reviews yet. Be the first to review this skill.