counterexample-debugger

Decode and compress counterexample traces from model checkers into actionable narratives.

1|2|Updated Mar 10, 2026
One-click install
npx skills add https://github.com/santosomar/general-secure-coding-agent-skills --skill counterexample-debugger-santosomar
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: counterexample-debugger
Source: https://github.com/santosomar/general-secure-coding-agent-skills/tree/main/skills/debugging/counterexample-debugger
Command: npx skills add https://github.com/santosomar/general-secure-coding-agent-skills --skill counterexample-debugger-santosomar

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps users understand and act upon complex counterexamples generated by model checking or property-based testing tools, which are often too long or abstract to interpret directly.

Core Features & Use Cases

  • Counterexample Interpretation: Decodes and explains traces from tools like TLC, NuSMV, and CBMC.
  • Trace Compression: Reduces long traces to their essential, changing states and actions.
  • Narrative Translation: Translates compressed traces into a human-readable story of the failure.
  • Code Mapping: Assists in mapping model-level trace steps back to specific source code locations.
  • Use Case: When a TLA+ model checker (TLC) produces a long, complex counterexample trace indicating a fairness violation, this Skill will compress the trace, explain the sequence of events leading to the violation, and help pinpoint the relevant lines of code in the implementation.

Quick Start

Use the counterexample-debugger skill to explain the attached TLC counterexample trace and map it to the source code.

Frequently Asked Questions about counterexample-debugger

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

FAQPage Schema
How do I interpret a complex counterexample trace from a model checker?

Interpreting a model checker counterexample involves decoding lengthy traces by compressing states and identifying key transitions to narrate the failure sequence. This Skill processes traces from TLC, NuSMV, CBMC, and Alloy to make abstract failures actionable.

Can I map a TLA+ TLC counterexample back to my source code for debugging?

Yes, you can map TLA+ TLC counterexamples to source code for debugging. The Skill maps model-level trace steps back to specific source code locations, translating compressed trace narratives into actionable repair points.

What is the best way to compress long model checking traces for analysis?

Compressing long model checking traces requires reducing them to their essential, changing states and actions. Trace compression isolates key transitions, transforming verbose outputs into a human-readable story of the failure.

Does this tool work with NuSMV and CBMC trace analysis?

Yes, this tool works with NuSMV and CBMC trace analysis. The Skill decodes and explains traces from TLC, NuSMV, CBMC, and Alloy, mapping the model-level failures to source code for debugging and repair.

How do I fix property-based testing failures when the trace is too abstract?

Fixing abstract property-based testing failures requires narrating the failure sequence by identifying key transitions within the trace. The Skill translates compressed states into a human-readable story to pinpoint relevant source code.