Skip to main content
Jeden Skill in Manus ausführen
mit einem Klick

raii-sweep

Sterne14
Forks8
Aktualisiert20. Juni 2026 um 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

Mit Codex oder Claude installieren Kopieren Sie diesen Prompt, fügen Sie ihn in Codex, Claude oder einen anderen Assistant ein und lassen Sie die Skill-Seite prüfen und installieren.

Datei-Explorer
4 Dateien
SKILL.md
readonly