maintainability-gap-lite

Detects AI copy-paste code sprawl and enforces refactoring over duplication.

1|Updated Aug 27, 2025
One-click install
npx skills add https://github.com/IgorGanapolsky/Random-Timer --skill maintainability-gap-lite-igorganapolsky
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: maintainability-gap-lite
Source: https://github.com/IgorGanapolsky/Random-Timer/tree/main/.cursor/skills/maintainability-gap-lite
Command: npx skills add https://github.com/IgorGanapolsky/Random-Timer --skill maintainability-gap-lite-igorganapolsky

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? AI-assisted coding often produces copy-paste duplication that inflates codebases and erodes maintainability. This Skill counters that pattern by enforcing a refactor-first policy and rejecting lines-of-code or 10x-productivity ROI claims as justification for new code. ## Core Features & Use Cases - Duplication Gate: Runs the maintainability_gap_gate.py script to check changes against the maintainability policy defined in docs/MAINTAINABILITY_GAP.md. - Refactor-First Enforcement: Directs the AI to prefer refactoring existing code over adding duplicated blocks. - Use Case: During a pull request review, run the gate script to verify that proposed changes do not introduce copy-paste sprawl before merging. ## Quick Start Run the maintainability gap gate on my current changes and tell me whether they introduce copy-paste duplication that should be refactored instead.

Frequently Asked Questions about maintainability-gap-lite

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

FAQPage Schema
How do I check my code changes for copy-paste duplication?▼

Run python3 scripts/maintainability_gap_gate.py with the --json flag to evaluate your changes against the maintainability policy. The script returns structured output indicating whether the changes pass the duplication gate.

What is the maintainability gap in AI-generated code?▼

The maintainability gap refers to sprawl caused when AI assistants copy-paste similar code blocks instead of refactoring shared logic. The policy in docs/MAINTAINABILITY_GAP.md defines how to detect and reject this pattern.

Does this Skill reject lines-of-code productivity metrics?▼

Yes, the Skill explicitly rejects LOC counts and 10x ROI claims as justification for new code. It prioritizes refactoring and consolidation over raw code volume.

When should I not use a duplication gate in code review?▼

Avoid applying it to generated code, migrations, or vendored third-party files where duplication is intentional or unavoidable. The gate is designed for hand-maintained application source code.