What problem does it solve?
It prevents resource leaks and cleanup regressions when editing multi-step Go functions that create contexts, claims, leases, registry entries, subprocesses, and HTTP calls across multiple error returns.
Core Features & Use Cases
- Audits cleanup discipline across every error return in complex functions, ensuring each allocated resource has the correct cancel/close/release/stop behavior.
- Enforces deterministic cleanup patterns like defer-adjacent rules for context cancelation, Close/Rollback pairings, subprocess stopping, and HTTP response draining.
- Protects production HTTP hygiene by forbidding http.DefaultClient in production execution paths and requiring drained response bodies.
- Supports failure-path regression testing by guiding how to trigger specific partial-failure scenarios and assert cleanup actually occurred.
Quick Start
Activate this skill while editing an AGH function that performs multi-step setup or teardown (especially in internal/session, internal/scheduler, internal/coordinator, internal/extension, internal/automation, internal/store, internal/memory, internal/api, or subprocess/registry handlers) to systematically verify every error return cleans up contexts, claims/leases, subprocesses, and HTTP bodies.