bounded-model-checking-c

bounded-model-checking-c is a skill for Claude Code, Codex from OutlineDriven/odin-claude-plugin. It costs 52 tokens per session (2,160 once invoked), scanned A, a copy of bounded-model-checking-c, Apache-2.0.

A verification workflow for C and C++ code using CBMC and Frama-C. These tools analyse code to find memory errors and undefined behaviour, or check formal contracts such as assertions about what a function must do.

In plain words
What is it for?
Use it to create test harnesses, check C or C++ functions within recorded bounds, analyse runtime-error alarms, and prove or investigate ACSL contracts.
Why use it?
It can expose defects such as out-of-bounds access, null dereferences, arithmetic overflow, and division by zero before they occur in production.

Skill for Claude CodeCodex

Written for Claude Code and Codex: shipped in a Claude Code plugin, but also agents/openai.yaml present.

Part of the odin-formal plugin — 9 skills shipped together

Good fit Use it to create test harnesses, check C or C++ functions within recorded bounds, analyse runtime-error alarms, and prove or investigate ACSL contracts.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/outlinedriven/odin-claude-plugin/bounded-model-checking-c
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 OutlineDriven/odin-claude-plugin --skill bounded-model-checking-c
Clone the repo
git clone --depth 1 https://github.com/OutlineDriven/odin-claude-plugin

Made for: Claude Code, Codex.

Or install odin-formal, the plugin that ships this one along with the rest of its 9 skills.

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 bounded-model-checking-c

