env-doctor-freelisted
Install: claude install-skill justhandledlabs/skills
# Env Doctor
Diagnose the local environment before changing application code. Treat the project as innocent until the environment is ruled out.
## Workflow
1. Detect project type from files:
- Node: `package.json`
- Python: `requirements.txt`, `pyproject.toml`, `Pipfile`, or `manage.py`
- Go: `go.mod`
- Docker: `Dockerfile` or `docker-compose.yml`
2. Check runtime availability and versions:
- Node: `node --version` and `npm --version`
- Python: `python --version` or `python3 --version`
- Go: `go version`
- Docker: `docker --version` and `docker compose version`
3. Check dependencies:
- Node projects with no `node_modules/`: flag as high priority and suggest `npm install`.
- Python projects with no `.venv/`, `venv/`, or active virtual environment: flag and suggest creating one, then installing requirements.
- Go projects: run `go mod tidy` only after explaining it mutates `go.mod`/`go.sum`; otherwise suggest it as the fix.
- Docker projects: check whether Docker is running before suggesting rebuilds.
4. Check common port conflicts for `3000`, `3001`, `5000`, `8000`, and `8080`.
- On macOS/Linux, suggest `lsof -i :<port>`.
- On Windows PowerShell, suggest `Get-NetTCPConnection -LocalPort <port>`.
- If port `3000` is in use, explicitly include `lsof -i :3000` in the fix commands.
5. Validate environment variables:
- Compare `.env.example` against `.env` when both or either exist.
- Flag missing `.env` if `.env.example` exists