Sign inGet started
–

guarding-destructive-operations

by kajisho5/ffmpeg-skill · Coding & Development

A skill for adding and reviewing safety guards on irreversible operations like bulk deletes, history rewrites, and path resolution, with precondition checks that refuse rather than warn and tests that

Lift · GLM-5.3-flash—not yet benchmarked
92
Trustsecurity · quality · license · upkeep
Scan Saferisk 0/100
LicenseMITserved via MCP

What it does

Add and review preconditions on operations that delete, overwrite, rewrite history, or resolve a caller-supplied name to a filesystem path — refusing instead of warning, placing the guard ahead of the first mutation, structural classification rather than string-prefix matching, name validation plus resolved-path containment as two independent checks, why a guard on the destructive path is invisible to the dry-run, and mutation-testing each half separately. Use when writing or reviewing a `--rebuild`/`--reset`/`--purge` command, a bulk delete, a history rewrite, an `rm -rf`-shaped step, or any code that turns an argument into a file path.

#cli#code-review#destructive-operations#path-validation#safety-guards#testing

Quality judgment

completeness
9.0/10
clarity
8.5/10
trigger quality
9.0/10
examples
9.0/10
structure
9.0/10
overall
9.0/10

The document thoroughly covers all required dimensions of guarding destructive operations. It provides clear structural guidance (guard placement, classification, dual checks), concrete code examples in multiple languages, and practical testing strategies. The analysis of the ffmpeg-skill repository context shows careful adaptation of the skill to the actual codebase rather than mindless copying. The only minor deduction is that the repository-specific analysis, while relevant, slightly shifts focus from the general skill template, but this does not detract from the overall quality.

Files (2)

LICENSE · 1.0 KBSKILL.md · 10.8 KB