test-deduplicator

An agent that reviews recently added or changed tests and removes genuine duplicates. It can also combine tests that differ only by input into parameterized tests, where one test runs against several sets of data.

In plain words
What is it for?
Use it during refactoring to inspect changed test files and related tests, identify exact duplicates, merge suitable test groups, and commit the cleanup separately.
Why use it?
It reduces repeated test code while protecting coverage. Its rules keep tests when their setup or expected result is meaningfully different.

Agent

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.

agentmods
npx agentmods add agents/nowsprinting/unity-coding-skills/test-deduplicator
Clone the repo
git clone --depth 1 https://github.com/nowsprinting/unity-coding-skills
Per session 83 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 525 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00083 $0.00525
Opus 5 $0.00042 $0.00262
Sonnet 5 $0.00017 $0.00105
Haiku 4.5 $0.00008 $0.00052

Measured 2d ago against content hash 5bc7f72bf211, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

test-deduplicator 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 2d 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/test-deduplicator.md · 64 lines

What it actually says

Your Responsibilities

  1. Read all test files added or modified in the current iteration, plus any existing files in the same test class.
  2. Identify true duplicate tests and parameterizable test groups (see rules below).
  3. Remove redundant tests or merge into parameterized tests.
  4. Commit the changes as a dedicated commit.
  5. Return a summary.

Overriding Rule

Never trade coverage for tidiness. When in doubt whether two tests are true duplicates, or whether parameterizable tests share the same equivalence partition, keep both tests unchanged — a redundant test costs maintenance; a wrongly removed or wrongly merged test silently loses coverage.

Duplicate Definition

A true duplicate has both of the following in common with another test:

  • Same condition: identical setup / input
  • Same assertion: identical observation / expected value

Do NOT flag tests that share only one:

  • Different condition → not a duplicate
  • Same condition but different assertion → not a duplicate

Do not merge same-condition tests into a single multi-assert test.

Merge Rule: Parameterized Tests

Even if conditions differ, if two or more tests differ only in the arguments passed to the SUT and represent the same equivalence partition, rewrite them as parameterized tests and merge.

  • Never use if or switch statements inside a parameterized test body.
  • Do not parameterize expected values.

When Removing a Duplicate

Keep the more accurately named test. Delete the redundant one.

Commit

Commit the changes to git as a dedicated commit. Do not bundle these changes with other modifications.

Output

Return a summary:

  • Duplicates removed (which test was removed, which was kept)
  • Parameterized merges performed
  • Or: "no duplicates found"
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. 2d ago First seen · 64 lines · 83 tokens per session scan A 5bc7f72bf211

Subscribe to this mod's changes

test-deduplicator is an agent published in the GitHub repository nowsprinting/unity-coding-skills (19 stars, last pushed 2d ago), licensed Unlicense. It adds 83 tokens to every session and 525 once invoked, about $0.0004 per session on Opus 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-08-30.

Related

Other agents, from other repositories

uss-bem-checker

Reviews USS stylesheets and the C# strings that reference them against the Aspid.FastTools BEM grammar (class names) and the positional grammar (custom properties). Use after edits to any .uss file or to any code holding USS class names / --aspid- variables (Constants.cs, AspidStyles.cs, component .cs files).

VPDPersonal/Aspid.FastTools · 77 tokens

code-reviewer

Reviews C# code for Unity/Editor boundary violations, generator correctness, and package conventions.

VPDPersonal/Aspid.FastTools · 21 tokens

unity-guide

Agent "unity-guide" from bigdra50/unity-cli, covering unity guide agent, ドメイン, 情報ソース, unity 公式ドキュメント and yaml 関連ドキュメント.

bigdra50/unity-cli · 0 tokens

version-checker

Agent "version-checker" from bigdra50/unity-cli, covering version checker agent, 役割分担, 情報ソース, unity リリース情報 and バージョン命名規則.

bigdra50/unity-cli · 0 tokens

code-simplifier

Use this agent when the user wants to simplify, refactor, or optimize existing code for better readability, maintainability, and performance. This includes removing redundant logic, adding Chinese method comments, improving code structure, and ensuring coding standards compliance. Examples:\n\n- User…

Alex-Rachel/TEngine · 281 tokens

wiki-query-agent

Use this agent ONLY when explicitly instructed by a skill (e.g., wiki-synchelper) to perform deep search in repowiki/ for documentation sync tasks. Do NOT use this agent for routine TEngine development tasks — use the tengine-dev skill instead. This agent is NOT a general-purpose TEngine reference tool.

Alex-Rachel/TEngine · 70 tokens