ai-generated-ut-code-review

Score AI-generated unit test code for coverage and robustness.

31|6|Updated Jan 29, 2026
One-click install
npx skills add https://github.com/openharmonyinsight/openharmony-skills --skill ai-generated-ut-code-review
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ai-generated-ut-code-review
Source: https://github.com/openharmonyinsight/openharmony-skills/tree/main/skills/ai-generated-ut-code-review
Command: npx skills add https://github.com/openharmonyinsight/openharmony-skills --skill ai-generated-ut-code-review

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It prevents ineffective AI-generated unit tests from slipping into a codebase by systematically checking coverage, assertion validity, negative/edge cases, determinism, and maintainability so the review results are actionable.

Core Features & Use Cases

  • Quantified UT quality review: produces a 0-10 score with an explicit risk level to support consistent decision-making during CI/PR review.
  • Coverage-to-risk enforcement: treats overall line coverage below 80% as at least High risk and makes it a must-fix item.
  • Assertion and test robustness validation: identifies missing/weak assertions, absent negative cases, and flaky environment/time dependencies that undermine test reliability.

Quick Start

Ask an AI assistant to review the AI-generated unit test code for coverage, assertion effectiveness, negative cases, determinism, and maintainability, and return a score, risk level, and must-fix checklist with evidence.

Frequently Asked Questions about ai-generated-ut-code-review

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

FAQPage Schema
How do I review AI-generated unit test code for coverage and assertion quality?

To review AI-generated unit test code, evaluate coverage, assertion effectiveness, negative cases, and determinism to produce a numeric score with a risk level and an evidence-based must-fix checklist.

What is a good unit test coverage threshold for managing CI risk?

A unit test coverage threshold below 80% overall line coverage is treated as at least High risk, making it a mandatory must-fix item to prevent ineffective tests from entering the codebase.

How do I check if my unit tests have missing negative or edge cases?

To check for missing negative or edge cases, validate test robustness by identifying absent negative cases and weak assertions that undermine the reliability of the unit tests.

Why does my AI-generated unit test flake due to environment or time dependencies?

AI-generated unit tests flake because of fragile environment and time dependencies; validating test determinism identifies these issues to ensure robust and reliable test execution.

Can I score unit test quality during a pull request review?

Yes, you can score unit test quality during a pull request review by generating a 0-10 score with an explicit risk level to support consistent decision-making in CI/PR workflows.

What are the limitations of using automated risk scoring for unit tests?

Automated risk scoring for unit tests focuses on coverage, assertion validity, and determinism, meaning it must be paired with manual review for complex business logic that automated coverage metrics cannot fully evaluate.