code-quality_skill

This skill enforces code quality through coverage thresholds, mutation testing, linting, and formatting, helping you ship reliable, maintainable code faster.
  • C#

27

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill richertunes/brainarr --skill code-quality

  • SKILL.md2.3 KB

Overview

This skill enforces code quality standards, test coverage, mutation testing, static analysis, and formatting for C# projects. It automates quality gates in CI so builds and pull requests fail when coverage, mutation score, or analyzer rules regress. It focuses on measurable outcomes: higher coverage, more effective tests, and fewer code smells.

How this skill works

The skill integrates Coverlet for coverage collection and enforces minimum thresholds to fail builds on regression. It runs Stryker.NET for weekly mutation testing to surface weak tests and improve test effectiveness. Static analysis uses .NET analyzers, Roslyn rules, and optional CodeQL scans while .NET format and EditorConfig ensure consistent formatting. Quality gates and dashboards track trends and block PRs with quality violations.

When to use it

  • When you need to prevent coverage regressions or enforce minimum coverage thresholds
  • When you want to validate test quality using mutation testing
  • When static analysis or security scanning must be automated in CI
  • When code formatting and EditorConfig enforcement are required
  • When creating quality gates to block PRs or fail builds on regressions

Best practices

  • Set realistic incremental coverage targets (e.g., raise from 31% to 50% over time) and enforce them in CI
  • Run Stryker.NET regularly and prioritize fixing surviving mutants to strengthen tests
  • Treat analyzer warnings as build failures for new code; fix legacy issues incrementally
  • Enforce .NET format in pre-commit hooks and CI to avoid style churn
  • Create dashboards that visualize coverage, mutation score, complexity, and trend lines to guide engineering decisions

Example use cases

  • Fail CI builds when coverage drops below the baseline and block merges until fixed
  • Schedule weekly Stryker.NET runs, review mutation reports, and harden tests that allow surviving mutants
  • Add .NET analyzer rules to CI to detect security or maintainability issues early
  • Enforce .NET format and EditorConfig in pre-commit hooks so all commits adhere to style rules
  • Build a quality dashboard (CodeCov, SonarCloud or custom) to monitor coverage, mutation score, and complexity over time

FAQ

Start with your current baseline and increase gradually; for example, move from 31% to 50% in staged targets to avoid large churn.

How does mutation testing fit with coverage?

Coverage measures executed code paths; mutation testing measures how well tests detect defects. Use both: coverage to find gaps, mutation testing to improve test effectiveness.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational