process-hygiene

process-hygiene is a skill for Claude Code from sonichi/sutando. It costs 103 tokens per session (3,162 once invoked), scanned A, original, MIT.

A process-cleanup tool finds background programs left behind after interrupted agent test runs. It can report them or stop them, using details such as ownership, parent process, age, and working directory.

In plain words
What is it for?
It is for finding and optionally stopping orphaned processes from ended sessions, while recording actions in a log.
Why use it?
Interrupted tests can leave servers, interpreters, or wait loops running for days and consuming resources. It also helps limit unnecessary Spotlight indexing of temporary files on macOS.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: mentions Claude Code; mentions Codex.

Good fit It is for finding and optionally stopping orphaned processes from ended sessions, while recording actions in a log.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/sonichi/sutando/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 sonichi/sutando --skill process-hygiene
Clone the repo
git clone --depth 1 https://github.com/sonichi/sutando

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/sonichi/sutando/process-hygiene/github.svg)](https://agentmods.dev/skills/sonichi/sutando/process-hygiene)
Your own site
<a href="https://agentmods.dev/skills/sonichi/sutando/process-hygiene"><img src="https://agentmods.dev/badge/skills/sonichi/sutando/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/sonichi/sutando/process-hygiene"><img src="https://agentmods.dev/badge/skills/sonichi/sutando/process-hygiene.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 103 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,162 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.00103 $0.03162
Opus 5.5 $0.00041 $0.01265
Sonnet 5.5 $0.00021 $0.00632
Haiku 4.5 $0.00010 $0.00316

Measured 3d ago against content hash 98b2df40d0f1, 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 3d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/reap_orphans.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/process-hygiene/SKILL.md · 206 lines

How it starts

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

Process hygiene

Agent sessions run tests from their per-session scratchpads. When a run is interrupted or times out, background children it started are re-parented to init and keep running: spin loops waiting on a file that will never appear, fixture servers, hung interpreters. They accumulate across sessions for days. This skill finds them by provenance, not by name, and stops them one target at a time.

Usage

python3 skills/process-hygiene/scripts/reap_orphans.py               # report only
python3 skills/process-hygiene/scripts/reap_orphans.py --reap        # stop candidates
python3 skills/process-hygiene/scripts/reap_orphans.py --spotlight   # Spotlight markers only

Every run appends one line per action and a summary to <workspace>/logs/process-hygiene.log and prints the summary. The exit status is 0 for every run that parsed its arguments, so a scheduled caller never retries in a loop; 2 on a usage error.

What is a candidate

ALL of:

  1. owned by the user running the script;
  2. PPID 1 — whatever started it is gone;
  3. elapsed time over PROCESS_HYGIENE_MIN_AGE_S (default 7200);
  4. its working directory (lsof -a -p PID -d cwd -Fn on macOS, /proc/PID/cwd on Linux), as a realpath, is inside a scratchpad root matching /private/tmp/claude-<uid>/*/*/scratchpad or /tmp/claude-<uid>/*/*/scratchpad. A root is used only when claude-<uid> is a real directory owned by this user, nothing between it and scratchpad is a symlink, and the resolved root sits under the resolved claude-<uid>; a symlinked scratchpad would otherwise make its target (a repo, the workspace) a root, for reaping and for --spotlight alike;
  5. the Claude Code session that owns that scratchpad has ended (below);
  6. no process in its process group holds a server socket — a listening TCP socket or any UDP socket (lsof -w -a -p PID -iTCP -sTCP:LISTEN -iUDP on macOS; the pid's socket inodes against /proc/PID/net/{tcp,tcp6,udp,udp6} on Linux). A dev server, database or tunnel an agent started on purpose is spared even after its session ended. If the sockets cannot be read for any member, the whole group is spared.

Read the full file on GitHub · 206 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 3d ago First seen · 206 lines · 103 tokens per session scan A 98b2df40d0f1

Subscribe to this mod's changes

process-hygiene is a skill published in the GitHub repository sonichi/sutando (399 stars, last pushed today), licensed MIT. It adds 103 tokens to every session and 3,162 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-10-20.

Related

Other skills, from other repositories

sentry-app-setup

Create and configure a Sentry internal integration so the assistant can manage issues, alerts, and releases under its own identity.

vellum-ai/vellum-assistant · 29 tokens

code_explorer

Explores the repository to locate primary source files, coupled UI components, and test files for bug reports or feature requests.

google-gemini/gemini-cli · 28 tokens

gmail

Manage Gmail email — drafting, sending, organizing, filters, vacation replies, and inbox analysis.

vellum-ai/vellum-assistant · 20 tokens

app-builder

Build and edit small, personal visual tools and artifacts — dashboards, trackers, calculators, data visualizations, charts, simple landing pages, and slide decks the user wants for THEMSELVES. This is the right skill whenever the user asks to "visualize this," "make a chart," or "build an artifact" for their own use…

vellum-ai/vellum-assistant · 162 tokens

assistant-migration

Migrate from ChatGPT, Claude, OpenClaw, Hermes, Manus, and other AI assistants into Vellum by inspecting their data exports, conversation archives, files, prompts, custom instructions, memory, saved memories, tools, GPTs, workflows, integrations, and relationships, then mapping as much as safely possible into Vellum…

vellum-ai/vellum-assistant · 90 tokens

vellum-memory-v3-migration

One-time migration of an existing memory-v2 concept corpus into the memory-v3 section-grain "wiki" — topical articles with a stand-alone lead and queryable sections — with loss-proof staging, assistant-reviewed authoring, and a retrieval-eval gate before cutover.

vellum-ai/vellum-assistant · 63 tokens