exp-test-maintainability
Detects duplicate boilerplate, copy-paste tests, and structural maintainability issues across .NET test suites. Use when the user asks to reduce repetition, consolidate similar test methods, convert copy-paste tests to data-driven parameterized tests, suggest a better test structure, or identify refactoring opportunities. Identifies repeated construction, assertion patterns, copy-paste methods convertible to DataRow/Theory/TestCase, redundant setup/teardown, and shared infrastructure. Produces an analysis report with concrete before/after suggestions. Works with MSTest, xUnit, NUnit, and TUnit
npx skills add dotnet/skills --skill exp-test-maintainability --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Test Maintainability Assessment Analyze .NET test code for maintainability issues: duplicated boilerplate, copy-paste test methods, and structural repetition across test methods and classes. Produce a report of refactoring opportunities with concrete before/after suggestions. The goal is analysis only — do not modify any files. ## When to Use - User asks to find duplicated code or boilerplate in tests - User wants to know where test code can be DRY-ed up - User asks to reduce test duplication, improve test readability, or clean up test boilerplate - User asks for refactoring opportunities in a test suite - User wants to identify shared setup or teardown candidates - User asks "what patterns repeat across my tests?" - User wants to centralize test data, introduce builders or helpers ## When Not to Use - User wants to write new tests from scratch (use `writing-mstest-tests`) - User wants to detect anti-patterns or code smells (use `test-anti-patterns`) - User wants to actually perform the refactoring (help them directly, this skill only analyzes) ## Inputs | Input | Required | Description | |-------|----------|-------------| | Test code | Yes | One or more test files or a test proj
- When to Use
- When Not to Use
- Inputs
- Workflow
- Step 1: Gather the test code
- Step 2: Identify maintainability issues
- Step 3: Apply calibration rules
- Step 4: Report findings
- Validation
- Common Pitfalls
What does the exp-test-maintainability skill do?
Detects duplicate boilerplate, copy-paste tests, and structural maintainability issues across .NET test suites. Use when the user asks to reduce repetition, consolidate similar test methods, convert copy-paste tests to data-driven parameterized tests, suggest a better test structure, or identify refactoring opportunities. Identifies repeated construction, assertion patterns, copy-paste methods convertible to DataRow/Theory/TestCase, redundant setup/teardown, and shared infrastructure. Produces an analysis report with concrete before/after suggestions. Works with MSTest, xUnit, NUnit, and TUnit
How do I install it?
Run `npx skills add dotnet/skills --skill exp-test-maintainability --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From dotnet/skills, a repository with 4,927 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
