unifi-mcp: Skill for Claude Code

.agents/skills/test-pruning/SKILL.md

test-pruning is a skill for Claude Code, Codex from sirkirby/unifi-mcp. It costs 62 tokens per session (1,145 once invoked), scanned A, original, MIT.

A procedure for removing or combining duplicate tests while preserving the checks they provide. It uses coverage measurements and review rules to detect tests that were weakened rather than safely simplified.

In plain words
What is it for?
It is for pruning, deduplicating, or reviewing changes to a test suite, including replacing repeated cases with parameterized tests.
Why use it?
It reduces an oversized test suite without relying on coverage alone, which can miss tests that still run but no longer catch broken results.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents); mentions AGENTS.md.

This is sirkirby/unifi-mcp's own configuration. It tells Claude Code and Codex how to work on unifi-mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything unifi-mcp configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/sirkirby/unifi-mcp/main/.agents/skills/test-pruning/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/sirkirby/unifi-mcp

Made for: Claude Code, Codex.

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 test-pruning

README.md
[![agentmods](https://agentmods.dev/badge/skills/sirkirby/unifi-mcp/test-pruning/github.svg)](https://agentmods.dev/skills/sirkirby/unifi-mcp/test-pruning)
Your own site
<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.

agentmods 80×15 button for test-pruning

Your own site · 80×15
<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>
Per session 62 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,145 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.00062 $0.01145
Opus 5.5 $0.00025 $0.00458
Sonnet 5.5 $0.00012 $0.00229
Haiku 4.5 $0.00006 $0.00114

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

Security

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.

The scan reads SKILL.md. This mod also ships 6 executable files (scripts/arcdiff.py, scripts/candidates.py, scripts/cov_ctx.sh, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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/test-pruning/SKILL.md · 88 lines

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.md bar: 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.

Read the full file on GitHub · 88 lines

Files

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.

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. 3d ago First seen · 88 lines · 62 tokens per session scan A 306564aff4a4

Subscribe to this mod's changes

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.

Related

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.

homeassistant-ai/ha-mcp · 26 tokens

coding-agents-hooks-authoring

To author, register, and test Rosetta hooks, add a SemanticKind, or debug a hook that won't fire.

griddynamics/rosetta · 31 tokens

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.

Arenukvern/mcp_flutter · 38 tokens

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…

Arenukvern/mcp_flutter · 117 tokens

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…

Arenukvern/mcp_flutter · 88 tokens

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.

Arenukvern/mcp_flutter · 67 tokens