exp-test-maintainability

Detects duplicate boilerplate and copy-paste patterns across .NET test suites.

1|Updated Jun 1, 2026
One-click install
npx skills add https://github.com/D1ssolve/craft-agents --skill exp-test-maintainability-d1ssolve
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: exp-test-maintainability
Source: https://github.com/D1ssolve/craft-agents/tree/main/skills/exp-test-maintainability
Command: npx skills add https://github.com/D1ssolve/craft-agents --skill exp-test-maintainability-d1ssolve

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? .NET test suites accumulate duplicated setup code, copy-paste test methods, and repeated assertion patterns over time, making them hard to maintain and extend. This Skill analyzes test code to identify these structural maintainability issues and produces a report with concrete before/after refactoring suggestions. ## Core Features & Use Cases - Duplication Detection: Identifies repeated object construction, assertion patterns, and copy-paste test methods across MSTest, xUnit, NUnit, and TUnit suites. - Parameterized Test Conversion: Suggests converting near-identical test methods into DataRow, Theory, or TestCase data-driven tests. - Calibrated Reporting: Applies a 3+ occurrence threshold and filters out intentional verbosity, so only meaningful refactoring opportunities are reported with priority rankings and trade-offs. - Use Case: Point the Skill at a test project where dozens of tests each construct the same fakes and mocks; it returns a report showing which setups to extract into factory methods and which tests to collapse into parameterized cases. ## Quick Start Analyze the test files in my project for duplicated boilerplate and copy-paste test methods, then report refactoring opportunities with before and after examples.

Frequently Asked Questions about exp-test-maintainability

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

FAQPage Schema
How do I find duplicated code in my .NET test suite?

Provide the test files or project directory and the Skill scans for five categories: repeated object construction, repeated assertion patterns, copy-paste test methods, duplicated setup/teardown, and shared test infrastructure. It reports each finding with locations and before/after refactoring examples.

How to convert copy-paste tests to parameterized tests in MSTest or xUnit?

The Skill identifies test methods with near-identical bodies differing only in input values and suggests converting them to DataRow, InlineData, or TestCase attributes. It recommends DataRow with DisplayName for compile-time constants and DynamicData or MemberData for complex computed values.

Does this work with NUnit and TUnit test frameworks?

Yes, the analysis supports MSTest, xUnit, NUnit, and TUnit. Framework-specific markers are used to locate test files, and refactoring suggestions use the appropriate parameterized test attributes for each framework.

Will it modify or refactor my test files automatically?

No, the Skill is analysis-only and never modifies files. It produces a report with concrete before/after code examples, priority rankings, and trade-offs so you can decide which refactorings to apply yourself.

When should I not use test maintainability analysis?

Do not use it to write new tests from scratch, detect general test anti-patterns, or audit mock usage in depth. It also intentionally ignores duplication appearing fewer than three times and simple constructors, since those are often valid intentional clarity.