counterexample-generator

Generate concrete counterexamples for formal verification failures and assertion violations.

142|14|Updated Feb 14, 2026
One-click install
npx skills add https://github.com/ArabelaTso/Skills-4-SE --skill counterexample-generator
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: counterexample-generator
Source: https://github.com/ArabelaTso/Skills-4-SE/tree/main/skills/counterexample-generator
Command: npx skills add https://github.com/ArabelaTso/Skills-4-SE --skill counterexample-generator

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps developers pinpoint the exact cause of failures in formal verification, assertions, or specifications by generating concrete counterexamples.

Core Features & Use Cases

  • Generate Failing Inputs: Produces specific input values that demonstrate a bug or verification failure.
  • Execution Traces: Provides step-by-step execution paths leading to the failure.
  • Use Case: When a formal verification tool reports a "postcondition violated" error, this Skill can generate the precise input that causes the violation, allowing for quick debugging and fixing.

Quick Start

Use the counterexample-generator skill to find a counterexample for the withdraw function failure.

Frequently Asked Questions about counterexample-generator

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

FAQPage Schema
How do I generate a counterexample for a formal verification failure?

To generate a counterexample for a formal verification failure, you use this Skill to automatically produce concrete inputs, execution traces, and state information that demonstrate the specific assertion violation or invariant break.

What is the best way to debug a violated postcondition in an assertion?

Debugging a violated postcondition involves identifying the specific invalid inputs causing the specification mismatch, which this Skill provides by generating step-by-step execution traces leading directly to the assertion violation.

Can I use this to find minimal reproducing examples for failed proofs?

Yes, you can use this Skill to create minimal reproducing examples for failed proofs by extracting the precise invalid inputs and execution paths that trigger the formal verification failure.

How do execution traces help identify invalid inputs during debugging?

Execution traces help identify invalid inputs by providing a step-by-step execution path through the code, demonstrating exactly how specific state information leads to invariant breaks and specification mismatches.

When do I need a counterexample generator for debugging code?

You need a counterexample generator when a formal verification tool reports an error like an invariant break, and you must pinpoint the exact invalid inputs and execution traces causing the specification mismatch to fix the bug quickly.