specops-contract-tests

Generate framework-agnostic pytest contract tests from a SpecOps analysis markdown file.

Updated Mar 14, 2026
One-click install
npx skills add https://github.com/ryan-mahoney/ryan-llm-skills --skill specops-contract-tests
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: specops-contract-tests
Source: https://github.com/ryan-mahoney/ryan-llm-skills/tree/main/skills/specops-contract-tests
Command: npx skills add https://github.com/ryan-mahoney/ryan-llm-skills --skill specops-contract-tests

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Analyzing a SpecOps markdown to generate concrete, framework-agnostic contract tests that validate interfaces, data models, decision logic, and error handling across any implementation.

Core Features & Use Cases

  • Derives test scenarios from SpecOps sections 2, 3, 4A, 4B, 8, and 10 to form comprehensive Pytest contracts.
  • Produces a single module named test_<target>.py that can run against multiple tech stacks.
  • Creates realistic mock data structures from Section 3 to test contract expectations and error paths.

Quick Start

Provide the path to the analysis markdown file to generate contract tests.

Frequently Asked Questions about specops-contract-tests

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

FAQPage Schema
How do I generate pytest contract tests from a spec analysis markdown file?

To generate pytest contract tests from a spec analysis markdown file, you provide the analysis file path to generate a single framework-agnostic pytest module. This module validates public interfaces, data models, decision rules, and error handling across any implementation.

Can I use contract tests to validate multiple tech stacks from one analysis?

Yes, you can use contract tests to validate multiple tech stacks from one analysis. The generated pytest module is framework-agnostic, allowing the same derived test scenarios and mock data structures to run against any implementation.

What is framework-agnostic contract testing and when do I need it?

Framework-agnostic contract testing is the process of validating public interfaces, data models, and error handling independently of the underlying implementation. You need it when you want a single pytest module to enforce specifications across multiple tech stacks.

What sections of a SpecOps analysis are used to derive test scenarios?

Test scenarios and mock data structures are derived from SpecOps analysis sections 2, 3, 4A, 4B, 8, and 10. These sections provide the necessary interfaces, data models, decision logic, and error paths to form comprehensive pytest contracts.

Do I need any specific frameworks or dependencies installed to generate these contract tests?

No specific dependencies are required to generate these contract tests. You only need to provide a valid SpecOps analysis markdown file as input to automatically produce the test module.

How are mock data structures created for testing error paths in contract tests?

Mock data structures for testing error paths are created from Section 3 of the SpecOps analysis. The generation process uses these realistic mock structures to validate contract expectations and error handling across any implementation.