Skip to content
Skill

Cleanup agent team node processes

Audits and safely cleans leftover node, browser and shell processes from agent team runs

Cleanup agent team node processes is an open-source agent skill for developer tools. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

Scripts
PowerShell
Platforms
Claude Code, Codex, Cursor
GitHub stars
5
Last commit
License
MIT
Listing updated

Similar skills

About Cleanup agent team node processes

This skill helps an agent investigate Windows or PowerShell sessions after multi-agent automation leaves stray node, npx, command wrapper, browser or agent-browser processes behind. It starts with diagnosing whether the resource load actually comes from the current run, and routes editor, search, watcher, Defender or build-cache load to configuration fixes instead of process killing.

The core of the workflow is a bundled PowerShell script that runs a read-only audit by default and prints JSON to standard output. It groups candidates by ownership evidence such as PID, parent PID, command line, executable path, creation time and listening ports, and it reports WorkBuddy prewarm pools with a confidence level and a session state. Apply mode is gated: it needs a narrow include pattern, a temporary ledger file that is deleted in a finally block, and for WorkBuddy pools explicit selectors plus two confirmation switches. Long-running services, user browsers, editors and protected WorkBuddy roles are excluded.

The skill expects a Windows environment with PowerShell and runs against the native process information it gathers. Documentation is in Chinese, with reference files covering the output fields, a restricted recovery path for stuck one-shot Node commands, and a checklist of common mistakes.

When your agent uses it

Use when Windows or PowerShell agent-team sessions leave suspected stale node, npx, Windows command processor, agent-browser browser or CLI processes, stale MCP or dev-server children provably owned by the current run, lingering listeners, unclear process ownership after multi-agent automation, or unexplained WorkBuddy prewarm pools, MCP subtrees, native agent-browser workers, or shell-snapshot bash processes. 当 Windows 或 PowerShell 的 agent team 会话结束后,出现疑似残留 node / npx / Windows 命令处理程序 / agent browser 浏览器或 CLI 进程、可证明归属当前 run 的残留 MCP 或开发服务器子进程、残留监听器、多代理自动化后的进程归属不清,或无法解释的 WorkBuddy prewarm 池、MCP 子树、原生 agent-browser worker、shell snapshot bash 进程时使用。

From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.

What it can access

From a static check of its 13 files (99 KB) on GitHub on 4 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.

Check another skill before you install it.

Install

This skill ships in the common-tools plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

/plugin marketplace add ruan-cat/monorepo
/plugin install common-tools@ruan-cat-tools

Or copy only this skill to ~/.claude/skills/cleanup-agent-team-node-processes:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ruan-cat/monorepo.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/cleanup-agent-team-node-processes &&
cp -R "$tmp/ai-plugins/common-tools/skills/cleanup-agent-team-node-processes" ~/.claude/skills/cleanup-agent-team-node-processes &&
rm -rf "$tmp"

For one project only, put the folder in .claude/skills/cleanup-agent-team-node-processes inside it instead.

Claude Code docs on skills

Copy the skill folder to ~/.agents/skills/cleanup-agent-team-node-processes to use it in every repository:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ruan-cat/monorepo.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/cleanup-agent-team-node-processes &&
cp -R "$tmp/ai-plugins/common-tools/skills/cleanup-agent-team-node-processes" ~/.agents/skills/cleanup-agent-team-node-processes &&
rm -rf "$tmp"

For one repository only, put the folder in .agents/skills/cleanup-agent-team-node-processes inside it instead.

Codex docs on skills

Copy the skill folder to ~/.cursor/skills/cleanup-agent-team-node-processes to use it in every project:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ruan-cat/monorepo.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/cleanup-agent-team-node-processes &&
cp -R "$tmp/ai-plugins/common-tools/skills/cleanup-agent-team-node-processes" ~/.cursor/skills/cleanup-agent-team-node-processes &&
rm -rf "$tmp"

For one project only, put the folder in .cursor/skills/cleanup-agent-team-node-processes inside it instead.

Cursor docs on skills

Run in a terminal (add --scope workspace to install it for the current workspace only):

gemini skills install https://github.com/ruan-cat/monorepo.git --path ai-plugins/common-tools/skills/cleanup-agent-team-node-processes

