add-test-coverage

Analyze the latest HEAD commit and generate a test coverage plan.

5|2|Updated Dec 11, 2025
One-click install
npx skills add https://github.com/thoreinstein/opencode-config --skill add-test-coverage
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-test-coverage
Source: https://github.com/thoreinstein/opencode-config/tree/main/skill/add-test-coverage
Command: npx skills add https://github.com/thoreinstein/opencode-config --skill add-test-coverage

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill streamlines the process of validating code changes by analyzing the most recent commit (HEAD), identifying modified files, and planning test coverage to ensure changes are properly exercised.

Core Features & Use Cases

  • Change analysis: Detects diffs, classifies altered files by layer (Backend Go, Frontend JS/TS, APIs, Config/Infra, Tests) and notes the intended test scope.
  • Test plan generation: Produces a concrete testing plan for unit, integration, and end-to-end tests based on the changes, including suggested fixtures and mocks.
  • Test scaffolding: Generates or updates test stubs and guidance to implement coverage quickly for the HEAD changes.

Quick Start

Run the add-test-coverage workflow to produce a test plan and scaffolding for the latest HEAD commit. The workflow will analyze the diff, categorize changes, and output executable test templates and guidance to implement coverage.

Frequently Asked Questions about add-test-coverage

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

FAQPage Schema
How do I generate test coverage for HEAD commit changes across backend and frontend layers?

To generate test coverage for HEAD commit changes, analyze the latest git diff to classify modified files by layer, then produce a concrete plan spanning unit, integration, and E2E tests with suggested fixtures and mocks.

What is the best way to plan integration tests for Go and JavaScript code changes?

The best way to plan integration tests for Go and JavaScript changes is to categorize touched layers from the HEAD commit diff and outline required integration scenarios with deterministic execution and existing test pattern integration.

How do I scaffold unit and E2E test stubs for recent git diff changes?

Scaffold unit and E2E test stubs for git diff changes by generating executable test templates and guidance that align with detected modifications, ensuring quick coverage implementation for affected backend, frontend, and API surfaces.

Does this test coverage approach work with existing test patterns and frameworks?

Yes, this test coverage approach ensures generated test plans and scaffolding integrate with existing test patterns, applying to touched config and infrastructure layers while maintaining deterministic execution across all surfaces.

When do I need to add test coverage for HEAD commit changes?

You need to add test coverage for HEAD commit changes whenever the latest git diff modifies backend Go, frontend JavaScript, APIs, or config files, requiring unit, integration, or end-to-end tests to validate affected layers.

What types of tests are required when analyzing a HEAD commit diff?

Analyzing a HEAD commit diff requires unit, integration, and E2E tests based on the altered files, producing scenarios with suggested fixtures and mocks to properly exercise changes across all touched surfaces.