test-preservation

Diagnose failing tests and preserve coverage instead of deleting or skipping them.

6|Updated Mar 11, 2026
One-click install
npx skills add https://github.com/open-hax/opencode-skills --skill test-preservation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-preservation
Source: https://github.com/open-hax/opencode-skills/tree/main/.opencode/skills/test-preservation
Command: npx skills add https://github.com/open-hax/opencode-skills --skill test-preservation

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Protocol to prevent deleting or skipping tests to make builds pass, ensuring code quality and stable software delivery by preserving test coverage.

Core Features & Use Cases

  • Enforces test-preservation discipline by guiding engineers to diagnose failures and fix root causes rather than removing tests.
  • Provides a structured workflow for evaluating test failures, updating tests only when behavior changes, and documenting rationale.
  • Helps teams maintain high-quality CI/CD feedback loops and reliable release readiness.

Quick Start

Provide the failing test details to the assistant and follow its guidance to fix the code and preserve test coverage.

Frequently Asked Questions about test-preservation

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

FAQPage Schema
How do I fix a failing CI build without deleting tests?

To fix a failing CI build without deleting tests, you must diagnose the failure root cause and resolve the code issue rather than removing the test. This test-preservation protocol enforces structured failure diagnosis to maintain stable software delivery.

What is test preservation in quality assurance?

Test preservation in quality assurance is the discipline of preventing the removal or skipping of tests to make builds pass. It ensures code quality by enforcing structured failure analysis and maintaining test coverage during CI failures.

How do I handle flaky tests in a CI CD pipeline?

Handling flaky tests in a CI CD pipeline requires evaluating the test failures and fixing the root causes. You should only update tests after validating expected behavior changes and documenting the rationale to preserve test coverage.

When should I update a failing test instead of deleting it?

You should update a failing test instead of deleting it only when the expected application behavior has legitimately changed. This requires validating the new behavior and documenting the rationale to maintain quality assurance.

Why do teams delete tests to pass builds and why is it harmful?

Teams delete tests to pass builds to quickly resolve CI failures, but this harms code quality by reducing test coverage. Skipping tests degrades CI CD feedback loops and compromises reliable release readiness over time.