deploy-log-doctor
Part of shipsafe — offline deploy-safety skills. Every script is stdlib-only Python 3.8+; nothing leaves the machine.
Run the classifier on the log first, then interpret:
python3 scripts/diagnose_log.py <logfile> # or pipe: cat log | python3 scripts/diagnose_log.py -
python3 scripts/diagnose_log.py <logfile> --json # structured output
The script matches 11 curated failure signatures (missing env vars, case-sensitive imports, Node version mismatches, OOM, lockfile drift, peer-dep conflicts, Prisma generate, and more) and emits the root cause plus numbered fix steps.
Workflow:
- Save the user's log to a file (or pipe it) and run the script.
- If it returns a diagnosis, walk the user through the fix steps, adapting them to the user's actual framework and platform.
- If it returns nothing (exit 2), the log is probably truncated above the real error — ask for the section around the first ERROR line and rerun.
- After fixing, suggest the rollback-readiness skill to catch the next failure class before it happens.
Exit codes: 0 diagnosed, 2 no signature matched.
All paths below are relative to this skill's directory (deploy-log-doctor/).