Agent Skills
› zhukunpenglinyutong/desktop-cc-gui
› improve-ut
improve-ut
GitHub分析代码变更,依据前后端质量规范补充或更新测试用例。自动判断测试范围,遵循项目模式编写测试并执行验证,最后输出覆盖率计划、更新详情及遗留问题摘要,确保代码变更后的测试完整性。
Trigger Scenarios
实现新功能后
修复 Bug 后
识别到测试缺口时
需要提升测试覆盖率时
Install
npx skills add zhukunpenglinyutong/desktop-cc-gui --skill improve-ut -g -y
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.mdfor Vitest/frontend changes.trellis/spec/backend/quality-guidelines.mdfor 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
- Inspect changed files:
git diff --name-only
- Decide test scope using the applicable quality spec and nearby test patterns:
- unit vs integration vs regression
- mock vs real filesystem flow
- Add/update tests using existing project test patterns
- Run validation:
npm run lint
npm run typecheck
npm run test
- 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


