z3-test-skill

star 0

Z3 test skill for symbolic execution, constraint checking, and SMT-based verification examples.

SpectreDeath By SpectreDeath schedule Updated 6/13/2026

name: z3-test-skill Domain: Testing Version: 1.0.0 surfaces: - python - z3 description: Z3 test skill for symbolic execution, constraint checking, and SMT-based verification examples. compatibility: PYTHON allowed-tools: | - read - write - edit - bash - glob - grep - codebase_search - task - sequentialthinking_sequentialthinking - webfetch - websearch - question - suggest

Purpose

A Z3 Test Skill skill.

Description

Detailed description for Z3 Test Skill.

Implementation

Python (constraint definition)

def define_constraints(solver, input_data):
    """Define problem constraints using Z3 Python API."""
    from z3 import Int, And, Or, Not, Implies, If
    
    # Example: define integer variables
    x = Int("x")
    y = Int("y")
    
    # Add constraints (customize per problem)
    constraints = [
        x >= 0,
        y >= 0,
        x + y <= 10
    ]
    
    for c in constraints:
        solver.add(c)
    
    return solver, [x, y]

Z3 (solver)

; Z3 will be invoked via Python API typically
; This placeholder indicates Z3 surface usage
; The actual solving happens in Python code above

Python (result parsing)

def main(input_data):
    from z3 import Solver, sat
    
    # 1. Create solver
    solver = Solver()
    
    # 2. Define constraints
    define_constraints(solver, input_data)
    
    # 3. Check satisfiability
    if solver.check() == sat:
        model = solver.model()
        # Extract variable assignments
        result = {"status": "ok", "model": str(model)}
    else:
        result = {"status": "unsat"}
    
    return result

Examples

input_data = {}
# Expected output: {"status": "ok", "model": "..."} or {"status": "unsat"}
Install via CLI
npx skills add https://github.com/SpectreDeath/Em-Cubed --skill z3-test-skill
Repository Details
star Stars 0
call_split Forks 0
navigation Branch main
article Path SKILL.md
More from Creator
SpectreDeath
SpectreDeath Explore all skills →