skillZs
★ LIVE SKILL TAGS ★
>>> LIVE SKILLS INDEX <<<
* OPEN SOURCE *
NO LOGIN, NO TRACKING
※ REAL INSTALL DATA ※
← back to all skills
riffingonsoftware/agent-skills100 installs

prune-tests

Delete tests that do not uniquely protect a contract, shipped bug, or critical invariant. Use when asked whether tests meet the Keep bar.

How do I install this agent skill?

npx skills add https://github.com/riffingonsoftware/agent-skills --skill prune-tests
view source ↗

Is this agent skill safe to install?

  • Gen Agent Trust Hubpass

    The skill is a development utility for pruning redundant tests. It involves standard operations such as reading codebase history, executing existing test suites, and modifying files to consolidate or delete tests.

  • Socketpass

    No alerts

  • Snykpass

    Risk: LOW · No issues

What does this agent skill do?

Prune tests

Reduce test-suite cost without weakening meaningful protection.

Keep

Keep a test only when it uniquely protects:

  • A contract another repo, service, or user relies on.
  • A shipped bug that could recur.
  • A critical security, permissions, compatibility, concurrency, migration, protocol, or data-loss invariant, with one test per invariant, not one per branch that enforces it.

Also keep every test the repository's instructions require.

A contract sits at an API, CLI, protocol, workflow, or artifact boundary. A bug shipped if it reached the default branch or users. Tests that cover private mechanics, duplicate stronger coverage, enumerate equivalent cases, preserve dead behavior, test framework or type guarantees, restate the code as assertions, or depend on structure rather than behavior do not qualify. Coverage percentage is not a reason to keep a test.

Scope

Default to the whole suite. When a caller scopes the run to a diff, consider only tests the diff adds or changes and tests that cover code it changes or removes.

Workflow

  1. Run the in-scope tests and record their runtime. If any fail, stop and report the failures.
  2. Group every in-scope test by what it protects under Keep. Put tests that protect nothing in one group.
  3. Investigate each group whose protection is unclear. Search the history for the fix that added it, read the code it covers and that code's callers, and temporarily break the behavior it asserts to see whether another test also fails. Treat a bug as shipped only if the history shows it reached the default branch or users.
  4. Classify each group as keep, consolidate (merge into one test with the same protection), or delete. Delete a group when you cannot name what it uniquely protects. Finish when every group has a class.
  5. Apply the changes one group at a time; do not alter production behavior.
  6. Rerun the in-scope tests and every test that used a fixture you removed. Finish when they pass.

Report the tests, fixtures, and lines removed, the runtime saved, and the reason for each deletion and consolidation.

Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.

<a href="https://skillzs.dev/skills/riffingonsoftware/agent-skills/prune-tests">View prune-tests on skillZs</a>