agentsclimarketplace

Expand test coverage

Skill zacharygcook/agent-skills/skills/expand-test-coverage

A curated collection of practical, evidence-backed skills for coding agents.

Install
npx -y skills add zacharygcook/agent-skills --skill expand-test-coverage

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • 26 days oldThe repository was created 26 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
  • 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Add meaningful tests for changed or recently committed code, run focused and full suites, and fix real implementation defects exposed by those tests. Use when asked to add tests, improve coverage, test new code, or make sure a change is well tested.

SKILL.md

2.3 KB, as published. Nobody here has run it

Expand Test Coverage

Add tests that increase confidence in reachable behavior, not just coverage percentages.

Establish Scope

  1. Prefer the user-named files, PR, branch, or commit.
  2. Otherwise inspect git status, git diff, and git diff --cached.
  3. If the tree is clean, inspect the latest relevant commit.
  4. Read each changed file in full plus adjacent contracts and existing tests.

Before writing tests, identify the public behavior, critical invariants, error paths, state transitions, integration boundaries, and realistic edge cases. Follow the repository's existing framework, fixtures, naming, and command conventions.

Select Valuable Cases

Prioritize:

  • critical happy paths and business invariants;
  • realistic validation, authorization, not-found, and provider failures;
  • boundary values and malformed external data;
  • important state transitions and retry/idempotency behavior;
  • regression cases for confirmed bugs;
  • integration behavior where mocks would hide the risk.

Avoid tests that only restate implementation details, assert framework behavior, exercise unreachable branches, or preserve dead code. If a branch has no production path, simplify or delete it instead of inventing a test.

Iterate

  1. Write a small coherent batch.
  2. Run the narrowest relevant test command immediately.
  3. Diagnose every failure before editing.
  4. Fix production code when the test reveals a real defect; fix the test when its premise or setup is wrong.
  5. Repeat until the planned behavior passes.
  6. Run the broader affected suite, then the full suite when proportionate and practical.

Never weaken an assertion, over-mock a boundary, or change expected behavior merely to turn the suite green. When intent is ambiguous, use docs, call sites, and existing tests as evidence and report the uncertainty.

Handoff

Report:

  • behavior covered and tests added;
  • implementation bugs found and fixed;
  • focused and full commands run with results;
  • anything not run and why;
  • remaining meaningful gaps, not raw uncovered-line counts.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.