improve-ut

Analyze changed files and generate unit tests from .trellis/spec/ conventions.

92|8|Updated May 15, 2026
One-click install
npx skills add https://github.com/LonelyHerbivore/Trellis-Herbivore --skill improve-ut-lonelyherbivore
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: improve-ut
Source: https://github.com/LonelyHerbivore/Trellis-Herbivore/tree/main/packages/cli/src/templates/codex/skills/improve-ut
Command: npx skills add https://github.com/LonelyHerbivore/Trellis-Herbivore --skill improve-ut-lonelyherbivore

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill helps you close unit-test coverage gaps by turning code changes into the right kind of tests (unit, integration, or regression) based on the repository’s own .trellis/spec/ unit-test conventions.

Core Features & Use Cases

  • Test-scope decisioning: Chooses unit vs integration vs regression and mock vs real filesystem flows using project-specific unit-test specs.
  • Pattern-consistent test updates: Adds or updates tests following the existing conventions for each discovered unit-test spec package.
  • Validation-first execution: Runs lint, typecheck, and tests, then summarizes results and remaining gaps.

Quick Start

Run the command improve-ut in your project after making code changes that need stronger test coverage.

Frequently Asked Questions about improve-ut

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

FAQPage Schema
How do I improve unit test coverage after making code changes?

To improve unit test coverage after code changes, analyze the changed files and map them to the repository's unit-test specification conventions. Generate new tests following spec-driven scope selection to close coverage gaps.

How does spec-driven test scope selection decide between unit and integration tests?

Spec-driven test scope selection chooses between unit, integration, or regression tests by analyzing the repository's unit-test specification conventions found in .trellis/spec/ directories. It determines whether to use mocks or real filesystem flows based on these project-specific rules.

How do I add pattern-consistent unit tests to match my existing spec packages?

Add pattern-consistent unit tests by mapping changed code to discovered unit-test spec packages in .trellis/spec/. Update or add tests that strictly follow the existing conventions for each specific spec package to maintain consistency.

Can I use pnpm to validate lint, typecheck, and test gaps after generating unit tests?

Yes, pnpm validates generated unit tests by running pnpm lint, pnpm typecheck, and pnpm test. This validation-first execution reports remaining test coverage gaps and ensures the new tests pass all project checks.

When should I run unit test generation to close coverage gaps?

Run unit test generation after feature implementation, bug fixes, or when test coverage gaps are identified across unit-test spec packages. It ensures new code changes are properly validated by mapping them to spec-driven test conventions.

What's the best way to handle test gaps across different unit-test spec packages?

Handle test gaps across unit-test spec packages by discovering conventions in .trellis/spec/ and applying spec-driven scope selection. Generate tests matching each package's patterns, then run pnpm lint, typecheck, and test to report remaining gaps.