lifecycle-scoped-resource-cleanup-4cebf7 — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited lifecycle-scoped-resource-cleanup-4cebf7 (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Domain: lifecycle-management Trigger: Each agent run, regardless of outcome, must unwind resources reserved for its lifetime without assuming the parent session will later re-claim them. Source Pattern: Distilled from reviewed subagent orchestration, isolation, and lifecycle implementations.
Treat each child agent run as one lifecycle with a single unconditional cleanup path. After the run finishes, fails, or aborts, execute a predictable teardown sequence that disconnects per-agent integrations, unregisters hooks and watchers, clears temporary caches and staging state, removes agent-owned bookkeeping records, and stops any background jobs started on that agent’s behalf. Keep cleanup scoped to resources owned by that one agent so parent and sibling sessions remain untouched.
finally/defer path so success, failure, and cancellation all converge on the same teardown logic.When a background workflow agent aborts due to timeout, these cleanup routines close MCP sockets, remove hooks that would fire on subsequent subagents, and kill orphaned shell loops so the terminal remains responsive.
catch; missing the unconditional cleanup path leaves clients, hooks, or jobs running forever.~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.