test-orphan-guard

test-orphan-guard is a skill for Claude Code, Codex from The-Artificer-of-Ciphers-LLC/skills-from-the-artificer. It costs 207 tokens per session (2,264 once invoked), scanned B, original, MIT.

A cleanup tool for leftover Node.js test processes. Node.js is a JavaScript runtime, and these processes can remain after a test run is interrupted or a test hangs.

In plain words
What is it for?
Use it after failed or interrupted Node test runs to find and stop safe-to-kill orphaned or runaway processes.
Why use it?
It prevents orphaned test processes from consuming CPU indefinitely and slowing down or overheating the computer.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: reads .claude/ paths; mentions Claude Code; mentions Codex.

Good fit Use it after failed or interrupted Node test runs to find and stop safe-to-kill orphaned or runaway processes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/the-artificer-of-ciphers-llc/skills-from-the-artificer/test-orphan-guard
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 The-Artificer-of-Ciphers-LLC/skills-from-the-artificer --skill test-orphan-guard
Clone the repo
git clone --depth 1 https://github.com/The-Artificer-of-Ciphers-LLC/skills-from-the-artificer

Made for: Claude Code, Codex.

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 test-orphan-guard

README.md
[![agentmods](https://agentmods.dev/badge/skills/the-artificer-of-ciphers-llc/skills-from-the-artificer/test-orphan-guard/github.svg)](https://agentmods.dev/skills/the-artificer-of-ciphers-llc/skills-from-the-artificer/test-orphan-guard)
Your own site
<a href="https://agentmods.dev/skills/the-artificer-of-ciphers-llc/skills-from-the-artificer/test-orphan-guard"><img src="https://agentmods.dev/badge/skills/the-artificer-of-ciphers-llc/skills-from-the-artificer/test-orphan-guard/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 test-orphan-guard

Your own site · 80×15
<a href="https://agentmods.dev/skills/the-artificer-of-ciphers-llc/skills-from-the-artificer/test-orphan-guard"><img src="https://agentmods.dev/badge/skills/the-artificer-of-ciphers-llc/skills-from-the-artificer/test-orphan-guard.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 207 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,264 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00207 $0.02264
Opus 5.5 $0.00083 $0.00906
Sonnet 5.5 $0.00041 $0.00453
Haiku 4.5 $0.00021 $0.00226

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

Security

Grade B, and why

test-orphan-guard scanned grade B with 1 finding 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 10d ago.

The scan reads SKILL.md. This mod also ships 3 executable files (assets/shell-integration.sh, scripts/guarded-test.sh, scripts/reap-test-orphans.sh), 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

into `~/.claude/settings.json` (the `update-config` skill can do this).
test-orphan-guard/SKILL.md · 192 lines

How it starts

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

test-orphan-guard

Node's test runner leaks processes. This skill stops the leak at the source and cleans up what already leaked.

Why this happens (read this first — it tells you what's safe to kill)

node --test --test-isolation=process runs each test file in its own child node process. Those children are supposed to die when the run ends. Two things break that:

  1. The runner dies without reaping its children. If the top-level node --test is killed (Ctrl-C, a timeout in the harness, an OOM, a crashed wrapper), its child test processes get reparented to PID 1 (launchd on macOS). They are now orphans: no parent will ever wait() on them or shut them down.
  2. A test has no timeout. Fixtures run with --test-timeout=0 never self-terminate. Combined with orphaning, a single hung test file can spin a full CPU core forever — and they stack up. Fifteen of them at ~35% CPU each is 5–6 cores pinned and a machine that's audibly struggling.

So the leaked processes are not "doing nothing" — they're usually busy-looping at high CPU. The signatures that mark a process as safe to kill:

  • Orphan — its PPID is 1. Its runner is gone; it is definitionally a leftover. This is the strongest and most common signal.
  • Runaway — its command line is a node --test process pinned at high CPU for minutes. A healthy test file finishes in seconds; one pinned for 3+ minutes is hung.

Everything else that happens to be a node process — MCP servers (memtrace, github, context7, xcodebuild), editor/Codex helpers, node_repl, LM Studio — must never be touched. None of those carry --test on their command line, which is the primary safety boundary the tools use.

The two tools

This skill ships a prevention tool and a cure tool. They cover each other: prevention stops same-process-group children from leaking; cure mops up anything that still escapes (or already leaked before the skill was in place).

Read the full file on GitHub · 192 lines

Files

What ships with it

5 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. 10d ago First seen · 192 lines · 207 tokens per session scan B 18f9bb2772a8

Subscribe to this mod's changes

test-orphan-guard is a skill published in the GitHub repository The-Artificer-of-Ciphers-LLC/skills-from-the-artificer (6 stars, last pushed today), licensed MIT. It adds 207 tokens to every session and 2,264 once invoked, about $0.0008 per session on Opus 5.5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-15.