pruning-tests

pruning-tests is a skill for Claude Code from dork-labs/dorkos. It costs 107 tokens per session (1,676 once invoked), scanned A, original, MIT.

A test-cleanup procedure for finding and removing tests that duplicate coverage, only check mocks or constants, or are slow or unreliable. TDD means test-driven development, where tests help guide implementation; this add-on focuses on keeping the resulting test set useful.

In plain words
What is it for?
Use it to review one package's tests, remove or combine low-value cases, and update that package's test budget. It works from a separate Git worktree, an isolated copy of the repository, and verifies the package still builds and remains covered.
Why use it?
It reduces a growing test suite that takes time to run but catches little, while checking that important safeguards remain. It also helps avoid repeated browser tests when a faster unit test already covers the same behavior.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: installed under .agents/ (shared by several agents).

Part of the flow plugin — 44 skills, 45 commands, 5 agents, 4 hooks, 1 plugin shipped together

Good fit Use it to review one package's tests, remove or combine low-value cases, and update that package's test budget. It works from a separate Git worktree, an isolated copy of the repository, and verifies the package still builds and remains covered.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/dork-labs/dorkos/pruning-tests
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add dork-labs/dorkos --skill pruning-tests
Clone the repo
git clone --depth 1 https://github.com/dork-labs/dorkos

Made for: Claude Code.

Or install flow, the plugin that ships this one along with the rest of its 44 skills, 45 commands, 5 agents, 4 hooks, 1 plugin.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for pruning-tests

README.md
[![agentmods](https://agentmods.dev/badge/skills/dork-labs/dorkos/pruning-tests/github.svg)](https://agentmods.dev/skills/dork-labs/dorkos/pruning-tests)
Your own site
<a href="https://agentmods.dev/skills/dork-labs/dorkos/pruning-tests"><img src="https://agentmods.dev/badge/skills/dork-labs/dorkos/pruning-tests/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for pruning-tests

Your own site · 80×15
<a href="https://agentmods.dev/skills/dork-labs/dorkos/pruning-tests"><img src="https://agentmods.dev/badge/skills/dork-labs/dorkos/pruning-tests.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 107 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,676 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00107 $0.01676
Opus 5.5 $0.00043 $0.00670
Sonnet 5.5 $0.00021 $0.00335
Haiku 4.5 $0.00011 $0.00168

Measured 4d ago against content hash 834e51238c12, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

pruning-tests scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/pruning-tests/SKILL.md · 55 lines

How it starts

The opening of the file, as written. The whole thing — 55 lines — stays where its author put it; the contents beside it link to each section on GitHub.

pruning-tests

Agents write tests faster than anyone reads them, and nothing else in the repo pushes the count down. This skill is the push. One run picks one package, deletes or collapses the tests that fail the four keep-questions, proves nothing real lost its guard, and tightens that package's test budget.

The rubric is .claude/rules/testing.md, "Is this test worth keeping?". Read it before step 3. This file is the procedure around it.

Run

  1. Work in a throwaway worktree, never a shared checkout. git fetch origin, run git rev-parse origin/main, keep the SHA it prints and use it for the whole run. Clear a copy a killed run left (git worktree remove --force "$TMPDIR/pruning-tests" 2>/dev/null; git worktree prune), then git worktree add -b chore/prune-tests-<date> "$TMPDIR/pruning-tests" <sha>. Install there and build what the package imports (pnpm install --frozen-lockfile --prefer-offline, then npx turbo build --filter='<package>^...'), both through the load gate (pnpm heavy) on Node 24. Put Node 24 on PATH for the whole run (export PATH="$HOME/.nvm/versions/node/v24.19.0/bin:$PATH"): the git hooks fail without it. Under the disk floor in contributing/ci.md, stop and report "skipped: disk".

  2. Pick one package. pnpm check:test-ratio -- --report prints every package's lines of test per line of source. Take the package furthest above 1.0 (apps/e2e and apps/space are not measured; prune them when their specs are the slowest or flakiest). If none is above 1.0, take the one with the most test time in scripts/sharding/durations.json (milliseconds per test file). Skip a package another open PR is pruning (gh pr list --search "chore(tests): prune in:title").

  3. Run the package green first. From the package's own directory, npx vitest run on the area you will prune. Anything already red is not yours to judge: note it and leave it. Every later run in this skill is from the package directory too.

  4. Find candidates, cheapest signal first. Aim for at most 30 files per run so one person can review it.

    • Slow: the package's files in scripts/sharding/durations.json, slowest first.
    • Flaky: pnpm ci:flaky and the quarantine lane (pnpm ci:quarantine list).
    • Shape: files that vi.mock our own modules (pnpm check:own-mocks counts them), files with many near-identical it( blocks, toMatchSnapshot, tests of constants, types or barrels.
    • Overlap: several files testing the same module at different layers, or a browser spec whose steps a component or route test already asserts.

Read the full file on GitHub · 55 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago Changed 834e51238c12
  2. 6d ago First seen · 55 lines · 107 tokens per session scan A e00a75af0a0f

Subscribe to this mod's changes

pruning-tests is a skill published in the GitHub repository dork-labs/dorkos (11 stars, last pushed today), licensed MIT. It adds 107 tokens to every session and 1,676 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-25.

Related

pruning-tests compared with skills from other repositories

pruning-tests next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
pruning-testsdork-labs/dorkosSkill11todayMITA107Claude Code
github-flow-for-claude-on-webshabaraba/vibing.nvimSkill135d agoMITA71Claude Code
stacked-pr-mergeshabaraba/vibing.nvimSkill135d agoMITA112Claude Code
vibing-worktree-createshabaraba/vibing.nvimSkill135d agoMITA67Claude Code
vibing-worktree-attachshabaraba/vibing.nvimSkill135d agoMITA77Claude Code
vibing-worktree-finishshabaraba/vibing.nvimSkill135d agoMITA67Claude Code
vibing-worktree-listshabaraba/vibing.nvimSkill135d agoMITA62Claude Code