solve

Validate code constants and logical invariants with Z3 model-finding.

2|Updated Apr 15, 2026
One-click install
npx skills add https://github.com/getspur/spur --skill solve-getspur
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: solve
Source: https://github.com/getspur/spur/tree/main/assets/skills/solve
Command: npx skills add https://github.com/getspur/spur --skill solve-getspur

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill eliminates the risk of using unverified magic numbers, guessed layout dimensions, or untested configuration constants by providing a formal constraint-solving layer.

Core Features & Use Cases

  • Constraint Modeling: Use Z3 to prove that your code invariants, clamps, or bounds are sound for all possible inputs.
  • Feasibility Checking: Determine if a set of rules (like resource limits or feature flags) can coexist or if they contradict each other.
  • Use Case: Before hardcoding a worker pool size, use this skill to prove that your chosen values satisfy both a memory budget and a minimum throughput requirement.

Quick Start

Use the solve skill to verify that the proposed worker pool size of 8 satisfies the memory constraint of 512 MiB given the provided cost formula.

Frequently Asked Questions about solve

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

FAQPage Schema
How do I verify code constants and logical invariants using Z3 constraint solving?

To verify code constants and logical invariants with Z3 constraint solving, you provide a structured JSON encoding of variables and constraints, which returns sat, unsat, or model-based solutions for validation.

How can I check if resource allocation rules and configuration limits are feasible?

Feasibility checking for resource allocation rules determines if constraints like memory budgets and minimum throughput requirements can coexist or contradict each other by returning a sat or unsat result.

How do I prove that hardcoded magic numbers and bounds are sound for all inputs?

Proving hardcoded magic numbers and bounds are sound for all inputs requires constraint modeling to validate that chosen values satisfy defined configuration rules and boundary conditions without contradiction.

What is the best way to validate a worker pool size against a memory budget?

Validating a worker pool size against a memory budget requires applying Z3 constraint-solving to test if proposed values satisfy both memory limits and minimum throughput requirements simultaneously.

Do I need a structured JSON encoding to use Z3 model-finding for boundary condition verification?

Yes, Z3 model-finding for boundary condition verification requires a structured JSON encoding of variables and constraints to process the rules and return sat, unsat, or model-based solutions.

When should I not use formal verification for configuration rules?

Formal verification for configuration rules is not suited for scenarios lacking explicit mathematical boundaries, as constraint-solving requires structured JSON encoding of defined variables and logical invariants.