Works with the AI tools you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+22 more

    DedupeGuard: Code Duplication Scanner

    1

    Deterministic AST-based duplication scanner to detect redundant code, imports, and dead functions in large files.

    $19

    Secure checkout via Stripe

    30-day refund guarantee

    Converts to your local currency at checkout

    Security scanned
    DedupeGuard: Code Duplication Scanner

    DedupeGuard: Code Duplication Scanner

    Example session with this skill installed

    Audit auth_service.py for duplication. It has grown significantly after the last three refactorings and feels redundant.

    • Read your context and instructions
    • Compiled the dedupeguard
    • Generated the document

    I have completed the redundancy audit for auth_service.py. The scan identified significant duplication in the import section and three functions with identical logic but different names.

    Redundancy Audit Report

    Finding TypeLocationDetailRecommended Action
    CRITICALRatio: 32.4%580 of 1790 lines are duplicatedImmediate refactor required before adding features
    IMPORT_DUPLICATELines 12, 45, 89from jose import jwt imported 3 timesKeep line 12; remove others
    FUNC_DUPLICATELines 210, 540validate_token and check_auth_header are identicalMerge into validate_token
    BLOCK_DUPLICATE310-335, 920-94525-line identical block for RSA key loadingExtract to _load_rsa_key()
    DEAD_CODELine 1205Function legacy_verify is never called locallyVerify external usage, then delete

    Next steps

    1. Consolidate the jose.jwt imports to the top of the file to resolve the high-frequency duplication.
    2. Extract the RSA key loading logic into a private helper method to reduce the duplication ratio by approximately 8%.
    3. Run the audit again after merging the identical validation functions to confirm the status drops to WARNING.

    dedupeguard-code-duplication-scanner.pdf

    PDF · document

    Generated

    Example file from a real run - the skill writes it into your workspace.

    Connects securely to your tools. The creator never sees your data.

    What you get

    Detect duplicate imports added by AI agents during multi-turn edits.Identify identical function bodies with different names for merging.Calculate a duplication ratio to block PRs exceeding debt thresholds.Extract repeated logic blocks into reusable helper functions.

    About this skill

    AI agents often hallucinate by duplicating imports or re-implementing existing logic when refactoring large files. This skill acts as a static analysis layer that detects redundant functions, blocks, and imports before technical debt makes the codebase unmaintainable.

    What it does

    • Function hashing identifies identical logic even if function names differ.
    • Import auditing flags repeated import statements, a common artifact of multi-turn AI coding sessions.
    • Block detection scans for identical code segments of five or more lines across the file.
    • Class analysis identifies classes with high method overlap (over 70%) for potential inheritance refactoring.
    • Redundancy metrics calculates a duplication ratio to provide a clear technical debt score.
    • Dead code marking highlights local functions and variables that are defined but never referenced.

    How it works

    1. Source Parsing: The skill parses the target file into an Abstract Syntax Tree (AST).
    2. Signature Hashing: It normalizes code blocks by removing whitespace and comments to generate unique hashes.
    3. Collision Detection: It identifies nodes with identical hashes and maps them to their specific line numbers.
    4. Metric Calculation: It generates a JSON report with a risk assessment (CLEAN to CRITICAL) based on the duplication ratio.

    Frameworks & tools

    This skill utilizes language-specific parsers including Python ast, JavaScript @babel/parser, and go/parser. It is designed for integration into CI/CD pipelines or as a pre-processing step in AI agent workflows.

    Why this beats prompting it yourself

    Standard LLMs struggle to track line numbers accurately or perform exhaustive sliding-window comparisons on large files. This tool uses deterministic AST hashing to guarantee 100% accuracy in finding identical blocks that a human or generic prompt would overlook.

    Use cases

    • Auditing legacy files over 1000 lines before attempting a major refactor.
    • Automated PR reviews to catch "copy-paste" coding patterns.
    • Preventing AI agents from polluting files with redundant imports during iterative edits.
    • Identifying candidates for extraction into shared helper libraries.

    Known limitations

    This skill is not suitable for files under 200 lines or auto-generated code like ORM migrations and Protobuf files. It scans for local file redundancy and requires an import graph for project-wide dead code analysis.

    How to install

    Works the same in every agent - Claude, Cursor, Codex, Copilot and 20+ more.

    ~30 seconds
    1. 1

      Download the ZIP

      Free skills download straight away. Paid skills unlock right after purchase.

    2. 2

      Unzip into your skills folder

      Every agent reads skills from one folder on your machine. Drop the unzipped folder in there.

    3. 3

      Ask your agent to use it

      Restart the agent if it was already running. It picks the skill up automatically - no config needed.

    Skills folder by agent

    Click the path to copy it. Create the folder if it does not exist yet.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill passes our trust checks below.

    Security scanned

    Passed our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    30-day refund

    Not a fit? Get your money back

    Trust & safety

    Security scanned

    Verified clean today

    • Passed all security checks, Safe to install

    Needs access to

    Python

    Listedtoday

    What's inside

    Frequently Asked Questions