fstar

Verify F* code with refinement types and extract to C via Karamel.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/asimihsan/dotfiles --skill fstar
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: fstar
Source: https://github.com/asimihsan/dotfiles/tree/main/chezmoi/dot_claude/skills/fstar
Command: npx skills add https://github.com/asimihsan/dotfiles --skill fstar

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides a structured path for using F* to write, verify, and extract verified software, helping developers prove properties about their code and catch logical errors early.

Core Features & Use Cases

  • Refinement types & verification: Write and prove properties for functions using F* refinement types.
  • SMT-backed debugging: Leverage Z3 to discharge verification conditions and understand errors from SMT.
  • Extraction & interop: Extract verified code to C via Karamel or to OCaml/Low*, Steel, or Pulse DSLs.
  • Project setup with mise: Create and manage F* projects with mise.

Quick Start

Install F* via mise, then verify a module: fstar.exe MyModule.fst

  • or with caching: fstar.exe --cache_checked_modules MyModule.fst

Frequently Asked Questions about fstar

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I verify code properties using F* refinement types?

F* refinement types let you embed logical predicates into function signatures to express and prove properties about code. Write a function with a refinement type, and F* uses Z3 to automatically verify your claims match the implementation, catching logical errors before runtime.

Can I extract verified F* code to C or other languages?

Yes. F* extracts verified code to C via Karamel or to OCaml, Low*, Steel, and Pulse DSLs. This lets you prove correctness at the specification level, then compile to efficient native code while preserving your verification guarantees.

What does SMT-backed debugging in F* mean and how does it help?

F* delegates proof obligations to Z3, an SMT solver that either discharges them automatically or reports why they failed. Understanding SMT errors helps you refine your types or implementation logic when verification doesn't go through.

How do I set up and manage an F* project?

Use mise to install F* and manage project dependencies. Run `fstar.exe MyModule.fst` to verify a module, or add `--cache_checked_modules` to speed up repeated verification by caching intermediate results.

What's the difference between refinement types and dependent types in F*?

Dependent types in F* let you express richer type relationships where types depend on values. Refinement types are a specific form that attach logical predicates to existing types, making them practical for proving properties without complex type machinery.

When should I use F* for formal verification versus other proof systems?

F* is suited when you want to verify algorithms and protocols with automation, extract to production languages, and integrate with native code. Its SMT backing and multi-language extraction make it practical for systems programming where formal guarantees meet real deployment.