generate-unit-pure-tests

Generate framework-free unit tests for pure business rules from behavior specs.

3|Updated Jan 25, 2026
One-click install
npx skills add https://github.com/kapilvirenahuja/garura --skill generate-unit-pure-tests
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: generate-unit-pure-tests
Source: https://github.com/kapilvirenahuja/garura/tree/main/core/components/skills/generate-unit-pure-tests
Command: npx skills add https://github.com/kapilvirenahuja/garura --skill generate-unit-pure-tests

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Generate reliable unit tests for complex, non-trivial business rules without coupling them to a specific framework, so the test suite stays valid across stack migrations.

Core Features & Use Cases

  • Pure vs stack-coupled classification: Separates portable business logic from framework-embedded behavior to avoid brittle tests.
  • Rule-level test generation: Creates one test file per extracted pure unit, covering scenarios and edge cases described in the behavior spec.
  • Deterministic, tiered testing discipline: Ensures newly generated unit-pure tests focus on functional correctness and records stack-coupled exclusions as cited_existing references instead of generating wrong-tier tests.
  • Framework harness selection: Detects the unit test framework from the provided test harness (for example, Jest/Vitest style conventions).

Quick Start

Use the generate-unit-pure-tests skill to produce portable unit test files from a feature’s behavior specification by ensuring the relevant rules are classified as pure business logic and locating the smallest importable pure unit to test.

Frequently Asked Questions about generate-unit-pure-tests

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

FAQPage Schema
How do I generate unit tests for pure business logic without coupling them to a framework?

To generate portable unit tests for pure business logic, provide a behavior specification, test harness path, and codebase root to classify rules as pure or stack-coupled, then output importable spec files for framework-independent testing.

Can I use Jest or Vitest to test extracted pure business rules across stack migrations?

Yes, you can use Jest or Vitest to test extracted pure business rules, as the test harness framework is automatically detected to generate portable spec files that remain valid across stack migrations.

What is the best way to separate portable business logic from framework-embedded behavior for testing?

The best way to separate portable business logic from framework-embedded behavior is by classifying behavior spec rules as pure, stack-coupled, or borderline, then generating tests only for the smallest importable pure units.

How do I handle multi-branch guards and state transitions when generating unit tests?

To handle multi-branch guards and state transitions during unit test generation, map behavior spec rules to the smallest extractable pure units, validating computational logic without HTTP, ORM, or DOM dependencies.

Why are some behavior spec rules excluded from generated unit test files?

Behavior spec rules are excluded from generated unit test files when classified as stack-coupled, ensuring deterministic tiered testing discipline by recording these exclusions as cited_existing references instead of generating wrong-tier tests.