invariant-guard — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited invariant-guard (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.
The model knows what a loop invariant is. It knows recursion needs a base case. It knows about empty lists, integer overflow, and the difference between < and ≤. It just does not write these down before producing code, so it ships subtle correctness bugs that tests do not catch.
invariant-guard fixes the behavior. State the invariants. State the base case. State the termination argument. State the edge cases. Then write the code — and verify that the code maintains what you stated.
Violating the letter of these rules is violating the spirit of the skill. "I know this algorithm" is the exact rationalization that ships off-by-one and missing-postcondition bugs.
Use invariant-guard when writing or reviewing algorithms where the obvious implementation is subtly wrong:
Pairs with lemmaly (picks the algorithm) and mathguard (picks the math). Load invariant-guard after the algorithm has been chosen and before the loop body is written.
NO LOOP OR RECURSION WITHOUT A WRITTEN INVARIANT AND TERMINATION ARGUMENTIf you cannot write the invariant in one sentence, you have not designed the loop. Write code anyway and you are coding by guess — and the bug will be in the case you did not enumerate.
result contains the sum of a[0..i)."lo ≤ target_position ≤ hi."seen contains every element processed so far; dups contains every element that appeared at least twice."If you cannot write the invariant in one sentence, you have not designed the loop yet.
hi − lo strictly decreases each iteration."i increases by 1 and is bounded above by n."stack.length strictly decreases each pop; nothing pushes inside this branch."No termination argument, no loop.
len(xs), hi − lo, depth, n).No base case + measure, no recursion. (Mutual recursion: state the measure across the cycle.)
[], "", null, undefined, None).[x]).-0, denormals (for floats).The cases that apply must each have a one-phrase expected behavior written down.
Loading | Loaded(data) | Error(msg) not {loading, data, error}).UserId vs OrderId).If the language cannot encode it, write the invariant as a comment and assert it at the boundary.
Before producing non-trivial code that has loops, recursion, or non-trivial state, your message must contain — in this order:
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.