model-guided-code-repair

Repair temporal property violations using model-checking counterexamples.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill automatically repairs code that violates temporal properties by analyzing model-checking counterexamples, ensuring software correctness and reliability.

Core Features & Use Cases

  • Automated Repair: Fixes code violations identified by formal verification tools.
  • Root Cause Analysis: Pinpoints the source of temporal property breaches.
  • Use Case: When a critical safety property in a concurrent system is violated, this skill analyzes the model checker's counterexample to identify a race condition and automatically inserts the necessary synchronization primitives to fix it.

Quick Start

Use the model-guided-code-repair skill to analyze the provided counterexample trace and repair the temporal property violation in the source code.

Frequently Asked Questions about model-guided-code-repair

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

FAQPage Schema
How do I fix code that violates temporal logic properties?

To fix code that violates temporal logic properties, this Skill analyzes model-checking counterexamples to identify root causes like missing guards or race conditions, proposing minimal code modifications to restore software correctness.

What is model-guided code repair for formal verification failures?

Model-guided code repair is an automated process that uses counterexample traces from formal verification to pinpoint the source of temporal property breaches and generate semantically justified fixes.

Can I automatically repair race conditions in concurrent systems using model checking?

Yes, you can automatically repair race conditions in concurrent systems by using this Skill to analyze the model checker's counterexample trace and insert the necessary synchronization primitives.

How do I resolve LTL or CTL property violations in state machines?

To resolve LTL or CTL property violations in state machines, this Skill pinpoints the exact root cause from the counterexample trace and proposes minimal, semantically justified code modifications.

Does this code repair approach validate fixes after modifying source code?

Yes, this code repair approach validates fixes by performing re-verification or generating tests specifically for concurrent systems and state machines to ensure the temporal properties hold.

What are the limitations of using counterexamples for automated code repair?

The approach relies on receiving accurate counterexample traces from formal verification tools and focuses on minimal modifications, meaning it targets specific root causes rather than performing broad architectural refactoring.