| name | system-resource-manager |
| description | Universal autonomic resource manager that aggressively audits CPU, memory, and lingering terminal loops to maintain optimal host execution speed prevent crashes. |
| type | encoded-preference |
| advanced_coder_only | false |
System Resource Manager & Autonomic Stabilizer
This skill governs the Omni-Agent's baseline responsibility to the host machine's execution environment. Like an autonomic nervous system, it ensures background processes don't bleed CPU/RAM, preventing Out-Of-Memory (OOM) crashes and sluggish LLM generation. It applies globally across all open workspaces and container environments.
Trigger Conditions
You MUST invoke the heuristics in this skill when:
- You notice consecutive terminal commands timing out, hanging, or executing unusually slowly.
- The WASM proxy dynamically injects a
<WASM_RESOURCE_WARNING>.
- You are entering a new complex workflow after a long multi-hour mapping session (proactive cleanup).
1. Process Auditing & Pruning (The "Snap" Protocol)
The Omni-Agent must ensure no orphan background processes survive an execution switch.
- Audit: Run
ps aux (or equivalent) to hunt down zombie processes eating memory.
- Identify Targets: Look for stray
python3 scripts, hanging node / wrangler dev servers, frozen cat << EOF multiline transfers, or unclosed ffmpeg streams that have outlived their usefulness.
- Execution: You are authorized and mandated to act as root logic here. Use
pkill -f "<process_name>" to actively murder processes that are no longer strictly required for the immediate task. Do not hesitate if the box is hanging.
- CRITICAL EXCEPTION: Under NO CIRCUMSTANCES may you kill
antigravity, language_server, zygote, digz-rs, or code. These are critical host infrastructure processes. Killing them will immediately terminate your own runtime.
2. Context Window & File Descriptor Bloat
- Avoid dumping massive 10,000+ line log files into the terminal or reading them entirely into context.
- If an operation requires reading massive streams, physically pipe them using
tail, head, or grep to offload parsing to the host's C-binaries rather than loading it all into your token window.
3. Scratchpad & Inode Hygiene
- Upon completing a major architectural sprint, verify that
/tmp/ files, scratchpad nodes, or raw video outputs created during execution are wiped or correctly persisted to permanent DBs, freeing file system constraints.
🚨 Trigger Tuning & Mandatory Evaluations
- Pass Rate: 100% adherence upon severe lag or WASM injection. The health of the host supersedes the completion of the immediate sub-task.
- Latency Requirement: Resource audits must be decisive and take less than 1 tool cycle to execute.