ada-code-dedup-audit

Audits uncommitted code changes against the existing codebase to detect duplicated patterns and missed reuse opportunities.

Updated Jul 23, 2026
One-click install
npx skills add https://github.com/wubing7755/Ada --skill ada-code-dedup-audit-wubing7755
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ada-code-dedup-audit
Source: https://github.com/wubing7755/Ada/tree/main/skills/software-development/ada-code-dedup-audit
Command: npx skills add https://github.com/wubing7755/Ada --skill ada-code-dedup-audit-wubing7755

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? New code often reimplements utilities, helpers, and patterns that already exist in the codebase, creating DRY violations and technical debt. This Skill systematically audits uncommitted changes against the entire codebase to answer "am I reinventing the wheel?" before code review or merge. ## Core Features & Use Cases - Five-Phase Audit Methodology: Scopes the git diff, extracts searchable signatures from new patterns, runs parallel codebase searches, reads and compares existing implementations, and produces a structured findings report. - Risk-Tiered Findings: Prioritizes results from event/lock bypassing (high risk) down to component-local LINQ vs. existing state queries (low risk), each with file:line references and concrete reuse suggestions. - Pattern Library: Detects common duplication such as debounce/delay blocks, logging/tracing wrappers, component-to-service bypass, CSS magic numbers, repeated string literals, and Blazor markup duplication. - Use Case: Before merging a feature branch in a Blazor component library, run the audit to discover that a new flyout hide delay duplicates an existing debounced save pattern, then extract a shared AsyncDebounce helper. ## Quick Start Ask the assistant to audit my uncommitted changes for duplicated code and missed reuse of existing utilities before I submit this branch for review.

Frequently Asked Questions about ada-code-dedup-audit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I check if my new code duplicates existing code?

Run a deduplication audit on your uncommitted changes: scope the git diff, extract searchable signatures from each new pattern, search the codebase in parallel, and compare full existing implementations. The audit reports each finding with file:line references and a concrete reuse suggestion.

How to find DRY violations before merging a feature branch?

Audit the branch diff against the whole codebase before review. The process identifies duplicated debounce patterns, logging wrappers, repeated string literals, and markup duplication, then prioritizes findings by risk tier so high-risk issues like event or lock bypassing are fixed first.

What duplication patterns does a code dedup audit detect?

It detects debounce/delay blocks using CancellationTokenSource and Task.Delay, Debug.WriteLine logging with repeated prefixes, components bypassing service layers, CSS magic numbers, repeated string literals, and duplicated Blazor or Razor markup across components.

When should I skip a code deduplication audit?

Skip the audit for greenfield projects with no existing code to reuse and for pure configuration changes. It is designed for mature codebases where new contributions risk reimplementing existing utilities, helpers, or shared infrastructure.

Does similar-looking code always count as duplication?

No. Legitimate specialization, such as debouncing UI versus persistence with different lifecycles, may stay separate. Component-local LINQ over filtered lists is often acceptable, and model-level plus service-level guards can be defensive rather than duplicated.