code-similarity-ts

Identify semantically similar TypeScript code blocks and propose refactoring priorities.

1|Updated Dec 21, 2025
One-click install
npx skills add https://github.com/DIO0550/d-market --skill code-similarity-ts
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-similarity-ts
Source: https://github.com/DIO0550/d-market/tree/main/plugins/typescript-rules-plugin/skills/code-similarity-ts
Command: npx skills add https://github.com/DIO0550/d-market --skill code-similarity-ts

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

TypeScript code duplication leads to maintenance debt; this skill identifies semantically similar blocks and surfaces refactoring opportunities.

Core Features & Use Cases

  • Detects duplicated or highly similar TypeScript code across a codebase.
  • Analyzes similarity results to prioritize refactoring targets.
  • Generates a concrete refactoring plan with suggested extraction candidates.

Quick Start

Run similarity-ts on your TypeScript project to identify duplicate patterns and generate a refactoring plan.

Frequently Asked Questions about code-similarity-ts

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

FAQPage Schema
How do I detect TypeScript code duplication across a multi-file project?

TypeScript code duplication is detected by scanning directories to identify semantically similar code blocks and compute similarity scores. This surfaces refactoring opportunities to reduce maintenance debt across multi-file projects.

What is the best way to plan refactors for duplicated TypeScript code?

The best way to plan refactors for duplicated TypeScript code is by analyzing similarity results to prioritize targets and generating a structured plan. This plan includes suggested extraction candidates to establish maintainable patterns.

Do I need the similarity-ts tool installed to analyze code duplication?

Yes, the similarity-ts tool is required to be installed to analyze code duplication. It provides the scanning and similarity computation engine needed to identify duplicated TypeScript blocks and generate the refactoring plan.

Can I configure the similarity threshold and minimum lines for TypeScript duplication analysis?

Yes, you can configure the similarity threshold and minimum lines for TypeScript duplication analysis. These options allow you to control the sensitivity of the scan and filter out small, irrelevant code matches.

Does TypeScript duplication detection work for monorepos?

Yes, TypeScript duplication detection works for monorepos. The analysis applies to multi-file TypeScript projects and monorepos, scanning directories to identify similar blocks and inform refactoring priorities.