reuse-first-extend

Guides extending UI kit components and declaring one-off deviations with native-ok markers.

1|Updated Jan 14, 2024
One-click install
npx skills add https://github.com/Eyhenij/rt-tools --skill reuse-first-extend-eyhenij
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: reuse-first-extend
Source: https://github.com/Eyhenij/rt-tools/tree/main/.claude/skills/reuse-first-extend
Command: npx skills add https://github.com/Eyhenij/rt-tools --skill reuse-first-extend-eyhenij

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When a UI kit component or base class does not cover a case, developers often write clones next to the ready-made code, which diverge from the original and create undeclared duplication. This Skill enforces a reuse-first workflow: verify the capability is truly missing, extend the kit instead of cloning, and formally declare any approved deviation. ## Core Features & Use Cases - Missing-capability verification: Grep-based checks across the kit exports and neighboring domains before writing anything new. - Extend-don't-clone guidance: New variants are added to the kit or base class so all screens benefit, instead of forking a local copy. - Deviation declaration: One-off departures are marked with a native-ok comment explaining what the kit lacks, and custom ready-mades are registered as sign entries with scope, cancel, and instead fields. - Use Case: A developer needs a phone-input field the kit lacks. After confirming it is missing and getting owner approval, they add a native-ok marker citing the gap and task key, and remove it once the kit ships the component. ## Quick Start Ask the assistant to check whether the UI kit already covers the component you are about to write and, if not, how to extend it or declare a native-ok deviation.

Frequently Asked Questions about reuse-first-extend

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

FAQPage Schema
How do I check if a UI kit already has a component before writing my own?▼

Grep the kit's index exports and search neighboring domains for similar techniques in HTML templates. Components are often present but renamed, so reading the whole neighboring domain prevents writing a duplicate that already exists under another name.

What should I do when a UI kit component does not cover my case?▼

Extend the kit or base class with a new variant instead of cloning it locally. A clone diverges from the original with the first edit, while a variant added to the ready-made becomes available to all other screens.

How do I declare a one-off deviation from the UI kit?▼

Add a native-ok comment on the line above the code explaining exactly what the kit lacks, including the task key. The marker only lifts its own line, and in markup it must be a comment because formatters can move attribute markers to a second line.

When should a native-ok marker be removed?▼

Remove the marker together with the workaround once the missing capability appears in the kit. A justification comment left in place keeps the deviation alive, so stale markers must be cleaned up when the ready-made arrives.

Can I create my own base class or primitive without approval?▼

No. Writing your own primitive, base class, or inline style requires the owner's approval before the first file is written. Approved custom ready-mades must then be registered as sign entries so others can discover them.