Agent skill

invariant-analyzer

Identify and verify loop invariants for correctness proofs

majiayu000github.com/majiayu000GitHub ↗
claude-codecan modify filesMIT
Install
npx skills add majiayu000/claude-skill-registry --skill invariant-analyzer --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 2 KB
Bundled scripts: none
Allowed tools: -Read-Write-Grep-Glob
Path: skills/analysis/invariant-analyzer/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 534
Language: HTML

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Invariant Analyzer Skill ## Purpose Identify and verify loop invariants to help construct correctness proofs for algorithms. ## Capabilities - Automatic loop invariant inference - Invariant verification against code - Precondition/postcondition extraction - Generate formal proof structure - Identify missing invariants ## Target Processes - correctness-proof-testing - algorithm-implementation ## Invariant Analysis Framework ### Loop Invariant Properties 1. **Initialization**: True before first iteration 2. **Maintenance**: If true before iteration, true after 3. **Termination**: Provides useful property at end ### Common Invariant Patterns - Range invariants: "for all i in [0, k), property P(i) holds" - Accumulator invariants: "sum equals sum of a[0..k-1]" - Pointer invariants: "left < right and all elements < left are processed" - State invariants: "data structure maintains property X" ## Input Schema ```json { "type": "object", "properties": { "code": { "type": "string" }, "language": { "type": "string" }, "loopIndex": { "type": "integer" }, "expectedInvariant": { "type": "string" } }, "required": ["code"] } ``` ## Output Schema ```json { "type": "object", "properties": { "succe

What's inside
Steps it walks through
  1. Purpose
  2. Capabilities
  3. Target Processes
  4. Invariant Analysis Framework
  5. Loop Invariant Properties
  6. Common Invariant Patterns
  7. Input Schema
  8. Output Schema
Ships with 1 file
  • metadata.json
More from claude-skill-registry
All skills →
About this skill
What does the invariant-analyzer skill do?

Identify and verify loop invariants for correctness proofs

How do I install it?

Run `npx skills add majiayu000/claude-skill-registry --skill invariant-analyzer --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going