Or copy the folder to ~/.gemini/skills/cleanup-agent-team-node-processes yourself.

Gemini CLI docs on skills

For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/cleanup-agent-team-node-processes:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ruan-cat/monorepo.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/cleanup-agent-team-node-processes &&
cp -R "$tmp/ai-plugins/common-tools/skills/cleanup-agent-team-node-processes" ~/.copilot/skills/cleanup-agent-team-node-processes &&
rm -rf "$tmp"

For one project only, put the folder in .github/skills/cleanup-agent-team-node-processes inside it instead.

VS Code docs on skills

Get the folder:

git clone --depth 1 https://github.com/ruan-cat/monorepo.git

Then copy monorepo/ai-plugins/common-tools/skills/cleanup-agent-team-node-processes into your agent's skills folder as cleanup-agent-team-node-processes. Agents that support SKILL.md read one folder per skill.

The SKILL.md format

What it does

Read-only process audit
A default dry-run lists candidate Node, shell and browser processes as JSON without stopping anything.
Ownership evidence checks
Candidates are judged by PID, parent chain, command line, start time, working directory clues and listening ports.
Gated cleanup mode
Stopping requires an explicit apply flag, a narrow include pattern and a temporary ledger that is removed afterwards.
WorkBuddy pool grouping
Prewarm pools and their process subtrees are grouped with confidence levels and explicit selectors for any stop.
Protected long-running services
Gateways, memory services, queue workers, editors and user browsers are excluded from cleanup by default.
Post-cleanup verification
Target PIDs and listening ports are sampled again to confirm what remains after a stop.

Good for

  • Find leftover node or npx processes after a multi-agent run on Windows
  • Check whether a slow machine is caused by agent-run processes or by editor and indexer load
  • Stop orphaned MCP or dev-server children that clearly belong to one finished run
  • Review which WorkBuddy prewarm pool processes are still running before deciding on cleanup
  • Diagnose lingering listening ports left behind by an agent session

Cleanup agent team node processes FAQ

Does the skill stop processes automatically?

No. It runs a dry-run audit by default and only stops processes when apply is explicitly passed with a narrow include pattern and a temporary output path.

Which platforms does Cleanup agent team node processes need?

It is built for Windows with PowerShell and relies on the bundled cleanup script and native process information.

Does Cleanup agent team node processes write reports into my workspace?

The documented default is stdout-only output. Any temporary ledger file is placed in the system temp folder and removed in a finally block.

Can Cleanup agent team node processes kill a user's normal browser or editor?

Ordinary user browsers are only audited, and editor extension hosts and similar long-running services are excluded from cleanup.

How do I install Cleanup agent team node processes in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/cleanup-agent-team-node-processes to use it in all your projects, or to .claude/skills/cleanup-agent-team-node-processes in one project. Or install the common-tools plugin, which includes it: /plugin marketplace add ruan-cat/monorepo, then /plugin install common-tools@ruan-cat-tools.

Does Cleanup agent team node processes run scripts?

Yes. It runs PowerShell scripts. No network calls were found in its scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

Which AI agents can use Cleanup agent team node processes?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

What are the best alternatives to Cleanup agent team node processes?

The closest alternatives to Cleanup agent team node processes are Windows child process lifecycle, Automation audit ops, System audit, Disk cleanup and Agentsmd optimize.

Where this comes from

  • Description: from the skill's own SKILL.md.

More from ruan-cat/monorepo

  1. Works through an OpenSpec change's task list, implementing and checking off each task

    • Open source
    • 5 GitHub stars
    • Developer tools
  2. Finalizes a completed OpenSpec change, syncing its specs and moving it to the archive

    • Open source
    • 5 GitHub stars
    • Developer tools
  3. Generates all OpenSpec planning artifacts for a change in one pass

    • Open source
    • 5 GitHub stars
    • Developer tools
  4. Starts a new OpenSpec change and shows its first artifact template for review

    • Open source
    • 5 GitHub stars
    • Developer tools
  5. Checks and normalizes package.json, tsup and tsconfig setup for monorepo Node packages

    • Open source
    • 5 GitHub stars
    • Developer tools
  6. Turns incident reports and repeated failures into durable, verifiable agent skill rules

    • Open source
    • 5 GitHub stars
    • Developer tools