Borrowing it
Nothing to install: this file belongs to sirkirby/unifi-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/sirkirby/unifi-mcp/main/.agents/skills/test-pruning/SKILL.mdgit clone --depth 1 https://github.com/sirkirby/unifi-mcpWrote 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.
[](https://agentmods.dev/skills/sirkirby/unifi-mcp/test-pruning)<a href="https://agentmods.dev/skills/sirkirby/unifi-mcp/test-pruning"><img src="https://agentmods.dev/badge/skills/sirkirby/unifi-mcp/test-pruning/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.
<a href="https://agentmods.dev/skills/sirkirby/unifi-mcp/test-pruning"><img src="https://agentmods.dev/badge/skills/sirkirby/unifi-mcp/test-pruning.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00062 | $0.01145 |
| Opus 5.5 | $0.00025 | $0.00458 |
| Sonnet 5.5 | $0.00012 | $0.00229 |
| Haiku 4.5 | $0.00006 | $0.00114 |
Grade A, and why
test-pruning 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 3d 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.
How it starts
The opening of the file, as written. The whole thing — 88 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Test pruning
A pruning pass makes the suite smaller while every check still holds. The bar for what may go is
AGENTS.md → Test Assertions; this skill is how to apply it at scale. Scripts live in scripts/.
The trap is that coverage cannot see a weakened test: one that still runs the same code but would now pass a broken result. On the first pass, branch coverage stayed at zero loss while review found nine weakened tests. Every gate below exists to catch what coverage misses.
1. Baseline
Run scripts/cov_ctx.sh <worktree> <suite> <out>.coverage for every suite you will touch, on an
untouched worktree of the base commit. Suites: core shared relay network protect access api.
It records per-test branch coverage and unsets UNIFI_* first, since exported settings change
which tests collect.
Done when each suite you will touch has a baseline file named base.<suite>.coverage in one directory.
Keep the baseline of every other suite there too: step 2 reads them to decide ownership.
2. Candidates
python3 scripts/candidates.py <suite> <baseline-dir> <worktree> <out>.json [exclude.txt] lists
test functions whose coverage other tests already provide, with the kept tests that overlap each
most. It keeps every arc in the suite's own package, plus arcs in other packages that the owning
suite does not cover, which matches how CI measures coverage. Security, redaction, drift,
symmetry, contract, golden and incident-evidence tests are never candidates.
A candidate is only a lead. In the app suites, many managers now live in unifi_core, and the core
suite often runs that code without asserting it, so the app test is the only real check. Expect
to keep most app-suite candidates; folding copy-pasted tests saves more than deleting.
Done when each suite has a candidate file.
3. Review every candidate
For each candidate, open it and the kept tests it overlaps, and decide from the assertions:
- Delete only under the
AGENTS.mdbar: a kept test asserts the same thing on the same input. Record that kept test and its exact assertion. - Fold tests with the same body into one parametrized test, keeping each original's inputs and assertions. A fold that swaps in simpler data (one product for three, one value for two) has weakened the test.
- Keep everything else, with a one-line reason.
What ships with it
6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 3d ago First seen · 88 lines · 62 tokens per session scan A 306564aff4a4
test-pruning is a skill published in the GitHub repository sirkirby/unifi-mcp (955 stars, last pushed yesterday), licensed MIT. It adds 62 tokens to every session and 1,145 once invoked, about $0.0002 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-10-25.
Other skills, from other repositories
bat-story-eval
Compare MCP tool behavior between target and baseline versions using pre-built and custom stories with diff-based triage.
coding-agents-hooks-authoring
To author, register, and test Rosetta hooks, add a SemanticKind, or debug a hook that won't fire.
flutter-mcp-toolkit-control
Drive a running Flutter app — tap, scroll, type, fill forms, hot-reload, navigate. Use when you need to interact with the UI.
flutter-mcp-e2e-harness
Use this skill when writing or running repeatable E2E scenarios for Flutter apps as checked-in Dart with the fluttermcpharness package (packages/harness) — build/launch the app, attach to its VM service, drive widgets (snapshot/tap/enter text) and assert without MCP; also covers the repo showcase launcher (make…
harness-engineering-lifecycle
Design, implement, and integrate generalized validation harnesses across a producer-consumer boundary after a local harness contract exists. Use when refactoring custom validation CLIs/MCPs for large polyrepos, extending Steward across sibling repos, or deploying a local tool to a consumer project for dogfooding and…
flutter-mcp-toolkit-dogfood-iterations
Runs and records showcase/fluttertestapp dogfood iterations (toolqualityrubric, rundogfoodeval.sh, dogfoodwebeval.yaml). Use when scoring MCP/intentcall quality, appending iteration N, comparing regressions, or CI static/weekly eval gates.