Agent skill

Static Reasoning Verifier

by ArabelaTso in ArabelaTso/Skills-4-SE

Verify code correctness statically against specifications using type checking, contract verification, and formal methods.

Apache-2.0Auto-check passedDevelopment

Install Static Reasoning Verifier

skills CLI
$ npx skills add ArabelaTso/Skills-4-SE --skill static-reasoning-verifier -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ArabelaTso/Skills-4-SE static-reasoning-verifier --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ArabelaTso/Skills-4-SE.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/static-reasoning-verifier .claude/skills/static-reasoning-verifier && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
static-reasoning-verifier
GitHub stars
253
Token cost
~2.9k tokens
SKILL.md length
330 words
Files
5 (incl. scripts, references)
Skills in repo
170
Repo updated
First seen
Licence
Apache-2.0

At a glance

Verify code correctness statically against specifications using type checking, contract verification, and formal methods.

  • Works in 12 steps: Type Checking → Contract Verification → Null Safety → …
  • Verifying type safety and null safety in Python
  • SKILL.md covers Quick Start, Verification Types, Verification Workflow and Python Verification, plus 3 more sections
  • Runs Python scripts from its folder; calls python and make

What it does

Static Reasoning Verifier is an agent skill from ArabelaTso/Skills-4-SE. Verify code correctness statically against specifications using type checking, contract verification, and formal methods. Use when: (1) Verifying type safety and null safety in Python, Java, or C/C++ code, (2) Checking design-by-contract specifications (preconditions, postconditions, invariants), (3) Validating code against formal specifications, (4) Ensuring code quality and correctness before runtime, (5) Finding potential bugs through static analysis. Supports Python (mypy, contracts), Java (javac, JML), and…

Its SKILL.md is about 2.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including scripts and reference files (for example `references/java_jml.md`, `references/python_contracts.md` and `scripts/verify_java.py`).

It sits in Development, covering Type safety. It works with Java, Python and C++. The repository describes itself as: A curated list of 180+ useful Claude Skills for Software Engineering and resources for customizing AI for SE workflows. The licence is Apache-2.0.

