dev-tweaker

Adds throwaway useTweak controls to React feature components for live design exploration.

1.4k|34|Updated Mar 7, 2024
One-click install
npx skills add https://github.com/mehdibha/dotUI --skill dev-tweaker-mehdibha
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: dev-tweaker
Source: https://github.com/mehdibha/dotUI/tree/main/.claude/skills/dev-tweaker
Command: npx skills add https://github.com/mehdibha/dotUI --skill dev-tweaker-mehdibha

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Choosing between design or layout variants during feature development normally requires editing code, rebuilding, and repeating for every option. This Skill adds temporary useTweak() controls to a www feature component so variants can be flipped live in a dev-only panel, then bakes the chosen option into the code and removes the scaffolding. ## Core Features & Use Cases - Live variant exploration: Insert useTweak('Label', { type, default, group? }) calls into a feature component and switch between select, boolean, number, color, or text options in the floating tweaker panel. - Safe experimentation: Controls run only in dev and Vercel previews and are dead-code-eliminated from production builds, with defaults matching the current look so nothing changes until a control moves. - Clean finalization: Once a variant is picked, the chosen values are baked into the code and all useTweak scaffolding is removed before the PR is finalized. - Use Case: While building a new card layout on a feature branch, add a select control with three spacing variants and a boolean for showing a border, let the user pick their preferred combination in the panel, then hardcode the choice and delete the controls. ## Quick Start Ask the assistant to add a few tweakable layout options to the feature component you are working on so you can compare variants in the dev tweaker panel.

Frequently Asked Questions about dev-tweaker

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

FAQPage Schema
How do I add live design tweak controls to a React component?▼

Add useTweak('Label', { type, default, group? }) calls inside the feature component and branch the JSX or styles on the returned value. Supported control types are select, boolean, number, color, and text, and related controls can be grouped together.

How to compare layout variants without changing production code?▼

Use the dev tweaker panel, which runs only in development and Vercel preview builds and is dead-code-eliminated from production. Keep each control's default equal to the current look so nothing changes until a control is moved.

Does the dev tweaker panel affect production builds?▼

No, the tweaker panel and its useTweak calls are dead-code-eliminated from production builds. They only run in local development and on Vercel preview deployments.

When should I not use useTweak controls?▼

Do not use them unprompted, on the main branch, or as a way to add real configuration. They are throwaway scaffolding for explicit design exploration only, and adding a real axis, variant, or token remains a separate product decision.

Can useTweak be added to registry components?▼

No, useTweak calls must never be authored in www/src/registry/ so the product source stays clean. The panel may reuse registry UI, but the calls live only in site, feature, or module code.

What happens after a design variant is chosen?▼

Once the user picks a variant, the chosen values are baked directly into the code and all useTweak scaffolding is removed before the PR is finalized. The controls should not be merged into feature code unless the user wants to keep iterating.