improve-ut

Update unit tests for changed code using .trellis/spec/ conventions.

3.9k|339|Updated Feb 3, 2026
One-click install
npx skills add https://github.com/zhukunpenglinyutong/desktop-cc-gui --skill improve-ut-zhukunpenglinyutong
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: improve-ut
Source: https://github.com/zhukunpenglinyutong/desktop-cc-gui/tree/main/.agents/skills/improve-ut
Command: npx skills add https://github.com/zhukunpenglinyutong/desktop-cc-gui --skill improve-ut-zhukunpenglinyutong

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Analyzes changed files and improves unit test coverage using project-specific testing conventions from .trellis/spec/ unit-test specs. Determines test scope (unit vs integration vs regression), adds or updates tests following existing patterns, and runs validation. Use when code changes need test coverage, after implementing a feature, after fixing a bug, or when test gaps are identified.

Core Features & Use Cases

  • Analyzes changed files to identify coverage gaps and suggest targeted test updates.
  • Determines whether to apply unit, integration, or regression tests based on observed changes.
  • Adds or updates tests following project conventions and runs validation (lint, typecheck, tests).
  • Use Case: After implementing a feature, run improve-ut to align tests with new behavior and ensure regression protection.

Quick Start

Run improve-ut to scan changed files and update tests according to the project unit-test specs.

Frequently Asked Questions about improve-ut

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

FAQPage Schema
How do I automate unit-test coverage for code changes using project specs?

You automate unit-test coverage by analyzing changed files and aligning new tests with project-specific unit-test specs. The tool identifies coverage gaps, determines whether to apply unit, integration, or regression tests, and updates tests following existing conventions.

How do I determine if a code change needs unit, integration, or regression tests?

You determine test scope by analyzing the nature of the changed files against project conventions. The tool evaluates observed changes from feature additions, bug fixes, or refactors to automatically decide whether unit, integration, or regression tests are required.

How to update tests after fixing a bug to ensure regression protection?

You update tests after a bug fix by scanning the changed files and adding targeted regression tests. The tool aligns the new tests with the project's unit-test specs and runs validation to ensure the fix is protected against future regressions.

Do I need specific directory structures to automate test generation?

Yes, you need the `.trellis/spec/` directory structure in your codebase. The tool specifically applies to codebases containing these unit-test specs to identify conventions and determine the correct testing scope.

Can I validate code changes by running lint, typecheck, and test suites together?

Yes, you validate code changes by running lint, typecheck, and test suites in sequence. The tool automatically runs these validation checks after updating tests, summarizing decisions, updates, and any remaining coverage gaps.

What is the best way to align tests with new behavior after implementing a feature?

The best way to align tests with new behavior is to scan the changed files and generate matching test updates. The tool applies project-specific conventions to add or update tests, ensuring full coverage and validation of the new feature.