Process Watch
Diagnose process-level resource issues with the bundled process-watch workflow instead of relying on a single top snapshot.
Table of Contents
Standards snapshot
- Prefer evidence across CPU, memory, I/O, network, and process hierarchy before naming a culprit.
- Capture enough context to explain what is happening now and what to inspect next.
- Treat kill operations as explicit user-directed actions, not default remediation.
- Keep platform differences explicit, especially where Windows support is partial.
When to use
- The user is investigating runaway CPU, memory growth, disk churn, or suspicious background work.
- A port, process, or system resource spike needs process-level attribution.
- The user needs a quick watch loop or summary of top offenders before deeper debugging.
Required inputs
- The symptom or target:
- high CPU;
- memory leak suspicion;
- port collision;
- disk churn;
- network-heavy process.
- Optional PID, process name, or port number.
- Whether the task is diagnostic only or includes an explicit request to terminate a process.
Deliverables
- A clear shortlist of suspected culprit processes.
- Process evidence such as CPU, memory, network, file handles, or children.
- Safe next-step guidance based on the observed signal.
Philosophy
- Diagnose before acting.
- Prefer multi-signal evidence over a single noisy metric.
- Keep remediation proportional to the user’s request and system risk.
Failure mode
- If the issue is broader system tuning or app-level profiling rather than process inspection, route to a more specific debugging or performance workflow.
- If the user wants destructive process termination without confirming target context, pause and make the impact explicit.
- If the platform lacks the requested visibility, say what is unavailable rather than pretending the signal exists.
Constraints
- Redact secrets, environment variables, and sensitive command-line arguments by default in outputs.
- Do not kill or force-kill processes unless the user explicitly requests it.
- Keep guidance scoped to local process diagnostics rather than unrelated system administration work.
Workflow
- Start with a summary or top view to identify likely offenders.
- Narrow into the specific process using PID, name, or port where possible.
- Inspect the strongest relevant details:
- CPU and memory;
- network connections;
- open files;
- child processes;
- port bindings.
- Decide whether the evidence suggests:
- a transient spike;
- a stable heavy process;
- a likely leak;
- or a collision or runaway background task.
- Recommend the smallest safe next step.
Anti-patterns
- Declaring a root cause from one
top snapshot.
- Killing processes reflexively when diagnostics are still incomplete.
- Ignoring child-process trees, open ports, or I/O when CPU alone is inconclusive.
Validation
- Fail fast: stop at the first unavailable command or unsupported platform capability and report that gap.
- Verify the observed process identity matches the user’s target before recommending termination or escalation.
- Cross-check at least two useful signals when accusing a process of runaway behavior.
Examples
# What's eating CPU?
process-watch top --type cpu
# What is listening on port 3000?
process-watch ports --port 3000
# Inspect a specific process
process-watch info 1234
# Watch with threshold alerts
process-watch watch --interval 2 --alert-cpu 90 --alert-mem 85
References
- Script:
scripts/process-watch.py
- Contract:
references/contract.yaml
- Evals:
references/evals.yaml
See Also
| Skill |
When to use together |
| [[systematic-debugging]] |
Use alongside process-watch for root-cause diagnosis |
| [[codex-home-audit]] |
Check process health during a Codex home audit |
| [[fix-mise]] |
Diagnose mise shim CPU/memory issues via process-watch |
| [[verification-before-completion]] |
Confirm processes are healthy before marking work done |
Topic map: [[mobile-native]]
Decision feedback protocol (required):
- If post-run feedback capture is enabled for this runtime, emit a non-blocking
post_run_feedback event via request_user_input after result delivery.
- Capture:
decision (accepted|partial|rejected|deferred), outcome (good|neutral|bad|unknown), and confidence (high|medium|low).
- Persist with:
python3 utilities/skill-builder/scripts/record_skill_feedback.py --skill-path <path/to/SKILL.md> --decision <...> --outcome <...> --confidence <...> --notes "...".
- The recorder tags
subject (for example ui, code_review, backend, security) for cross-domain quality analytics.
Gotchas
- None yet. Capture recurring failures here as symptom -> cause -> do instead -> check.
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: process-watch3description: Analyze system processes and resource usage to diagnose runaway CPU/memory/IO, identify culprits, and propose next diagnostic steps. Use when investigating performance spikes or leaks. Use when this capability is needed.4---56# Process Watch78Diagnose process-level resource issues with the bundled process-watch workflow instead of relying on a single `top` snapshot.910## Table of Contents11- [Standards snapshot](#standards-snapshot)12- [When to use](#when-to-use)13- [Required inputs](#required-inputs)14- [Deliverables](#deliverables)15- [Philosophy](#philosophy)16- [Failure mode](#failure-mode)17- [Constraints](#constraints)18- [Workflow](#workflow)19- [Anti-patterns](#anti-patterns)20- [Validation](#validation)21- [Examples](#examples)22- [References](#references)2324## Standards snapshot25- Prefer evidence across CPU, memory, I/O, network, and process hierarchy before naming a culprit.26- Capture enough context to explain what is happening now and what to inspect next.27- Treat kill operations as explicit user-directed actions, not default remediation.28- Keep platform differences explicit, especially where Windows support is partial.2930## When to use31- The user is investigating runaway CPU, memory growth, disk churn, or suspicious background work.32- A port, process, or system resource spike needs process-level attribution.33- The user needs a quick watch loop or summary of top offenders before deeper debugging.3435## Required inputs36- The symptom or target:37 - high CPU;38 - memory leak suspicion;39 - port collision;40 - disk churn;41 - network-heavy process.42- Optional PID, process name, or port number.43- Whether the task is diagnostic only or includes an explicit request to terminate a process.4445## Deliverables46- A clear shortlist of suspected culprit processes.47- Process evidence such as CPU, memory, network, file handles, or children.48- Safe next-step guidance based on the observed signal.4950## Philosophy51- Diagnose before acting.52- Prefer multi-signal evidence over a single noisy metric.53- Keep remediation proportional to the user’s request and system risk.5455## Failure mode56- If the issue is broader system tuning or app-level profiling rather than process inspection, route to a more specific debugging or performance workflow.57- If the user wants destructive process termination without confirming target context, pause and make the impact explicit.58- If the platform lacks the requested visibility, say what is unavailable rather than pretending the signal exists.5960## Constraints61- Redact secrets, environment variables, and sensitive command-line arguments by default in outputs.62- Do not kill or force-kill processes unless the user explicitly requests it.63- Keep guidance scoped to local process diagnostics rather than unrelated system administration work.6465## Workflow661. Start with a summary or top view to identify likely offenders.672. Narrow into the specific process using PID, name, or port where possible.683. Inspect the strongest relevant details:69 - CPU and memory;70 - network connections;71 - open files;72 - child processes;73 - port bindings.744. Decide whether the evidence suggests:75 - a transient spike;76 - a stable heavy process;77 - a likely leak;78 - or a collision or runaway background task.795. Recommend the smallest safe next step.8081## Anti-patterns82- Declaring a root cause from one `top` snapshot.83- Killing processes reflexively when diagnostics are still incomplete.84- Ignoring child-process trees, open ports, or I/O when CPU alone is inconclusive.8586## Validation87- Fail fast: stop at the first unavailable command or unsupported platform capability and report that gap.88- Verify the observed process identity matches the user’s target before recommending termination or escalation.89- Cross-check at least two useful signals when accusing a process of runaway behavior.9091## Examples92```bash93# What's eating CPU?94process-watch top --type cpu9596# What is listening on port 3000?97process-watch ports --port 30009899# Inspect a specific process100process-watch info 1234101102# Watch with threshold alerts103process-watch watch --interval 2 --alert-cpu 90 --alert-mem 85104```105106## References107- Script: `scripts/process-watch.py`108- Contract: `references/contract.yaml`109- Evals: `references/evals.yaml`110111## See Also112113| Skill | When to use together |114|---|---|115| [[systematic-debugging]] | Use alongside process-watch for root-cause diagnosis |116| [[codex-home-audit]] | Check process health during a Codex home audit |117| [[fix-mise]] | Diagnose mise shim CPU/memory issues via process-watch |118| [[verification-before-completion]] | Confirm processes are healthy before marking work done |119120**Topic map:** [[mobile-native]]121122<!-- decision-feedback-protocol:v2 -->123**Decision feedback protocol (required):**124- If post-run feedback capture is enabled for this runtime, emit a non-blocking `post_run_feedback` event via `request_user_input` after result delivery.125- Capture: `decision` (`accepted|partial|rejected|deferred`), `outcome` (`good|neutral|bad|unknown`), and `confidence` (`high|medium|low`).126- Persist with: `python3 utilities/skill-builder/scripts/record_skill_feedback.py --skill-path <path/to/SKILL.md> --decision <...> --outcome <...> --confidence <...> --notes "..."`.127- The recorder tags `subject` (for example `ui`, `code_review`, `backend`, `security`) for cross-domain quality analytics.128<!-- /decision-feedback-protocol -->129130## Gotchas131- None yet. Capture recurring failures here as symptom -> cause -> do instead -> check.132133---134> Converted and distributed by [TomeVault](https://tomevault.io/claim/jscraik) — claim your Tome and manage your conversions.135<!-- tomevault:4.0:skill_md:2026-04-13 -->