check-similarity-mbt

Detect duplicate MoonBit code in MBT files using AST-based similarity analysis.

821|20|Updated Jun 16, 2025
One-click install
npx skills add https://github.com/mizchi/similarity --skill check-similarity-mbt
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: check-similarity-mbt
Source: https://github.com/mizchi/similarity/tree/main/.claude/skills/check-similarity-mbt
Command: npx skills add https://github.com/mizchi/similarity --skill check-similarity-mbt

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Identify and reduce code duplication in MoonBit projects by analyzing MBT files with AST-based similarity, enabling targeted refactoring and quality enforcement.

Core Features & Use Cases

  • Detect exact and near-duplicate MBT code blocks across a MoonBit project.
  • Propose concrete refactoring plans to extract shared logic and parameterize differences.
  • Apply threshold-based filtering to prioritize high-impact duplicates and surface actionable insights.

Quick Start

Run similarity-mbt on the target MoonBit project to identify duplicate MBT functions and surface a refactoring plan.

Frequently Asked Questions about check-similarity-mbt

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

FAQPage Schema
How do I detect duplicate MoonBit code in MBT projects?▼

To detect duplicate MoonBit code, run similarity-mbt on your project to analyze MBT source files using AST-based similarity analysis and identify exact or near-duplicate functions across modules.

How does AST-based similarity analysis work for MoonBit refactoring?▼

AST-based similarity analysis parses MBT files into abstract syntax trees to compare structural patterns, enabling the detection of exact and near-duplicate code blocks that require refactoring.

Can I filter MoonBit code duplication results by threshold and minimum lines?▼

You can filter code duplication results by running similarity-mbt with optional arguments like --threshold and --min-lines to prioritize high-impact duplicates and surface actionable insights.

What is the best way to consolidate duplicate MBT functions across modules?▼

The best way to consolidate duplicate MBT functions is to analyze the categorized results from similarity-mbt and follow its concrete refactoring plan to extract shared logic and parameterize differences.

Does this static analysis tool work with any MoonBit project structure?▼

This static analysis tool applies to MoonBit projects containing MBT source files, specifically identifying refactoring opportunities and enforcing code quality across modules within those projects.