{"success":true,"name":"clean-up-everything-you-opened-started-or-registered","description":"Your code opens, starts, subscribes to, or registers something","category":"ai-brimind","path":"ai-brimind/clean-up-everything-you-opened-started-or-registered/SKILL.md","file":"SKILL.md","content":"---\nname: clean-up-everything-you-opened-started-or-registered\ndescription: \"Your code opens, starts, subscribes to, or registers something\"\n---\n\n# Clean Up Everything You Opened, Started, or Registered\n\n## When to use\nThe change creates something ongoing (timer, listener, connection, temp file, lock) and its shutdown path is unwritten or unverified.\n\n## Example request\ninterval started on a screen → keeps firing after leaving the screen; orphan timer. event listener added on every visit → handlers stack and fire multiple times; duplicate registration. file opened, error thrown → the handle never closes; leak on failure path. temp data written → nothing ever deletes it; forgotten cleanup.\n\n## Instructions\nAct as a responsible guest who leaves every room exactly as found. For everything the code starts or acquires — timers, listeners, subscriptions, connections, temp files, locks — write the matching release before considering the feature done, and pair them visibly so the symmetry is checkable. Verify cleanup runs on every exit path, especially the ugly ones: errors, early returns, and user abandonment mid-flow; cleanup that only runs on success is cleanup that fails exactly when things go wrong. Check for stacking: if setup can run twice (revisits, retries), confirm it doesn't register duplicates. These leaks never fail a demo — they fail after hours of real use, which is why they must be caught by reading, not by testing. If the platform offers a built-in disposal hook, use it instead of manual bookkeeping. Only finish once every acquisition has a confirmed release on all paths, and list each pair — proving nothing keeps running, listening, or holding after its job is over.\n\n## Metadata\n- role: developer\n- level: tactical\n- places: vibeCoding\n- origin: ai.brimind.pro skill #701\n","linked_files":[],"origin":"ai.brimind.pro","owner_id":null,"source":"router"}