dedup-guard

Detect duplicate code artifacts using AST-backed semantic search and behavioral analysis.

Updated Oct 9, 2025
One-click install
npx skills add https://github.com/Siamese001/Agentic-Workflow --skill dedup-guard
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dedup-guard
Source: https://github.com/Siamese001/Agentic-Workflow/tree/main/.windsurf/skills/dedup-guard
Command: npx skills add https://github.com/Siamese001/Agentic-Workflow --skill dedup-guard

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill prevents the proliferation of duplicate code, agents, mixins, and constants, ensuring code quality and maintainability by enforcing a strict deduplication protocol before new code is introduced.

Core Features & Use Cases

  • AST-backed Search: Utilizes Abstract Syntax Tree analysis to find semantically equivalent code.
  • Multi-faceted Deduplication: Checks for duplicates by AST, name patterns, and behavioral analysis.
  • Justification Requirement: Mandates documented justification for creating new symbols when no duplicates are found.
  • Use Case: Before adding a new utility function for file path manipulation, run the dedup-guard to ensure a similar function doesn't already exist, preventing code redundancy.

Quick Start

Run the dedup-guard skill to check for duplicate symbols before creating a new agent class.

Frequently Asked Questions about dedup-guard

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

FAQPage Schema
How do I prevent duplicate code and symbols when adding new utility functions?

Preventing duplicate code requires an AST-backed deduplication protocol that performs semantic search, name pattern matching, and behavioral analysis before introducing new artifacts. This ensures existing utility functions are identified to avoid code redundancy.

What is AST analysis for code deduplication?

AST analysis for code deduplication is a technique using Abstract Syntax Trees to find semantically equivalent code structures. It identifies duplicates by comparing structural representations rather than text, ensuring accurate duplicate symbol detection.

How do I check for duplicate mixins and constants before creating new ones?

To check for duplicate mixins and constants, run a deduplication protocol enforcing exhaustive checks using AST analysis and behavioral patterns. This multi-faceted approach ensures no equivalent symbols exist before creation.

Does code governance require justification for creating new symbols when no duplicates are found?

Yes, strict code governance requires documented justification for creating new symbols even when exhaustive deduplication checks find no existing duplicates. This mandates accountability for new artifacts to maintain code quality.

What is the best way to find semantically equivalent code structures?

The best way to find semantically equivalent code structures is using Abstract Syntax Tree analysis combined with name pattern matching and behavioral analysis. This multi-faceted deduplication approach identifies duplicates text-based searches miss.