README.md
[![agentmods](https://agentmods.dev/badge/skills/outlinedriven/odin-claude-plugin/bounded-model-checking-c.svg)](https://agentmods.dev/skills/outlinedriven/odin-claude-plugin/bounded-model-checking-c)
Your own site
<a href="https://agentmods.dev/skills/outlinedriven/odin-claude-plugin/bounded-model-checking-c"><img src="https://agentmods.dev/badge/skills/outlinedriven/odin-claude-plugin/bounded-model-checking-c.svg" alt="Measured on agentmods" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,160 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.
Origin 100% copy Near-identical to another mod 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.00052 $0.02160
Opus 5 $0.00026 $0.01080
Sonnet 5 $0.00010 $0.00432
Haiku 4.5 $0.00005 $0.00216

Measured yesterday against content hash 0b94f334cd0d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

bounded-model-checking-c 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 yesterday.

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.

Origin

This is a copy

100% identical to bounded-model-checking-c — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

plugins/odin-formal/skills/bounded-model-checking-c/SKILL.md · 39 lines

How it starts

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

Bounded model checking C

Contract

Field Bound contract
Trigger A C or C++ function or module needs its memory safety, arithmetic, or user assertions checked exhaustively up to a bound (CBMC), its runtime errors bounded by abstract interpretation (Frama-C Eva), or its ACSL contracts proved deductively (Frama-C WP), or an existing run's trace or alarm must be read.
Authority Reversible local: writes harness .c files, ACSL annotations in the source under analysis, and the tools' output directories; rollback is reverting those files. No remote mutation.
Side effect Harness and annotated source on disk, CBMC GOTO binaries when goto-cc is used, WP proof-obligation files under -wp-out, and Frama-C session files when -save is used.
Done Every property in scope is reported safe by CBMC under a recorded unwind bound, or has no Eva alarm, or is Valid under WP with a named prover, or has a trace or alarm mapped to a code defect and a fix.

Inputs

The C sources, the entry function, and the properties: absence of undefined behavior (out-of-bounds access, null or dangling dereference, overflow, division by zero), or functional contracts. Tool pins from the grounded set: CBMC cbmc-6.11.0 (brew install cbmc on macOS, .deb or .msi packages, or Docker ghcr.io/diffblue/cbmc) and Frama-C 33.0 "Arsenic" (opam install frama-c, or the Linux .run installer frama-c-linux-x86-64-33.0-Arsenic.run); WP needs Why3 and at least one prover on PATH, and Alt-Ergo is the documented first choice. Optional: per-loop unwind bounds, the target data model (--LP64, --ILP32), and an Eva precision level.

Procedure

  1. Pick the analysis. CBMC answers "is there any input within the bound that reaches a failing check" and produces a concrete trace, so it is the default for a function with a small loop bound. Eva answers "which operations may be unsafe for any input" over the whole program without a bound, at the price of alarms that may be false. WP answers "does this function meet its ACSL contract" and needs the contract written first. Done when: one analysis is named with the reason.
  2. Write a CBMC harness. In a new file, declare unconstrained inputs with the nondet_ prefix convention (int nondet_int();, _Bool nondet_bool();), which CBMC treats as a fresh value on every call. Write a harness function that builds the inputs, restricts them with __CPROVER_assume(cond), calls the function under test, and states the property with __CPROVER_assert(cond, "description") or plain assert. Since CBMC 6.0 the standard checks (bounds, pointer, division by zero, shift, signed overflow, unwinding assertions) are on by default; add --unsigned-overflow-check, --conversion-check, or --memory-leak-check when those classes matter, and --no-standard-checks only with a written reason. Done when: cbmc harness.c src.c --function harness --show-properties lists the checks the run will decide.
  3. Run CBMC and read the result. cbmc harness.c src.c --function harness --unwind 10 --trace. --unwind N bounds every loop; --unwindset L:B bounds one loop by the id shown by --show-loops. A run ends with VERIFICATION SUCCESSFUL (exit 0), VERIFICATION FAILED (exit 10), or VERIFICATION INCONCLUSIVE (exit 5); exit 1, 2, and 6 are usage, parse, and internal errors. On failure, each violated property is listed with its id and description, and --trace prints the counterexample as numbered states with every assignment from the entry to the failing line. Read the assignments to the harness inputs first: they are the concrete input that breaks the property. A failed unwinding assertion means the bound is too small, not that the code is wrong; raise the bound and rerun. Use --property id to rerun one property and --json-ui when a script reads the result. Done when: every property passes, or the trace's concrete inputs are recorded with the source line they break.
  4. Reduce the CBMC problem when it does not finish. Use --slice-formula to drop assignments that cannot reach the property, --depth N to cap the path length, and --object-bits n when the run reports too many objects. For a multi-file program, compile with goto-cc -c src.c -o src.goto and link the GOTO binaries once, then run cbmc program.goto --function harness ... for each property. Swap the backend with --z3 or --cvc5 when the default SAT solver stalls. Done when: the run finishes at a recorded bound, or the smallest harness that reproduces the stall is saved.
  5. Run Eva. frama-c -eva -main entry src.c. Each alarm prints as [eva:alarm] file.c:LINE: Warning: <description>. followed by the ACSL assertion Eva could not prove, for example assert \valid(p);. The summary at the end counts alarms and the proportion of statements reached. Raise -eva-precision N (0 to 11) to trade time for fewer false alarms; -eva-slevel N allows N separate states per program point, which removes alarms caused by merging branches. Insert Frama_C_show_each(expr) in the source to print Eva's value set at that point when an alarm is not obvious. Classify each remaining alarm as a true defect (a concrete input reaches it, which a CBMC harness on that function can confirm) or a precision loss. Done when: every alarm is classified, and true defects carry a fix.
  6. Write ACSL and run WP. Above the function, write requires for preconditions (\valid(a+(0..n-1)) for array access), assigns for the exact write set, and ensures for the postcondition using \result and \old(x). Above each loop, write loop invariant, loop assigns, and loop variant; WP cannot prove a loop without them. Run frama-c -wp -wp-rte -wp-prover alt-ergo,z3 -wp-timeout 10 src.c -then -report. -wp-rte adds the runtime-error guards to the obligations; -wp-prover lists provers in order (-wp-list-provers shows what is installed); -wp-timeout is seconds per goal (default 2). The report prints each property with its status, [ Valid] when proved, with the prover that closed it, and ends with a success percentage line. Done when: every property is Valid, or each unproved goal is named with the missing invariant or lemma.
  7. Read a WP failure. -wp-print pretty-prints the unproved goal; the hypothesis list shows what the prover knew, and the goal shows what it could not derive. A goal that is true but unproved usually lacks a loop invariant strong enough to imply it, or an assigns clause too wide to preserve a fact; a goal that is false is a contract or code defect. Enable -wp-counter-examples to have WP ask the prover for a model of the failing goal. Done when: the goal is classified and the invariant, lemma, or code fix is applied and the goal is Valid.
  8. Record the result. For CBMC, write the unwind bound, the checks enabled, and the data model beside each property. For Eva, write the precision and slevel with the alarm count. For WP, list the prover and timeout per property and every unproved goal or trusted annotation left in the session. Done when: every property line carries its bound or prover.

Read the full file on GitHub · 39 lines

Files

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.

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. yesterday First seen · 39 lines · 52 tokens per session scan A 0b94f334cd0d

Subscribe to this mod's changes

bounded-model-checking-c is a skill published in the GitHub repository OutlineDriven/odin-claude-plugin (35 stars, last pushed today), licensed Apache-2.0. It adds 52 tokens to every session and 2,160 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to bounded-model-checking-c, differing in 0 lines, and is treated as a copy.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

next-cache-components-optimizer

Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…

vercel/next.js · 170 tokens

next-partial-prefetching-adoption

Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…

vercel/next.js · 103 tokens

chronicle

Analyze Copilot session history for standup reports, usage tips, session search, and session reindexing. Use when the user asks for a standup, daily summary, usage tips, workflow recommendations, wants to search or find past sessions by keyword/file/PR, wants to reindex their session store, or asks about deleting…

microsoft/vscode · 72 tokens