grade-tests

Grades a curated list of test methods and outputs a per-test letter-grade table for PR comments.

Updated Jul 12, 2026
One-click install
npx skills add https://github.com/Patrick-Rex/DotNetTechSamples --skill grade-tests-patrick-rex
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: grade-tests
Source: https://github.com/Patrick-Rex/DotNetTechSamples/tree/main/.agents/plugins/dotnet-test/skills/grade-tests
Command: npx skills add https://github.com/Patrick-Rex/DotNetTechSamples --skill grade-tests-patrick-rex

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Reviewers of a pull request need a quick, per-test verdict on the tests that PR adds or changes, but full suite-audit reports are too long to post as a PR comment. This Skill grades each specified test method individually and produces a compact table mapping every test to a letter grade (A–F), a score band, and a one-line note. ## Core Features & Use Cases - Per-test grading rubric: Scores each test on three sub-dimensions (assertion strength, structure & focus, anti-pattern hygiene) and combines them into a capped overall letter grade with a score band. - Polyglot support: Works with .NET (MSTest/xUnit/NUnit/TUnit), Python, TypeScript/JavaScript, Java, Go, Ruby, Rust, Swift, Kotlin, PowerShell, and C++, loading language-specific assertion conventions via the test-analysis-extensions skill. - PR-comment-ready output: Produces a short summary plus a markdown table (capped at 50 rows with collapsed overflow), optionally marking tests as (new) or (modified) when diff context is provided. - Use Case: A CI workflow lists the test methods changed in a pull request; the Skill grades each one and posts a table like OrderTests.CalculateTotal_EmptyCart_ReturnsZero | B | 80–89 | Good assertions, mildly long body as a PR comment. ## Quick Start Grade the test methods in OrderTests.cs and produce a per-test grade table I can post as a PR 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 list of changed test methods, file paths, or the PR diff, and it grades each test on assertion strength, structure, and anti-pattern hygiene. The output is a markdown table with letter grades, score bands, and one-line notes ready to post as a PR comment.

What test frameworks does per-test grading support?

Grading supports MSTest, xUnit, NUnit, and TUnit for .NET, plus pytest, Jest/Vitest, Go testing, JUnit-style Java, Ruby, Rust, Swift, Kotlin, PowerShell, and C++ frameworks. Language-specific assertion conventions are loaded from extension files before scoring.

Can I grade every test in my workspace at once?

No, the Skill rejects ambiguous requests without an explicit scope and asks for a method list, file paths, or a diff. For full-suite audits, use a test-quality-auditor agent or a test-anti-patterns skill instead.

How is the overall letter grade for a test calculated?

Each test starts at A and receives deductions only for observable issues across three sub-grades: assertion strength (45%), anti-pattern hygiene (30%), and structure (25%). The weighted average maps to a letter grade, capped at the worst sub-grade, and is reported as a score band rather than a precise number.

Why did my test get a low grade for its assertions?

Grades drop for tests with no assertions, always-true literal assertions like Assert.IsTrue(true), self-referential assertions, or un-awaited async assertions. Tests with only trivial checks such as a lone IsNotNull also score lower than tests verifying meaningful values or exceptions.

When should I not use per-test grading?

Avoid it for full suite audits, writing new tests, fixing failing tests, or measuring code coverage. Those tasks belong to suite-audit skills, test-generation agents, editing skills, or coverage-analysis tools respectively.