/install resource-leak
resource-leak
A resource is opened but not closed. Under low load the process recycles or the OS cleans up on exit, so the bug stays hidden. Under real load, file-descriptor exhaustion, memory bloat, or orphaned connections appear and cascade.
Symptoms
open(...)without a matchingclose()orwithblock.- Database connections or HTTP clients instantiated per-request without pooling or teardown.
- Event listeners / observers / subscriptions registered but never removed.
- Background tasks or timers spawned without cancellation paths.
- Gradual memory growth that correlates with request count.
What to do
- Pair every acquire with a release. Use language constructs that guarantee teardown:
with(Python),using/try-with-resources(C#/Java),defer(Go),try/finally(JS/TS). - For resources that outlive a single function, document ownership: who closes it, when, on which code path — including error paths.
- Prefer pooled clients (HTTP, database) over creating a new one per call.
- When registering event listeners, return the unregister function in the same scope so the caller can clean up.
- Test the teardown path. Kill a process or trigger an error mid-operation and confirm resources are released.
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install resource-leak - After installation, invoke the skill by name or use
/resource-leak - Provide required inputs per the skill's parameter spec and get structured output
What is Resource Leak?
Files, sockets, subscriptions, or other finite resources are acquired without a guaranteed release path. It is an AI Agent Skill for Claude Code / OpenClaw, with 30 downloads so far.
How do I install Resource Leak?
Run "/install resource-leak" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Resource Leak free?
Yes, Resource Leak is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Resource Leak support?
Resource Leak is cross-platform and runs anywhere OpenClaw / Claude Code is available (macos, linux, windows).
Who created Resource Leak?
It is built and maintained by mvogt99 (@mvogt99); the current version is v1.0.0.