improve-ut

GitHub

分析代码变更,依据前后端质量规范补充或更新测试用例。自动判断测试范围,遵循项目模式编写测试并执行验证,最后输出覆盖率计划、更新详情及遗留问题摘要,确保代码变更后的测试完整性。

.agents/skills/improve-ut/SKILL.md zhukunpenglinyutong/desktop-cc-gui

Trigger Scenarios

实现新功能后 修复 Bug 后 识别到测试缺口时 需要提升测试覆盖率时

Install

npx skills add zhukunpenglinyutong/desktop-cc-gui --skill improve-ut -g -y
More Options

Non-standard path

npx skills add https://github.com/zhukunpenglinyutong/desktop-cc-gui/tree/main/.agents/skills/improve-ut -g -y

Use without installing

npx skills use zhukunpenglinyutong/desktop-cc-gui@improve-ut

指定 Agent (Claude Code)

npx skills add zhukunpenglinyutong/desktop-cc-gui --skill improve-ut -a claude-code -g -y

安装 repo 全部 skill

npx skills add zhukunpenglinyutong/desktop-cc-gui --all -g -y

预览 repo 内 skill

npx skills add zhukunpenglinyutong/desktop-cc-gui --list

SKILL.md

Frontmatter
{
    "name": "improve-ut",
    "description": "Analyzes changed files and improves test coverage using current frontend\/backend quality guidelines and colocated project test patterns. Determines test scope (unit vs integration vs regression), adds or updates tests, and runs validation. Use when code changes need test coverage, after implementing a feature, after fixing a bug, or when test gaps are identified."
}

Improve Unit Tests (UT)

Use this skill to improve test coverage after code changes.

Usage

$improve-ut

Source of Truth

Discover the available package spec layers dynamically:

# Discover available packages and their spec layers
python3 ./.trellis/scripts/get_context.py --mode packages

This repository currently has frontend, backend, and guides layers rather than a dedicated unit-test/ layer. Read:

  • .trellis/spec/frontend/quality-guidelines.md for Vitest/frontend changes
  • .trellis/spec/backend/quality-guidelines.md for Rust/backend changes
  • existing colocated *.test.ts, *.test.tsx, and Rust module tests in the touched domain

If a package later introduces a dedicated test-spec layer, that package-local spec wins.


Execution Flow

  1. Inspect changed files:
    • git diff --name-only
  2. Decide test scope using the applicable quality spec and nearby test patterns:
    • unit vs integration vs regression
    • mock vs real filesystem flow
  3. Add/update tests using existing project test patterns
  4. Run validation:
npm run lint
npm run typecheck
npm run test
  1. Summarize decisions, updates, and remaining test gaps.

Output Format

## UT Coverage Plan
- Changed areas: ...
- Test scope (unit/integration/regression): ...

## Test Updates
- Added: ...
- Updated: ...

## Validation
- npm run lint: pass/fail
- npm run typecheck: pass/fail
- npm run test: pass/fail

## Gaps / Follow-ups
- <none or explicit rationale>

Version History

  • cb4962a Current 2026-07-24 22:05

Same Skill Collection

.agents/skills/before-dev/SKILL.md
.agents/skills/brainstorm/SKILL.md
.agents/skills/break-loop/SKILL.md
.agents/skills/check-cross-layer/SKILL.md
.agents/skills/check/SKILL.md
.agents/skills/create-command/SKILL.md
.agents/skills/deploy-to-vercel/SKILL.md
.agents/skills/finish-work/SKILL.md
.agents/skills/integrate-skill/SKILL.md
.agents/skills/onboard/SKILL.md
.agents/skills/record-session/SKILL.md
.agents/skills/start/SKILL.md
.agents/skills/update-spec/SKILL.md
.agents/skills/vercel-cli-with-tokens/SKILL.md
.agents/skills/vercel-composition-patterns/SKILL.md
.agents/skills/vercel-react-best-practices/SKILL.md
.agents/skills/vercel-react-native-skills/SKILL.md
.agents/skills/web-design-guidelines/SKILL.md
.agents/skills/writing-guidelines/SKILL.md
.codex/skills/parallel/SKILL.md
.agents/skills/coss/SKILL.md
.agents/skills/huashu-design/SKILL.md
.agents/skills/vercel-optimize/SKILL.md
.agents/skills/vercel-react-view-transitions/SKILL.md

Metadata

Files
0
Version
cb4962a
Hash
c7b8ad57
Indexed
2026-07-24 22:05

inicio - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-20 01:53
浙ICP备14020137号-1 $mapa de visitantes$