process-hygiene

process-hygiene is a skill for Claude Code from chipi/agentic-ai-homelab. It costs 100 tokens per session (691 once invoked), scanned A, original, MIT.

A procedure for cleaning up processes, containers, and CI watchers left behind by a killed build, stuck test, out-of-memory job, or crashed session. It limits cleanup to the current user's work on a shared machine.

In plain words
What is it for?
Use it after an abnormal termination and before rerunning work to identify and stop your own processes, clean checkout-scoped containers, and remove stale GitHub Actions watchers.
Why use it?
It prevents leftover work from interfering with a rerun while avoiding the accidental termination of another developer's processes or containers.

Skill for Claude Code

Written for Claude Code: SessionEnd hook event. Also seen: reads .claude/ paths.

Good fit Use it after an abnormal termination and before rerunning work to identify and stop your own processes, clean checkout-scoped containers, and remove stale GitHub Actions watchers.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/chipi/agentic-ai-homelab/process-hygiene
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add chipi/agentic-ai-homelab --skill process-hygiene
Clone the repo
git clone --depth 1 https://github.com/chipi/agentic-ai-homelab

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for process-hygiene

README.md
[![agentmods](https://agentmods.dev/badge/skills/chipi/agentic-ai-homelab/process-hygiene/github.svg)](https://agentmods.dev/skills/chipi/agentic-ai-homelab/process-hygiene)
Your own site
<a href="https://agentmods.dev/skills/chipi/agentic-ai-homelab/process-hygiene"><img src="https://agentmods.dev/badge/skills/chipi/agentic-ai-homelab/process-hygiene/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for process-hygiene

Your own site · 80×15
<a href="https://agentmods.dev/skills/chipi/agentic-ai-homelab/process-hygiene"><img src="https://agentmods.dev/badge/skills/chipi/agentic-ai-homelab/process-hygiene.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 100 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 691 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00100 $0.00691
Opus 5.5 $0.00040 $0.00276
Sonnet 5.5 $0.00020 $0.00138
Haiku 4.5 $0.00010 $0.00069

Measured 8d ago against content hash d0e8fb8ac5e4, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

process-hygiene scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

workstation/claude/skills/process-hygiene/SKILL.md · 52 lines

How it starts

The opening of the file, as written. The whole thing — 52 lines — stays where its author put it; the contents beside it link to each section on GitHub.

process-hygiene

Killed builds, hung tests and OOMed ML jobs leave orphan processes behind (on macOS especially). Clean them up before re-running, and clean up only what is yours: on a shared workstation other checkouts, projects and agents run the same node, vite and playwright binaries.

What is yours

  • A PID or process group you captured when you started it.
  • A checkout-scoped mechanism: docker compose in that checkout, the repo's own cleaner.
  • Never pkill, killall or pkill -f <pattern>.
  • pgrep -f <pattern> also matches your own checking command (its command line contains the pattern). Confirm a PID with ps -o pid,args -p <pid> before calling it a leftover, or use a pattern that cannot match itself (pgrep -f '[e]vh run').
  • Docker: compose-project scoped only; never docker system/volume/image prune.

Full rules: workstation/DEVELOPER-SETUP.md, "Multi-agent safety rules".

The session reaper

A global SessionEnd hook, ~/.claude/hooks/session-reap.sh, runs when any session ends:

  • It reaps that session's tool processes.
  • It sweeps runaway gh run poll loops (while true; do gh run …; done CI watchers that leak when a session dies and poll the GitHub API for days).
  • It sweeps orphaned tail -f <file> | grep … watchers whose session and file are gone.
  • It is family-scoped by project-name prefix (on the Linux workstation, /work/<project>/): an orrery session never touches a podcast process.

Run it by hand, dry run first:

SESSION_REAP_DRY_RUN=1 bash ~/.claude/hooks/session-reap.sh <dir>   # what it would stop
bash ~/.claude/hooks/session-reap.sh <dir>                          # stop them

In a repo, bash scripts/cleanup-worktree.sh [--stale-loops] [--dry-run] is the per-repo cleaner.

Habits that keep it clean

  • Stop a background tail -f watcher by PID when you are done with it.
  • Never background a gh run watch loop without a bound: for i in $(seq …), not while true.
  • At the end of a work block, check for your own leftovers.

Read the full file on GitHub · 52 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 52 lines · 100 tokens per session scan A d0e8fb8ac5e4

Subscribe to this mod's changes

process-hygiene is a skill published in the GitHub repository chipi/agentic-ai-homelab (2 stars, last pushed today), licensed MIT. It adds 100 tokens to every session and 691 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-22.

Related

process-hygiene compared with skills from other repositories

process-hygiene next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
process-hygienechipi/agentic-ai-homelabSkill2todayMITA100Claude Code
agent-sandboxruvnet/rufloSkill83ktodayMITA15Claude Code
github-actions-templateswshobson/agentsSkill43kyesterdayMITA44Claude Code
tao-run-on-slurmNVIDIA/skillsSkill4.2ktodayApache-2.0A94Claude Code
cdf-orchestration-setupNVIDIA/skillsSkill4.2ktodayApache-2.0A105Codex
aiq-deployNVIDIA/skillsSkill4.2ktodayApache-2.0A27Claude Code
tao-run-on-brevNVIDIA/skillsSkill4.2ktodayApache-2.0A106Claude Code