When your agent uses it

  • Verifying type safety and null safety in Python
  • Checking design-by-contract specifications (preconditions
  • Validating code against formal specifications
  • Ensuring code quality and correctness before runtime

Example prompts

  • “/static-reasoning-verifier”

Requirements

  • Python 3

Workflow steps

12 steps, taken from the step headings in SKILL.md.

  1. Type Checking
  2. Contract Verification
  3. Null Safety
  4. Write Specifications
  5. Add Type Annotations
  6. Run Verification
  7. Review Issues
  8. Fix Issues
  9. Write Contracts First
  10. Keep Contracts Simple
  11. Use Type Annotations Consistently
  12. Verify Early and Often

What it can do on your machine

Read from SKILL.md and the folder at commit 4f38503. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 2 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python
    • make

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Static Reasoning Verifier loads about 2.9k tokens when it runs, and up to ~6.8k if it reads all its reference files. Until then it costs about 153 tokens; SKILL.md has 330 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~153
When it runs · the whole SKILL.md, loaded when a task matches
~2.9k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~6.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from ArabelaTso/Skills-4-SE at commit 4f38503, republished under its Apache-2.0 licence (© ArabelaTso). 330 words, ~2,920 tokens.

Download SKILL.mdSave it as .claude/skills/static-reasoning-verifier/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
static-reasoning-verifier
description
Verify code correctness statically against specifications using type checking, contract verification, and formal methods. Use when: (1) Verifying type safety and null safety in Python, Java, or C/C++ code, (2) Checking design-by-contract specifications (preconditions, postconditions, invariants), (3) Validating code against formal specifications, (4) Ensuring code quality and correctness before runtime, (5) Finding potential bugs through static analysis. Supports Python (mypy, contracts), Java (javac, JML), and provides verification scripts and contract specification guidelines.

Static Reasoning Verifier

Verify code correctness statically against specifications through type checking, contract verification, and formal reasoning.

Quick Start

Verify Python Code
bash
# Type checking and contract verification
python scripts/verify_python.py src/app.py

# Strict mode (enforce all type annotations)
python scripts/verify_python.py src/ --strict
Verify Java Code
bash
# Type checking, null safety, and JML contracts
python scripts/verify_java.py src/Main.java

# Strict mode (enforce JML contracts)
python scripts/verify_java.py src/ --strict

Verification Types

1. Type Checking

Verify type correctness using static type checkers:

Python (mypy):

python
def add(a: int, b: int) -> int:
    return a + b

result: int = add(5, 10)  # ✅ Type safe
result: str = add(5, 10)  # ❌ Type error

Java:

java
public int add(int a, int b) {
    return a + b;
}

int result = add(5, 10);    // ✅ Type safe
String result = add(5, 10); // ❌ Compile error
2. Contract Verification

Verify preconditions, postconditions, and invariants:

Python:

python
def sqrt(x: float) -> float:
    """
    Calculate square root.

    Requires:
        - x >= 0

    Ensures:
        - result * result ≈ x
    """
    assert x >= 0, "Input must be non-negative"
    result = x ** 0.5
    assert abs(result * result - x) < 1e-10
    return result

Java (JML):

java
/*@ requires x >= 0;
  @ ensures \result >= 0;
  @ ensures \result * \result <= x;
  @*/
public static int sqrt(int x) {
    // Implementation
}
3. Null Safety

Verify null pointer safety:

Java:

java
public @NonNull String getName(@NonNull User user) {
    return user.getName();  // Safe - user cannot be null
}

Python:

python
from typing import Optional

def find_user(user_id: int) -> Optional[User]:
    """May return None if user not found."""
    return database.get_user(user_id)

Verification Workflow

1. Write Specifications

Define contracts for functions/methods:

python
def divide(a: float, b: float) -> float:
    """
    Divide two numbers.

    Precondition:
        - b != 0

    Postcondition:
        - result * b ≈ a

    Raises:
        ValueError: If b is zero
    """
    if b == 0:
        raise ValueError("Division by zero")
    return a / b
2. Add Type Annotations
python
from typing import List, Optional

def process_items(items: List[int], threshold: int = 0) -> List[int]:
    """Filter items above threshold."""
    return [item for item in items if item > threshold]
3. Run Verification
bash
# Verify implementation matches specifications
python scripts/verify_python.py src/
4. Review Issues
Found 3 issue(s): 1 error(s), 2 warning(s)

ERRORS:
  ❌ src/utils.py:15 [type]
     Argument 1 to "divide" has incompatible type "str"; expected "float"
     💡 Check argument type matches function signature

WARNINGS:
  ⚠️  src/math.py:42 [contract]
     Function 'sqrt' has parameters but no preconditions specified
     💡 Add 'Requires:' section in docstring or @requires decorator
5. Fix Issues

Update code to satisfy specifications:

python
# Before (type error)
result = divide("10", 5)

# After (type safe)
result = divide(10.0, 5.0)

Python Verification

Type Checking with mypy

The verification script uses mypy for static type checking:

bash
python scripts/verify_python.py src/ --strict

Checks:

  • Type compatibility
  • Function signatures
  • Return types
  • Optional/None handling

Example:

python
def greet(name: str) -> str:
    return f"Hello, {name}"

greet("Alice")  # ✅ Valid
greet(123)      # ❌ Type error: expected str, got int
Contract Verification

Checks design-by-contract specifications:

Decorator-based:

python
from contracts import requires, ensures

@requires(lambda x: x >= 0)
@ensures(lambda result: result >= 0)
def sqrt(x: float) -> float:
    return x ** 0.5

Docstring-based:

python
def withdraw(account: Account, amount: float) -> None:
    """
    Withdraw money from account.

    Requires:
        - amount > 0
        - amount <= account.balance

    Ensures:
        - account.balance == old(account.balance) - amount
    """
    assert amount > 0
    assert amount <= account.balance
    account.balance -= amount

See python_contracts.md for complete guide on Python design-by-contract patterns.

Java Verification

Type and Null Safety

The verification script uses javac for compilation and type checking:

bash
python scripts/verify_java.py src/ --strict

Checks:

  • Type compatibility
  • Null safety annotations (@NonNull, @Nullable)
  • Method signatures
  • Generic type parameters

Example:

java
public @NonNull String formatUser(@NonNull User user) {
    // user cannot be null
    return user.getName() + " (" + user.getEmail() + ")";
}

public @Nullable User findUser(int userId) {
    // May return null
    return database.getUser(userId);
}
JML Contract Verification

Checks Java Modeling Language specifications:

java
public class BankAccount {
    private double balance;

    /*@ invariant balance >= 0;
      @*/

    /*@ requires amount > 0;
      @ requires amount <= balance;
      @ ensures balance == \old(balance) - amount;
      @ assignable balance;
      @*/
    public void withdraw(double amount) {
        balance -= amount;
    }

    /*@ requires amount > 0;
      @ ensures balance == \old(balance) + amount;
      @ assignable balance;
      @*/
    public void deposit(double amount) {
        balance += amount;
    }
}

See java_jml.md for complete JML specification guide.

Common Verification Patterns

Range Validation
python
def set_age(person: Person, age: int) -> None:
    """
    Requires: 0 <= age <= 150
    Ensures: person.age == age
    """
    assert 0 <= age <= 150, "Age must be between 0 and 150"
    person.age = age
Collection Constraints
python
def process_batch(items: List[Item]) -> None:
    """
    Requires:
        - len(items) > 0
        - len(items) <= 1000
    """
    assert len(items) > 0, "Batch cannot be empty"
    assert len(items) <= 1000, "Batch too large"
    # Process items
State Invariants
python
class Stack:
    """
    Invariant:
        - 0 <= self.size <= self.capacity
        - All elements before size are not None
    """

    def push(self, item):
        """
        Requires: not self.is_full() and item is not None
        Ensures: self.size == old(self.size) + 1
        """
        assert not self.is_full()
        assert item is not None
        self.items[self.size] = item
        self.size += 1
        self._check_invariant()

Best Practices

1. Write Contracts First

Define specifications before implementation:

python
def sort_list(items: List[int]) -> List[int]:
    """
    Sort list in ascending order.

    Requires:
        - items is a list

    Ensures:
        - len(result) == len(items)
        - result is sorted ascending
        - result contains same elements as items
    """
    # Implementation here
2. Keep Contracts Simple
python
# ✅ Good - Simple, clear
def withdraw(amount: float):
    """Requires: amount > 0 and amount <= balance"""
    assert amount > 0 and amount <= self.balance

# ❌ Bad - Too complex
def withdraw(amount: float):
    """Requires: (amount > 0 and amount <= balance) or (overdraft_allowed and amount <= balance + overdraft_limit)"""
3. Use Type Annotations Consistently
python
# ✅ Good - All parameters and return types annotated
def calculate_total(items: List[Item], tax_rate: float) -> float:
    return sum(item.price for item in items) * (1 + tax_rate)

# ❌ Bad - Missing annotations
def calculate_total(items, tax_rate):
    return sum(item.price for item in items) * (1 + tax_rate)
4. Verify Early and Often
bash
# Verify after every significant change
python scripts/verify_python.py src/

# Integrate into CI/CD
make verify  # Run verification in build pipeline
5. Document Side Effects
python
def update_database(user: User) -> None:
    """
    Update user in database.

    Requires:
        - user.id is set

    Ensures:
        - Database contains updated user

    Side effects:
        - Modifies database
        - May raise DatabaseError
    """

Troubleshooting

Type Errors

Problem: Incompatible type error

Solution:

python
# Add explicit type annotation or cast
result: int = int(value)  # Cast to int
result = cast(int, value)  # Type cast

Problem: Optional type handling

Solution:

python
def get_name(user: Optional[User]) -> str:
    if user is None:
        return "Unknown"
    return user.name  # Safe - checked for None
Contract Violations

Problem: Precondition failure

Solution:

python
# Add validation before calling
if amount > 0 and amount <= account.balance:
    account.withdraw(amount)
else:
    raise ValueError("Invalid withdrawal amount")

Problem: Postcondition failure

Solution:

python
# Verify implementation satisfies postcondition
def sqrt(x: float) -> float:
    result = x ** 0.5
    # Check postcondition
    assert abs(result * result - x) < 1e-10
    return result

Reference Documentation

Python Contracts

See python_contracts.md for:

  • Design by contract patterns
  • Preconditions, postconditions, invariants
  • Decorator-based contracts (icontract, deal)
  • Docstring specifications
  • Type annotations as contracts
  • Common contract patterns
  • Verification checklist
Java JML

See java_jml.md for:

  • JML syntax and semantics
  • Preconditions (@requires)
  • Postconditions (@ensures)
  • Class invariants
  • Quantifiers and pure methods
  • Assignable clauses
  • Null safety with JML
  • OpenJML verification tools
  • Loop invariants
  • Contract inheritance

Integration with Development Workflow

Pre-commit Hook
bash
#!/bin/bash
# .git/hooks/pre-commit

echo "Running static verification..."
python scripts/verify_python.py src/

if [ $? -ne 0 ]; then
    echo "Verification failed. Commit aborted."
    exit 1
fi
CI/CD Pipeline
yaml
# .github/workflows/verify.yml
name: Static Verification

on: [push, pull_request]

jobs:
  verify:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3

      - name: Set up Python
        uses: actions/setup-python@v4
        with:
          python-version: '3.11'

      - name: Install dependencies
        run: pip install mypy

      - name: Run verification
        run: python scripts/verify_python.py src/ --strict
IDE Integration

Most IDEs support type checking and linting:

  • VS Code: Python extension with mypy integration
  • PyCharm: Built-in type checker
  • IntelliJ IDEA: Java type checking and JML plugins

© ArabelaTso, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 4 other files (scripts, references) in skills/static-reasoning-verifier of ArabelaTso/Skills-4-SE.

  • SKILL.md
  • references/java_jml.md
  • references/python_contracts.md
  • scripts/verify_java.py
  • scripts/verify_python.py

Open the folder on GitHubat commit 4f38503

Compare with similar skills

Static Reasoning Verifier next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Static Reasoning Verifier compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Static Reasoning Verifier this skillArabelaTso/Skills-4-SE253—~2.9kAutomated safety check: PassApache-2.0
MCP Debuggerdebugmcp/mcp-debugger172—~3.8kAutomated safety check: PassMIT
Dbgtheodo-group/debug-that158—~2.5kAutomated safety check: PassMIT
Code Review Excellenceandrew-yangy/gru-ai155—~1.7kAutomated safety check: NotesMIT
Code Revieweralirezarezvani/claude-skills28k1 repos~1.6kAutomated safety check: PassMIT
Check Toolsoaustegard/claude-skills150—~641Automated safety check: PassMIT

Similar skills

  • MCP Debugger

    debugmcp/mcp-debugger

    A skill your agent uses when investigating a bug, failing test, or unexpected runtime behavior and the mcp-debugger MCP server is available — drives real step-through debuggers (breakpoints, stack…

    172 GitHub stars~3.8k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Dbg

    theodo-group/debug-that

    Debug applications using the dbg CLI debugger. An agent skill from theodo-group/debug-that.

    158 GitHub stars~2.5k tokensUpdated today
    DevelopmentAuto-check passed
  • Code Review Excellence

    andrew-yangy/gru-ai

    Provides comprehensive code review guidance for React 19, Vue 3, Rust, TypeScript, Java, Python, and C/C++.

    155 GitHub stars~1.7k tokensUpdated 7 mo ago
    DevelopmentAuto-check: notes
  • Code Reviewer

    alirezarezvani/claude-skills

    Code review automation for TypeScript, JavaScript, Python, Go, Swift, Kotlin, C, .NET, Java, C, C++, Rust, Ruby, PHP, and Dart/Flutter.

    28k GitHub starsUsed in 1 repo~1.6k tokens
    DevelopmentAuto-check passed
  • Check Tools

    oaustegard/claude-skills

    Validates development tool installations across Python, Node.js, Java, Go, Rust, C/C++, Git, and system utilities.

    150 GitHub stars~641 tokensUpdated today
    DevelopmentAuto-check passed
  • Lint

    Microck/ordinary-claude-skills

    Run targeted linting, formatting, and code quality checks on modified files.

    404 GitHub stars~2.2k tokensUpdated 1 mo ago
    DevelopmentAuto-check: notes

More from ArabelaTso/Skills-4-SE

All 170 skills in this repo
  • Framework Migration Assistant

    ArabelaTso/Skills-4-SE

    Automatically migrate Python web applications between frameworks (Flask → FastAPI, Django → FastAPI).

    253 GitHub stars~1.9k tokensUpdated 1 mo ago
    Auto-check passed
  • Metamorphic Test Generator

    ArabelaTso/Skills-4-SE

    Generate test cases using metamorphic testing by applying transformations based on metamorphic properties.

    253 GitHub stars~798 tokensUpdated 1 mo ago
    Auto-check passed
  • Reproduction Trace Instrumenter

    ArabelaTso/Skills-4-SE

    Instruments programs to capture execution traces specifically for reproducing reported bugs, enabling consistent replay and diagnosis of failures.

    253 GitHub stars~2.4k tokensUpdated 1 mo ago
    Auto-check passed
  • Spring Mvc To Boot Migrator

    ArabelaTso/Skills-4-SE

    Automatically migrate Spring MVC applications to Spring Boot.

    253 GitHub stars~2.2k tokensUpdated 1 mo ago
    Auto-check passed
  • State Snapshot Instrumenter

    ArabelaTso/Skills-4-SE

    Instrument programs (Python, C/C++, Java) to capture snapshots of key program states at runtime, including variables, memory, and call stacks.

    253 GitHub stars~2.2k tokensUpdated 1 mo ago
    Auto-check passed

Works with

Categories

Questions about Static Reasoning Verifier

What does Static Reasoning Verifier do?

Verify code correctness statically against specifications using type checking, contract verification, and formal methods. Static Reasoning Verifier is an agent skill from ArabelaTso/Skills-4-SE. Verify code correctness statically against specifications using type checking, contract verification, and formal methods.

When should I use Static Reasoning Verifier?

Static Reasoning Verifier fits situations like: verifying type safety and null safety in Python; checking design-by-contract specifications (preconditions; validating code against formal specifications; ensuring code quality and correctness before runtime.

How do I install Static Reasoning Verifier in Claude Code?

Run `npx skills add ArabelaTso/Skills-4-SE --skill static-reasoning-verifier -a claude-code`. Or copy the skill folder (skills/static-reasoning-verifier in ArabelaTso/Skills-4-SE) into .claude/skills/static-reasoning-verifier in your project. Claude Code loads it when a task matches its description.

How do I install Static Reasoning Verifier in Codex?

Run `npx skills add ArabelaTso/Skills-4-SE --skill static-reasoning-verifier -a codex`. Or copy the skill folder (skills/static-reasoning-verifier in ArabelaTso/Skills-4-SE) into .agents/skills/static-reasoning-verifier in your project. Codex loads it when a task matches its description.

Can I use Static Reasoning Verifier in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ArabelaTso/Skills-4-SE --skill static-reasoning-verifier -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/static-reasoning-verifier, .gemini/skills/static-reasoning-verifier, .github/skills/static-reasoning-verifier and .opencode/skills/static-reasoning-verifier in your project.

What does Static Reasoning Verifier need to run?

Going by SKILL.md and its folder, Static Reasoning Verifier needs Python for the scripts in its folder and the command-line tools its instructions call (python and make). Our summary lists: Python 3.

Does Static Reasoning Verifier access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Static Reasoning Verifier safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Static Reasoning Verifier use?

Static Reasoning Verifier is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Static Reasoning Verifier use?

About 2.9k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 3.9k tokens, read only when the agent opens those files.

What are the alternatives to Static Reasoning Verifier?

Skills that share tags, products or a category with Static Reasoning Verifier: MCP Debugger (debugmcp/mcp-debugger, 172 stars), Dbg (theodo-group/debug-that, 158 stars), Code Review Excellence (andrew-yangy/gru-ai, 155 stars) and Code Reviewer (alirezarezvani/claude-skills, 28k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Static Reasoning Verifier?

ArabelaTso (a GitHub user) maintains it in ArabelaTso/Skills-4-SE, which has 253 GitHub stars. The repository holds 170 skills in this directory. The repository was last updated on August 21, 2026.

Source: ArabelaTso/Skills-4-SE on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.