Install
$ agentstack add skill-zacharygcook-agent-skills-expand-test-coverage ✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
About
Expand Test Coverage
Add tests that increase confidence in reachable behavior, not just coverage percentages.
Establish Scope
- Prefer the user-named files, PR, branch, or commit.
- Otherwise inspect
git status,git diff, andgit diff --cached. - If the tree is clean, inspect the latest relevant commit.
- 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
- Write a small coherent batch.
- Run the narrowest relevant test command immediately.
- Diagnose every failure before editing.
- Fix production code when the test reveals a real defect; fix the test when its premise or setup is wrong.
- Repeat until the planned behavior passes.
- 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.
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: zacharygcook
- Source: zacharygcook/agent-skills
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.