Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add ArabelaTso/Skills-4-SE --skill invariant-inferencegit clone --depth 1 https://github.com/ArabelaTso/Skills-4-SEWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/arabelatso/skills-4-se/invariant-inference)<a href="https://agentmods.dev/skills/arabelatso/skills-4-se/invariant-inference"><img src="https://agentmods.dev/badge/skills/arabelatso/skills-4-se/invariant-inference/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/arabelatso/skills-4-se/invariant-inference"><img src="https://agentmods.dev/badge/skills/arabelatso/skills-4-se/invariant-inference.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00095 | $0.03228 |
| Opus 5 | $0.00048 | $0.01614 |
| Sonnet 5 | $0.00019 | $0.00646 |
| Haiku 4.5 | $0.00010 | $0.00323 |
Grade A, and why
invariant-inference scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 498 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Invariant Inference
Overview
Analyze loops and automatically infer invariants—properties that remain true throughout loop execution. Generate these as code assertions for verification and correctness proofs.
Workflow
1. Identify the Loop
First, locate and understand the loop to analyze:
Loop types to recognize:
forloops with index variableswhileloops with conditionsdo-whileloops- Iterator-based loops
- Recursive functions (treated as implicit loops)
Extract key information:
- Loop variable(s) and their initial values
- Loop condition (when it terminates)
- Loop body (what happens each iteration)
- Variables modified in the loop
- Variables read but not modified
2. Analyze Loop Structure
Understand what the loop does:
Categorize the loop:
- Accumulation: Building up a sum, product, or collection
- Search: Looking for an element or condition
- Transformation: Modifying elements in a data structure
- Generation: Creating new data based on input
- Traversal: Visiting all elements
- Sorting/Partitioning: Rearranging elements
Identify patterns:
- Array/list iteration with bounds
- Counter increments/decrements
- Pointer advancement
- Collection building
- Flag-based early termination
3. Infer Invariant Categories
Generate invariants for each applicable category. See invariant-patterns.md for comprehensive patterns.
Bounds Invariants
Properties about variable ranges:
# Loop: for i in range(n)
assert 0 <= i < n
# Loop: while i < len(arr)
assert 0 <= i <= len(arr)
# Loop: two pointers
while left < right:
assert 0 <= left <= right < len(arr)
Relationship Invariants
Properties relating variables:
Sum/Accumulation:
total = 0
for i in range(len(arr)):
assert total == sum(arr[0:i]) # Invariant before update
total += arr[i]
assert total == sum(arr) # Post-condition
Max/Min:
max_val = arr[0]
for i in range(1, len(arr)):
assert max_val == max(arr[0:i])
if arr[i] > max_val:
max_val = arr[i]
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 9d ago First seen · 498 lines · 95 tokens per session scan A 836250f1b331
invariant-inference is a skill published in the GitHub repository ArabelaTso/Skills-4-SE (252 stars, last pushed 22d ago), licensed Apache-2.0. It adds 95 tokens to every session and 3,228 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other skills, from other repositories
112-java-maven-plugins
Use when you need to add or configure Maven plugins in your pom.xml — including quality tools (enforcer, surefire, failsafe, jacoco, pitest, spotbugs, pmd), security scanning (OWASP), code formatting (Spotless), version management, container image build (Jib), build information tracking, and benchmarking (JMH) …
111-java-maven-dependencies
Use when you need to add or evaluate Maven dependencies that improve code quality or domain modeling — including nullness annotations (JSpecify), static analysis (Error Prone + NullAway), functional programming (VAVR), architecture testing (ArchUnit), or money and currency support (JavaMoney) — and want a…
057-design-feature-toggles
Use when designing, implementing, reviewing, testing, or cleaning up feature toggles, feature flags, kill switches, runtime configuration gates, canary controls, staged rollouts, experiments, or temporary compatibility switches in Java enterprise systems. This should trigger for requests such as Design a feature…
130-java-testing-strategies
Use when you need to apply testing strategies for Java code — RIGHT-BICEP to guide test creation, A-TRIP for test quality characteristics, or CORRECT for verifying boundary conditions. This should trigger for requests such as Review Java code for testing strategies; Apply RIGHT-BICEP testing strategies in Java code…
133-java-testing-acceptance-tests
Use when you need to implement acceptance tests from maintainer-sanitized Gherkin scenario facts for framework-agnostic Java (no Spring Boot, Quarkus, Micronaut) — confirming @acceptance scenarios before coding, happy path with RestAssured, DB/Kafka test fixtures, WireMock for external REST only, and AT classes run by…
152-java-performance-gatling
Use when you need to set up Gatling performance testing for a Java Maven project — including adding Gatling dependencies and the Gatling Maven plugin, creating Java simulations, running gatling:test, configuring a simulation class, and reviewing generated reports. This should trigger for requests such as Add Gatling…