grade-tests

Grades a curated list of test methods and produces a PR-ready table with A-F grades and notes.

5.3k|403|Updated Feb 3, 2026
One-click install
npx skills add https://github.com/dotnet/skills --skill grade-tests
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: grade-tests
Source: https://github.com/dotnet/skills/tree/main/plugins/dotnet-test/skills/grade-tests
Command: npx skills add https://github.com/dotnet/skills --skill grade-tests

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Reviewers of pull requests need a quick, per-test verdict on the quality of newly added or modified tests, but full suite-wide audit reports are too long to consume as a PR comment. This Skill grades each specified test method individually and outputs a compact table with a letter grade, score band, and one-line justification.

Core Features & Use Cases

  • Per-Test Grading: Scores each test on assertion strength, structure and focus, and anti-pattern hygiene, then combines them into a capped A-F letter grade with a score band.
  • Polyglot Support: Handles .NET, Python, TypeScript/JavaScript, Java, Go, Ruby, Rust, Swift, Kotlin, PowerShell, and C++ by loading language-specific extension guidance before scoring.
  • PR-Ready Output: Produces a summary plus a per-test Markdown table capped at 50 rows, with worst tests surfaced first and overflow collapsed into details blocks.
  • Use Case: A PR automation workflow passes the tests changed in a pull request and posts a comment table showing each test's grade, band, and a one-line note so reviewers can triage follow-up improvements.

Quick Start

Grade the test methods in OrderTests.cs and produce a per-test grade table for my pull request comment.

Frequently Asked Questions about grade-tests

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

FAQPage Schema
How do I grade the tests changed in a pull request?

Provide the skill with the diff hunk, PR identifier, or an explicit list of fully qualified test method names from the pull request. It grades each test on assertion strength, structure, and anti-patterns, then outputs a Markdown table suitable for posting as a PR comment.

What test frameworks and languages does per-test grading support?

It supports .NET (MSTest, xUnit, NUnit, TUnit), Python (pytest), TypeScript/JavaScript (Jest, Vitest), Java, Go, Ruby, Rust, Swift, Kotlin, PowerShell, and C++. Language-specific extension files define the assertion APIs and idiomatic patterns used during scoring.

Can I grade my entire test suite at once?

No, this skill only grades a curated, explicitly provided list of tests and rejects ambiguous requests like grading the whole workspace. For full suite audits, use the test-quality-auditor agent or the test-anti-patterns skill instead.

How is the overall test grade calculated?

Three sub-grades (assertion strength, structure and focus, anti-pattern hygiene) are weighted 0.45, 0.25, and 0.30 into a numeric average mapped to A-F bands. The overall grade is capped at the worst sub-grade, so any F dimension forces an overall F.

Why did my exception-only test get a low grade?

It should not: exception and error-path tests using constructs like Assert.ThrowsException or pytest.raises are treated as complete on their own and earn an A for assertion strength when they check the promised error condition. Deductions only apply for observable issues like broad exception types or swallowed exceptions.