agentleFS
LeanMeanCleanAppsLeanMeanCleanApps/CleanModelContextProtocol/.agents/skills/coverage/SKILL.md

coverage

Skill1 starsChanged 6 days agoMITView on GitHub

The 95% line coverage gate - what counts, what is excluded and why, and how to measure it locally the same way the pipeline does. Use when coverage fails, when adding code that is hard to test, or before opening a pull request.

28 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use scan, lint and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • rajnavakotiSkill

    scan

    Run the AI dashboard scanner and generate the HTML report.

    Also in 4 projects that use this

  • Microsoft AzureSkill

    lint

    Run all linting and spell checking for TypeScript and Rust code. Run this before committing to catch style issues, clippy warnings, and misspellings.

    Also in 4 projects that use this

  • julienamorganSkill

    profile

    Researches the user's market, competitors, and competitive positioning to build a complete ICP profile. Shows findings for user approval before proceeding. Triggers: /profile, "research my market", "who are my competitors". Reads: ./gtm/company.md, ./gtm/icp.md. Writes: updates ./gtm/icp.md with competitive positioning. Standalone: yes (asks for domain if company.md missing).

    Also in 3 projects that use this

  • asterkinSkill

    adr

    Create Architecture Decision Records (ADRs) following project standards. Guides template usage, process, and best practices for documenting architecturally significant decisions.

    Also in 4 projects that use this

  • anombyte93Skill

    discover

    Phase 1 of the prd-taskmaster pipeline: brainstorm-driven discovery. Delegates to superpowers:brainstorming in Interactive Mode (one adaptive question at a time), or self-brainstorms in Autonomous Mode when no user is present. Intercepts before the brainstorming chain hands off to writing-plans — this skill owns the exit. Extracts constraints, calibrates scale (Solo / Team / Enterprise), and advances the pipeline to GENERATE.

    Also in 3 projects that use this

  • MicrosoftSkill

    worktree

    Create, reuse or clean up a dedicated git worktree for working on a pull request or a private branch. Use from any PR-scoped workflow that needs an isolated checkout to keep current code and build output untouched.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 25 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use [ExcludeFromCodeCoverage] only for wiring and plain data classes, never for code with decisions in it.

    line 37
  2. Very specific:

    Add [ExcludeFromCodeCoverage] to a handler, validator, repository, endpoint or mapper.

    line 42
  3. Distinctive:

    Write tests that execute lines without asserting anything.

    line 43

“Common” is measured: kept by at least 6 in 10 of the 25 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Coverage

The rule

Total line coverage across every test project, merged into one report, must be at least 95%. The pipeline fails below that, and nobody lowers the number. Coverage comes from Coverlet (coverlet.msbuild).

Excluded on purpose, and only these:

ExcludedHowWhy
Program.csExcludeByFileStartup glue, exercised by integration tests but not meaningfully measurable
Migrations/*.csExcludeByFileGenerated by EF Core
obj/** and [GeneratedCode]ExcludeByFile, ExcludeByAttributeSource generators (Mediator, Mapperly, JSON)
Wiring and plain models[ExcludeFromCodeCoverage] on the classDependency registration (DependencyInjection), startup extensions, database models with no logic

Steps

  1. Measure locally with the same settings as the pipeline (run from the repository root):

    dotnet test -m:1 \
      -p:CollectCoverage=true -p:CoverletOutput=../results/ -p:MergeWith="../results/coverage.json" \
      -p:CoverletOutputFormat=opencover%2cjson \
      -p:ExcludeByFile="**/Program.cs%2c**/Migrations/*.cs%2c**/obj/**/*.cs" \
      -p:ExcludeByAttribute="GeneratedCodeAttribute"

    The last table printed shows the merged total.

  2. Uncovered lines? Write a test for the behaviour (unit-tests, integration-tests). Branches that can't happen usually mean the code can be simpler.
  3. Use [ExcludeFromCodeCoverage] only for wiring and plain data classes, never for code with decisions in it.

Don't

  • Lower the threshold, or add a file pattern to the exclusions to get green.
  • Add [ExcludeFromCodeCoverage] to a handler, validator, repository, endpoint or mapper.
  • Write tests that execute lines without asserting anything.

Check

The command in step 1, or push and read the Test row of the pipeline's Summary comment.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.