Skip to main content
Run any Skill in Manus
with one click

raii-sweep

Stars14
Forks8
UpdatedJune 20, 2026 at 11:57

Weekly maintenance sweep that restores RAII symmetry in the YANET2 C code. The convention is four orthogonal primitives: new allocates ONLY the struct, init fills fields (and on any error jumps to a single err: label that calls fini), fini releases ONLY field memory and is idempotent, free deallocates ONLY the struct and is NULL-safe — paired new<->free and init<->fini. The sweep has two axes: a NAMING axis (misnamed/non-canonical destructors, found by scan.sh) and a STRUCTURAL axis (init error-path leaks/double-free/UAF, non-idempotent fini, non-NULL-safe free, new/free orthogonality, found by structural-scan.sh plus the leak-hunt workflow). It fixes a bounded batch per run, one prefix family per PR, with a persistent ledger. Use whenever the user invokes the weekly RAII sweep, asks to "fix RAII symmetry", "приведи lifecycle-функции к паттерну", "найди несимметричные init/fini", "сделай fini/free идемпотентными", wants the single-err-label init discipline, or wants a C lifecycle cleanup pass.

Installation

Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.

File Explorer
4 files
SKILL.md
readonly