# Cleanup Check

> Verifica che l'ambiente sia stato lasciato pulito dopo le tue azioni. Invocala dopo operazioni che toccano filesystem, processi, container, nodi remoti via SSH/scp, file in /tmp. Use after work to confirm working trees clean, no orphan processes, no stale temp files — the user's next pull/run must hold no surprises. Triggers anche su "lascia pulito", "non dimenticare residui", quando hai usato `scp`/`cp` invece di git per propagare modifiche.

- Skill: `tommasobbianchi/cleanup-check` (Agent Skill)
- Install (CLI): `npx skillmds@latest add tommasobbianchi/cleanup-check`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tommasobbianchi/cleanup-check/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: tommasobbianchi (https://skillmd.com/u/tommasobbianchi)
- Updated: 2026-09-21
- Page: https://skillmd.com/skills/tommasobbianchi/cleanup-check

---


# Cleanup-Check — context-state hygiene

**Principio**: lasciare il sistema dell'utente come l'hai trovato (o meglio). Ogni residuo del tuo lavoro è un'imboscata per la prossima azione sua.

Per ogni ambiente toccato — locale + ogni nodo remoto via SSH + container + browser session:

1. **`git status`** sul repo → working tree pulito o residui giustificati e comunicati.
2. **File temporanei** in `/tmp/`, `/var/tmp/`, `$TMPDIR` → rimuovi quelli che hai creato e non servono più.
3. **Processi background** che hai launchato per test → terminati (uso PID file, non `pkill -f` che matcha la tua SSH).
4. **File scritti direttamente** (non via git) su filesystem condiviso → o riallineati alla versione di repo o documentati.
5. **Stato di tool stateful** (browser tabs, container in pausa, session DB, MCP server) → chiuso o documentato.

Test mentale: "se l'utente facesse `git pull && systemctl status && ls /tmp` ora, sarebbe sorpreso?" Se sì, fai cleanup.

