home / skills / leavesfly / jimi / code-quality-suite

This skill combines code-review and unit-testing guidance to improve code quality and test coverage before major changes.

npx playbooks add skill leavesfly/jimi --skill code-quality-suite

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
1.3 KB
---
name: code-quality-suite
description: 代码质量综合技能包(代码审查 + 单元测试)
version: 1.0.0
category: development
triggers:
  - code quality suite
  - 代码质量整套
  - 代码审查和单元测试
  - 审查与测试
dependencies:
  - code-review
  - unit-testing
---

# 代码质量综合技能包

当你需要同时关注 **代码审查质量** 和 **单元测试质量** 时,启用本技能包。

本技能包会自动组合以下已有技能:

1. `code-review`:代码审查最佳实践清单
2. `unit-testing`:单元测试编写与覆盖率提升指南

## 使用建议

- 在提交重要改动前,请按照以下顺序进行自检:
  1. 按 `code-review` 清单检查代码设计、可维护性与潜在缺陷;
  2. 按 `unit-testing` 指南补齐关键路径、边界条件与异常场景的单测;
- 输出建议采用结构化格式,将“审查结果”和“测试说明”分别列出,以便后续追踪。

## 助手行为期望

当本技能包被激活时,助手应:

- 先根据 `code-review` 给出针对代码质量的审查建议;
- 再根据 `unit-testing` 给出单元测试补充与改进建议;
- 在回答中明确区分:
  - 代码层面的修改建议;
  - 测试层面的补充与修正建议。

Overview

This skill combines code review best practices with unit testing guidance to improve Java code quality across design, maintainability, and test coverage. It runs the two capabilities in sequence so you get a clear set of actionable code-level fixes followed by concrete unit-test additions and improvements. The output is structured so teams can track review findings and testing tasks separately.

How this skill works

When enabled, the skill first inspects code for design issues, readability, potential bugs, API contracts, and maintainability using the code-review checklist. It then analyzes logic paths and test surface to recommend unit tests for happy paths, edge cases, and exception handling, plus suggestions to raise coverage. Responses separate code-change recommendations from test-case recommendations for easy triage.

When to use it

  • Before merging significant feature or refactor pull requests
  • When preparing code for release to reduce regressions
  • During sprint code quality gates to enforce standards
  • When coverage goals are unmet or tests are flaky
  • For onboarding PRs from new contributors to ensure maintainability

Best practices

  • Run the code-review checklist first, then apply unit-testing recommendations in a follow-up commit
  • Provide structured output: list ‘Review Findings’ and ‘Test Actions’ separately for tracking
  • Prioritize fixes that eliminate correctness and security risks before stylistic changes
  • Focus unit tests on public behavior and critical edge cases rather than implementation details
  • Use small, focused test commits and include constructive commit messages referencing review items

Example use cases

  • A feature PR changing business logic: get both design issues and missing path tests identified
  • A refactor that touches core services: confirm API stability and add regression tests for boundary conditions
  • A module with low coverage: receive prioritized test cases to hit untested branches and exceptions
  • A pull request with many TODOs: obtain actionable code fixes and matching unit tests to validate changes
  • CI quality gate: produce structured findings the CI can fail fast on until key fixes and tests are implemented

FAQ

How are suggestions prioritized?

Security and correctness issues receive highest priority, followed by maintainability and then stylistic improvements.

Will this change tests automatically?

No. The skill provides specific test case recommendations and example assertions; you or your CI tool implement them.