consolidate

Identifies and classifies duplicated code patterns across a repository to generate a migration plan.

2|Updated Dec 22, 2025
One-click install
npx skills add https://github.com/TMI-apps/boilerplate-vite-supabase-mui-cursor --skill consolidate-tmi-apps
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: consolidate
Source: https://github.com/TMI-apps/boilerplate-vite-supabase-mui-cursor/tree/main/.cursor/skills/consolidate
Command: npx skills add https://github.com/TMI-apps/boilerplate-vite-supabase-mui-cursor --skill consolidate-tmi-apps

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Systematically audit the codebase to identify duplication, redundancy, and opportunities to consolidate patterns across features, enabling safer and faster refactors.

Core Features & Use Cases

  • Discovery of cross-feature duplication and repeated patterns.
  • Classification of findings into Literal, Structural, Conceptual, and Inconsistent usage.
  • Analysis and prioritization to produce a concrete consolidation plan ready for execution.
  • Use Case: When multiple features implement similar table models or utilities, consolidate them into a shared abstraction after validating multiple use cases.

Quick Start

Run the consolidate skill to generate a repo-wide consolidation map and review the prioritized plan.

Frequently Asked Questions about consolidate

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

FAQPage Schema
How do I identify and consolidate duplicated code patterns across features?

To consolidate duplicated code, this Skill systematically discovers cross-feature patterns, classifies them as Literal, Structural, Conceptual, or Inconsistent, and generates a prioritized migration plan for safe refactoring.

What is the best way to plan a refactoring strategy for cross-feature code duplication?

Planning a refactoring strategy requires analyzing repo-wide duplication, prioritizing findings by impact, and presenting an actionable consolidation plan that strictly adheres to layer boundaries and minimal coupling.

How do I classify code duplication types during a codebase architecture audit?

During a codebase architecture audit, code duplication is classified into Literal, Structural, Conceptual, and Inconsistent usage categories to evaluate consolidation opportunities and generate a targeted migration plan.

Can I use this consolidation approach for large scale repo-wide refactoring?

Yes, you can use this approach for repo-wide refactoring. It systematically executes a phased workflow from discovery to execution, ensuring safe unification of repeated code across multiple features at scale.

When should I avoid unifying repeated code into a shared abstraction?

You should avoid unifying repeated code if the analysis reveals inconsistent usage patterns that violate minimal coupling principles, or when consolidating the duplication would break established layer boundaries.