test-pruning
Skill1.1k starsChanged 8 days agoMITView on GitHub
Remove, fold or consolidate redundant tests in unifi-mcp without losing a check. Use when asked to trim, prune, shrink or deduplicate the test suite, to fold copy-pasted tests into parametrized ones, or to review a PR that deletes or folds tests.
1 other project uses a version of this.
Trending
More talk lately.about the whole repository
Most recently taken up by
- sirkirby/unifi-network-mcpword for word, first seen Nov 2, 2026
Who's talking about sirkirby/unifi-mcp
- alexander-zimmermann/lares“fix(renovate): show release notes for the unifi-mcp images”GitHub · Nov 12, 2026 · 1 reactions
- sudosubin/agents.nix“claude-code-plugins.github.sirkirby.unifi-mcp: fc6ce0d → 4a717f8”GitHub · Nov 26, 2026
- sudosubin/agents.nix“agent-skills.github.sirkirby.unifi-mcp: 9d77a66 → f676785”GitHub · Nov 26, 2026
- sudosubin/agents.nix“claude-code-marketplaces.github.sirkirby.unifi-mcp: 0-unstable-2026-11-24 → 0-unstable-2026-11-25”GitHub · Nov 26, 2026
- sudosubin/agents.nix“codex-marketplaces.github.sirkirby.unifi-mcp: 0-unstable-2026-11-24 → 0-unstable-2026-11-25”GitHub · Nov 26, 2026
The biggest 5 of 50 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 50
Talked about on GitHub (50 times).
On GitHub · 50
- Nov 12, 2026fix(renovate): show release notes for the unifi-mcp images — alexander-zimmermann/lares1 reaction · 1 comment
- Nov 26, 2026claude-code-plugins.github.sirkirby.unifi-mcp: fc6ce0d → 4a717f8 — sudosubin/agents.nix0 reactions
- Nov 26, 2026agent-skills.github.sirkirby.unifi-mcp: 9d77a66 → f676785 — sudosubin/agents.nix0 reactions
- Nov 26, 2026claude-code-marketplaces.github.sirkirby.unifi-mcp: 0-unstable-2026-11-24 → 0-unstable-2026-11-25 — sudosubin/agents.nix0 reactions
- Nov 26, 2026codex-marketplaces.github.sirkirby.unifi-mcp: 0-unstable-2026-11-24 → 0-unstable-2026-11-25 — sudosubin/agents.nix0 reactions
45 more on GitHub
- Nov 26, 2026codex-plugins.github.sirkirby.unifi-mcp: 0-unstable-2026-11-24 → 0-unstable-2026-11-25 — sudosubin/agents.nix0 reactions
- Nov 25, 2026agent-skills.github.sirkirby.unifi-mcp: 0-unstable-2026-11-24 → 0-unstable-2026-11-25 — sudosubin/agents.nix0 reactions
- Nov 25, 2026claude-code-plugins.github.sirkirby.unifi-mcp: 0-unstable-2026-11-24 → 0-unstable-2026-11-25 — sudosubin/agents.nix0 reactions
- Nov 25, 2026claude-code-marketplaces.github.sirkirby.unifi-mcp: 4cce9c8 → afb3b01 — sudosubin/agents.nix0 reactions
- Nov 25, 2026codex-marketplaces.github.sirkirby.unifi-mcp: 4cce9c8 → afb3b01 — sudosubin/agents.nix0 reactions
- Nov 25, 2026codex-plugins.github.sirkirby.unifi-mcp: 0-unstable-2026-11-22 → 0-unstable-2026-11-24 — sudosubin/agents.nix0 reactions
- Nov 25, 2026agent-skills.github.sirkirby.unifi-mcp: 0-unstable-2026-11-23 → 0-unstable-2026-11-24 — sudosubin/agents.nix0 reactions
- Nov 25, 2026claude-code-plugins.github.sirkirby.unifi-mcp: 0-unstable-2026-11-22 → 0-unstable-2026-11-24 — sudosubin/agents.nix0 reactions
- Nov 24, 2026claude-code-marketplaces.github.sirkirby.unifi-mcp: 0-unstable-2026-11-23 → 0-unstable-2026-11-24 — sudosubin/agents.nix0 reactions
- Nov 24, 2026codex-marketplaces.github.sirkirby.unifi-mcp: 0-unstable-2026-11-23 → 0-unstable-2026-11-24 — sudosubin/agents.nix0 reactions
- Nov 24, 2026agent-skills.github.sirkirby.unifi-mcp: 0-unstable-2026-11-22 → 0-unstable-2026-11-23 — sudosubin/agents.nix0 reactions
- Nov 23, 2026claude-code-marketplaces.github.sirkirby.unifi-mcp: 0-unstable-2026-11-22 → 0-unstable-2026-11-23 — sudosubin/agents.nix0 reactions
- Nov 23, 2026codex-marketplaces.github.sirkirby.unifi-mcp: 0-unstable-2026-11-22 → 0-unstable-2026-11-23 — sudosubin/agents.nix0 reactions
- Nov 22, 2026claude-code-plugins.github.sirkirby.unifi-mcp: 0-unstable-2026-11-21 → 0-unstable-2026-11-22 — sudosubin/agents.nix0 reactions
- Nov 22, 2026agent-skills.github.sirkirby.unifi-mcp: 0-unstable-2026-11-21 → 0-unstable-2026-11-22 — sudosubin/agents.nix0 reactions
- Nov 22, 2026claude-code-marketplaces.github.sirkirby.unifi-mcp: 0-unstable-2026-11-21 → 0-unstable-2026-11-22 — sudosubin/agents.nix0 reactions
- Nov 22, 2026codex-marketplaces.github.sirkirby.unifi-mcp: 0-unstable-2026-11-21 → 0-unstable-2026-11-22 — sudosubin/agents.nix0 reactions
- Nov 22, 2026codex-plugins.github.sirkirby.unifi-mcp: 0-unstable-2026-11-21 → 0-unstable-2026-11-22 — sudosubin/agents.nix0 reactions
- Nov 22, 2026agent-skills.github.sirkirby.unifi-mcp: e17d253 → 784d311 — sudosubin/agents.nix0 reactions
- Nov 22, 2026claude-code-marketplaces.github.sirkirby.unifi-mcp: 8284ab5 → 784d311 — sudosubin/agents.nix0 reactions
- Nov 22, 2026codex-plugins.github.sirkirby.unifi-mcp: 5d3e405 → e17d253 — sudosubin/agents.nix0 reactions
- Nov 21, 2026claude-code-plugins.github.sirkirby.unifi-mcp: 5d3e405 → e17d253 — sudosubin/agents.nix0 reactions
- Nov 21, 2026agent-skills.github.sirkirby.unifi-mcp: 5d3e405 → e17d253 — sudosubin/agents.nix0 reactions
- Nov 21, 2026claude-code-marketplaces.github.sirkirby.unifi-mcp: 5d3e405 → 8284ab5 — sudosubin/agents.nix0 reactions
- Nov 21, 2026codex-marketplaces.github.sirkirby.unifi-mcp: 5d3e405 → 784d311 — sudosubin/agents.nix0 reactions
- Nov 21, 2026agent-skills.github.sirkirby.unifi-mcp: f194c81 → 5d3e405 — sudosubin/agents.nix0 reactions
- Nov 21, 2026claude-code-marketplaces.github.sirkirby.unifi-mcp: f194c81 → 5d3e405 — sudosubin/agents.nix0 reactions
- Nov 21, 2026codex-marketplaces.github.sirkirby.unifi-mcp: f194c81 → 5d3e405 — sudosubin/agents.nix0 reactions
- Nov 21, 2026codex-plugins.github.sirkirby.unifi-mcp: 0-unstable-2026-11-20 → 0-unstable-2026-11-21 — sudosubin/agents.nix0 reactions
- Nov 21, 2026claude-code-plugins.github.sirkirby.unifi-mcp: 0-unstable-2026-11-20 → 0-unstable-2026-11-21 — sudosubin/agents.nix0 reactions
- Nov 21, 2026agent-skills.github.sirkirby.unifi-mcp: 0-unstable-2026-11-20 → 0-unstable-2026-11-21 — sudosubin/agents.nix0 reactions
- Nov 21, 2026claude-code-marketplaces.github.sirkirby.unifi-mcp: 0-unstable-2026-11-20 → 0-unstable-2026-11-21 — sudosubin/agents.nix0 reactions
- Nov 21, 2026codex-marketplaces.github.sirkirby.unifi-mcp: 0-unstable-2026-11-20 → 0-unstable-2026-11-21 — sudosubin/agents.nix0 reactions
- Nov 20, 2026claude-code-plugins.github.sirkirby.unifi-mcp: 0-unstable-2026-11-19 → 0-unstable-2026-11-20 — sudosubin/agents.nix0 reactions
- Nov 20, 2026agent-skills.github.sirkirby.unifi-mcp: 8c3b08f → d6c5916 — sudosubin/agents.nix0 reactions
- Nov 20, 2026claude-code-marketplaces.github.sirkirby.unifi-mcp: 8c3b08f → ed007ac — sudosubin/agents.nix0 reactions
- Nov 20, 2026codex-marketplaces.github.sirkirby.unifi-mcp: 8c3b08f → ed007ac — sudosubin/agents.nix0 reactions
- Nov 20, 2026codex-plugins.github.sirkirby.unifi-mcp: b086b02 → fc2d0a8 — sudosubin/agents.nix0 reactions
- Nov 15, 2026Update unifi-network-mcp 0.45.1 → 0.50.3 — karlg100/ha-addons0 reactions
- Oct 25, 2026unifi-mcp: tool-call spans reach Tempo once sirkirby/unifi-mcp#925 ships — alexander-zimmermann/lares0 reactions · 2 comments
- Oct 19, 2026unifi connector: new PyPI version (0.50.2) — RadzuPL/mcp-connectors0 reactions
- Oct 12, 2026Eval unifi-mcp — jfroy/flatops0 reactions
- Oct 3, 2026mcp-unifi: Update dependency sirkirby/unifi-network-mcp to network/v0.50.3 — jtrusty/container-images0 reactions
- Sep 6, 2026feat(unifi-mcp): deploy UniFi Network MCP server brokered through LiteLLM — anthony-spruyt/spruyt-labs0 reactions · 10 comments
- Aug 25, 2026fix(core): #514 reauth never fires for device/client/DPI tools — five call sites bypass ConnectionManager.request() (401 after ~24h persists) — rmaher001/unifi-mcp0 reactions · 1 comment
Other versions1 project uses a version of this.
Word for word · 1
- sirkirby/unifi-network-mcp★ 1.1k100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository16 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- docs/llms.txtllms.txt
- add-integration-api-toolSkill
- myco:api-endpoint-serializer-authoringSkill
- community-pr-batch-reviewSkill
- myco:community-pr-reviewSkill
- myco:extend-unifi-apiSkill
- myco:live-smoke-testingSkill
- myco:mcp-response-redaction-governanceSkill
- myco:monorepo-release-pipelineSkill
- myco:runtime-bootstrap-and-test-isolationSkill
- myco:skill-reference-and-manifest-drift-maintenanceSkill
- myco:unifi-client-data-correctnessSkill
- code-reviewSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 3 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 20
Run scripts/cov_ctx.sh <worktree> <suite> <out>.coverage for every suite you will touch, on an untouched worktree of the base commit.
- Distinctive: line 26
Keep the baseline of every other suite there too: step 2 reads them to decide ownership.
- Distinctive: line 46
Delete: only under the AGENTS.md bar: a kept test asserts the same thing on the same input.
- Very specific: line 53
Write a ledger: one row per deleted or folded test, naming the kept test and assertion that covers it.
- Distinctive: line 60
Run all of these on the finished branch.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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.
Write a ledger: one row per deleted or folded test, naming the kept test and assertion that
covers it. scripts/foldsummary.py <ledger.md>... turns ledgers into a PR-sized summary.
Done when every candidate has a row and every deletion names an exact counterpart.
4. Gates before the PR
Run all of these on the finished branch; each catches a different kind of weakened test.
- Coverage:
scripts/cov_ctx.shon the branch, thenpython3 scripts/arcdiff.py <suite> <baseline-dir> <after>.coveragemust report no required arc lost. A few arcs are reached nondeterministically (theunifi_api/services/managers.pyloop near line 2045, and the connection- and event-manager arcs inunifi_core/network/managersreached by thetest_server_cleanup.pyconnect race). Treat a loss as flaky only after a rerun of the unchanged base loses the same arcs. - Weakening scan:
python3 scripts/weakscan.py <repo> <base-ref> <branch>flags loops over a returned collection with no length check, and expected values that share an object with the input under test. Fix or justify each finding. - Independent review: give a reviewer that did not make the changes only the diff, the ledger and the scan output. Ask it to compare every deleted or folded test's assertions with what replaced them, and to name any dropped assertion or weaker replacement (empty data, different input, a broader end-to-end test). This is the only gate that catches an assertion dropped inside a fold, or a fold that changed its inputs.
- Mutation diff (optional, for deletions in high-risk code):
python3 scripts/mutdiff.py <clean-worktree> <source-file> <function>[,...] <test-file> <base-ref> <branch>reports bugs the original tests caught that the changed tests let through. It costs one pytest run per mutant, so scope it to the functions behind the deletions you are least sure of.
Done when coverage reports no unexplained loss, every scan finding is fixed or justified, and the reviewer's findings are resolved.
5. PR
One PR per suite group, with the ledger summary, collected cases before and after, net lines, and the coverage result. Then address every valid point in the Copilot review before merging.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

