program-correctness-prover

program-correctness-prover is a skill for Claude Code, Codex from ArabelaTso/Skills-4-SE. It costs 115 tokens per session (3,038 once invoked), scanned A, original, Apache-2.0.

A formal-verification tool that generates Isabelle or Coq proofs showing whether imperative programs meet stated preconditions and postconditions. It can also produce loop invariants, verification conditions, and termination arguments.

In plain words
What is it for?
Use it to prove program correctness with Hoare logic, verify loops, and show that programs terminate when total correctness is required.
Why use it?
Testing only checks selected examples, while a formal proof reasons from the specification about all cases covered by the proof. This helps establish partial or total correctness.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to prove program correctness with Hoare logic, verify loops, and show that programs terminate when total correctness is required.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/arabelatso/skills-4-se/program-correctness-prover
Install

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.

Any agent
npx skills add ArabelaTso/Skills-4-SE --skill program-correctness-prover
Clone the repo
git clone --depth 1 https://github.com/ArabelaTso/Skills-4-SE

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for program-correctness-prover

README.md
[![agentmods](https://agentmods.dev/badge/skills/arabelatso/skills-4-se/program-correctness-prover/github.svg)](https://agentmods.dev/skills/arabelatso/skills-4-se/program-correctness-prover)
Your own site
<a href="https://agentmods.dev/skills/arabelatso/skills-4-se/program-correctness-prover"><img src="https://agentmods.dev/badge/skills/arabelatso/skills-4-se/program-correctness-prover/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.

agentmods 80×15 button for program-correctness-prover

Your own site · 80×15
<a href="https://agentmods.dev/skills/arabelatso/skills-4-se/program-correctness-prover"><img src="https://agentmods.dev/badge/skills/arabelatso/skills-4-se/program-correctness-prover.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 115 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,038 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium analysis-evasion · line 1
    Suspicious Unicode normalization or mixed-script content
    Fix: Review the flagged content for security risks. Ensure no credentials, secrets, or sensitive data are exposed.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00115 $0.03038
Opus 5 $0.00057 $0.01519
Sonnet 5 $0.00023 $0.00608
Haiku 4.5 $0.00012 $0.00304

Measured 9d ago against content hash 733589601051, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

program-correctness-prover 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.

skills/program-correctness-prover/SKILL.md · 343 lines

How it starts

The opening of the file, as written. The whole thing — 343 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Program Correctness Prover

Generate formal proofs establishing correctness of imperative programs.

Overview

This skill takes imperative program code with formal specifications (preconditions and postconditions) and generates complete correctness proofs in Isabelle or Coq using Hoare logic. It handles loop invariant generation, verification condition generation, and proof construction for both partial and total correctness.

How to Use

Provide:

  1. Program code: Imperative program (assignments, conditionals, loops)
  2. Specification: Precondition and postcondition
  3. Target system: Isabelle or Coq
  4. Correctness type: Partial or total correctness

The skill will generate:

  • Loop invariants (if needed)
  • Verification conditions
  • Complete formal proof
  • Termination argument (for total correctness)

Verification Workflow

Step 1: Analyze Program Structure

Identify program components:

  • Assignments: x := E
  • Sequences: C1; C2
  • Conditionals: if B then C1 else C2
  • Loops: while B do C

Step 2: Generate Loop Invariants

For each loop, construct an invariant that:

  1. Holds initially: Precondition implies invariant
  2. Preserved by loop body: {I ∧ B} C {I}
  3. Implies postcondition: I ∧ ¬B ⟹ Q

Strategies:

  • Generalize postcondition by replacing constants with loop variables
  • Express partial computation at iteration i
  • Maintain relationships between variables

Step 3: Generate Verification Conditions

Apply Hoare logic rules to generate VCs:

Assignment: {P[E/x]} x := E {P}

Sequence: Chain intermediate conditions

Conditional: Prove both branches

Loop: Prove initialization, preservation, and termination

Step 4: Construct Proof

Build formal proof in target system:

  • Apply Hoare logic rules
  • Prove each verification condition
  • Use simplification and automation where possible

Step 5: Add Termination Argument (Total Correctness)

Provide variant function V that:

  • Is non-negative when loop condition holds
  • Strictly decreases each iteration

Read the full file on GitHub · 343 lines

Files

What ships with it

2 files 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.

Changes

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.

  1. 9d ago First seen · 343 lines · 115 tokens per session scan A 733589601051

Subscribe to this mod's changes

program-correctness-prover is a skill published in the GitHub repository ArabelaTso/Skills-4-SE (252 stars, last pushed 22d ago), licensed Apache-2.0. It adds 115 tokens to every session and 3,038 once invoked, about $0.0006 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.

Related

Other skills, from other repositories

datalad

Retrieve, version, and publish scientific datasets with DataLad and git-annex, and capture computational provenance with datalad run, rerun, and containers-run. Use when cloning or fetching data from OpenNeuro, DANDI, datasets.datalad.org, or any DataLad dataset; when a file in a dataset reads as a broken symlink or a…

K-Dense-AI/scientific-agent-skills · 146 tokens

depmap

Query the Cancer Dependency Map (DepMap) for cancer cell line gene dependency scores (CRISPR Chronos), drug sensitivity data, and gene effect profiles. Use for identifying cancer-specific vulnerabilities, synthetic lethal interactions, and validating oncology drug targets.

K-Dense-AI/scientific-agent-skills · 52 tokens

latchbio-integration

Build, register, debug, and operate bioinformatics workflows on Latch using the Python SDK, CLI, Latch Data and Registry, Nextflow, Snakemake, programmatic execution, and Latch MCP. Use when authoring or deploying Latch workflows, configuring resources or interfaces, moving data, integrating Registry, or launching and…

K-Dense-AI/scientific-agent-skills · 76 tokens

ginkgo-cloud-lab

Submit and manage protocols on Ginkgo Bioworks Cloud Lab (cloud.ginkgo.bio), a web-based interface for autonomous lab execution on Reconfigurable Automation Carts (RACs). Use when the user wants to run protein expression and purification (cell-free, E. coli, or Pichia), HiBiT or A280 or LabChip quantification, IVT…

K-Dense-AI/scientific-agent-skills · 135 tokens

write-paper

Full-pipeline medical/scientific paper writing. 8-phase IMRAD workflow from outline to submission-ready manuscript. Supports original articles, case reports, case series, meta-analyses, AI validation studies, animal studies, and technical notes. Do NOT trigger for self-checking (use self-review instead).

Aperivue/medsci-skills · 65 tokens

design-study

Study design and validity review for radiology and medical AI research. Identifies analysis unit, cohort logic, leakage risks, comparator design, validation strategy, and reporting guideline fit before drafting or submission.

Aperivue/medsci-skills · 42 tokens