tweaks
Что он делает
Этот инструмент позволяет визуально настраивать дизайн (цвета, размер текста, отступы) с помощью элементов управления на боковой панели. Изменения применяются в реальном времени и сохраняются автоматически, так что можно экспериментировать с разными вариантами без повторных запросов к ИИ.
Когда использовать
- ✓Когда дизайн вам нравится, но хочется доработать мелочи.
- ✓Чтобы показать разные варианты дизайна другим и выбрать лучший.
- ✓При создании интерактивного демо проекта.
Ссылка на скилл
https://github.com/nexu-io/open-design/blob/main/design-templates/tweaks/SKILL.mdСкопируйте и вставьте её в ваш ИИ (Claude, ChatGPT или Cursor) с просьбой следовать инструкциям.
Как использовать
Самый простой способ: скопируйте сообщение и вставьте его в свой ИИ. Он прочитает скилл и выполнит инструкции.
Готовое сообщение для вставки
Для Claude Code, Codex или Cursor: запустите в папке проекта, и скилл установится.
Скачайте SKILL.md и положите его в папку скиллов вашего агента.
Пример запроса к вашему ИИ
“Хочу, чтобы этот сайт был с синим основным цветом, текстом чуть крупнее и меньшими отступами между элементами.”
5 новых скиллов в неделю. 1 минута чтения.
Как это работает
Инструмент добавляет к вашему дизайну панель с элементами управления (например, выбором цвета и кнопками). Эти элементы сразу меняют CSS-код дизайна и сохраняют ваши настройки, так что они останутся, даже если вы закроете и снова откроете страницу.
Технический текст (оригинальный SKILL.md)
Оригинальный текст автора на английском, прямо с GitHub.
Tweaks Skill · 参数化变体面板
Wrap any HTML artifact with a side panel of live controls that rewrite
CSS custom properties in real time and persist to localStorage.
Inspired by the huashu-design tweak pattern.
What you produce
A single self-contained HTML file with two layers:
- Stage — the original artifact (landing page / deck / dashboard)
re-keyed so all visual decisions read from CSS custom properties:
--accent,--scale,--density,--mode,--motion. - Panel — a fixed sidebar (or drawer on small viewports) with
form controls bound to those custom properties via a tiny
vanilla-JS bridge. Persists every change to
localStoragekeyed by the artifact identifier.
The user can:
- Open the artifact and see the stage rendered with their saved preferences (or sensible defaults).
- Adjust accent / scale / density / mode / motion in the panel and watch the stage update instantly — no rerender.
- Press <kbd>T</kbd> to hide / reveal the panel; <kbd>R</kbd> to reset to defaults.
- Refresh the page — every choice is persisted.
When to use
- The user generated something they like 80% of, and wants to dial in the last 20% themselves.
- You're presenting a design system / brand and want the audience to feel the variants live (instead of you re-running the agent).
- You're shipping a stand-alone demo (e.g. a portfolio piece) and want viewers to play.
When not to use
- One-shot artifacts that won't be iterated on (e.g. a runbook — parameters don't help).
- When the artifact's value is in fixed ratios (e.g. an infographic with carefully balanced data viz — knobs would degrade it).
The 5 standard knobs
Pick a subset that suits the artifact. Don't ship all 5 if only 2 matter — clutter is a regression.
1. --accent — Accent color
A select with 5–8 curated swatches (don't ship a free color picker — the user will pick a bad color and blame you).
const ACCENT_PRESETS = [
{ id: 'rust', val: '#c96442', label: 'Rust' },
{ id: 'cobalt', val: '#2c4d8e', label: 'Cobalt' },
{ id: 'sage', val: '#4a7a3f', label: 'Sage' },
{ id: 'plum', val: '#7a3f6a', label: 'Plum' },
{ id: 'graphite',val: '#3a3a3a', label: 'Graphite' },
];
The artifact uses var(--accent) everywhere it had a hard-coded
accent before. Border / link / pull-quote rule / CTA all flip
together.
2. --scale — Type scale (0.85 / 1.0 / 1.15)
Three settings: Compact (0.85), Normal (1.0), Generous (1.15).
All font-size declarations multiply by var(--scale) via
calc(... * var(--scale)).
Don't go beyond ±15% — beyond that the layout breaks (column flow, breakpoints, line counts).
3. --density — Layout density (Tight / Normal / Roomy)
Three settings that swap the spacing scale: Tight (0.75) /
Normal (1.0) / Roomy (1.4). All padding / gap / margin
declarations multiply by var(--density).
This is the highest-impact knob — it's also the most fragile, so every layout-critical container must declare its base spacing in custom properties before you wrap.
4. --mode — Light / Dark
A 2-state toggle. Sets data-mode="light" vs "dark" on the
<html> element and the artifact's :root selector responds with
two color sets.
If the artifact already has a media-query-based dark mode, replace it with the data-attr version — the user's choice should win over their OS.
5. --motion — Off / Subtle / Lively
Three settings. Maps to a CSS variable --motion-mult that scales
all transition-duration / animation-duration declarations:
- Off —
0s(also disables WebGL canvases / decorative animation). - Subtle —
1.0(the artifact's authored timing). - Lively —
1.6(slower transitions, more visible motion).
Respect prefers-reduced-motion: default to Off if the user has
that set, regardless of stored preference.
Host integration contract (REQUIRED)
The OpenDesign viewer toolbar has a Tweaks toggle that drives panel visibility from outside the iframe. For the toggle to bind to your panel, your artifact must speak one of these two protocols (pick one; don't mix). The toolbar enables itself the moment it sees either signal.
Protocol A — postMessage (recommended for agent-generated artifacts)
Use this when the panel mounts via JS (React, vanilla, anything dynamic).
Artifact → host:
- On mount, post
{ type: '__edit_mode_available', visible?: boolean }to
…
Частые вопросы
Можно ли изменить любой цвет?
Можно поменять акцентный цвет и тему (светлую или тёмную). Остальные цвета задаёт исходный дизайн.
Что будет, если закрыть страницу?
Ваши настройки автоматически сохраняются в браузере. При повторном открытии страницы дизайн вернётся к последним выбранным вами настройкам.
Можно ли вернуть исходные настройки?
Да, обычно есть опция сброса настроек к значениям по умолчанию.
Подробности
Оригинальное описание автора
Wrap any HTML artifact with a side panel of live, parameterized controls — accent color, type scale, density, motion, theme — that rewrite CSS custom properties in real time and persist to localStorage. Lets the user explore variants of a design without re-prompting the agent. Use when the brief asks for "variants", "side-by-side options", "tweak this", "let me adjust", "live knobs", or "实时调参".
repo: nexu-io/open-design
Популярность
- Звёзды на GitHub
- 101k
- Место в рейтинге
- #963
- Лицензия
- Apache-2.0
- Обновлён
- 15.10.2026
Комментарии
- …
Другие скиллы из этого репозитория
sample-plugin
101kАгент создаёт файл метаданных для тестов, чтобы код правильно работал в разных ситуациях.
aster-atelier
101kПомогает агенту создать художественный сайт в классическом стиле: изысканные образы, голубое небо и шрифты с засечками.
audio-jingle
101kАгент генерирует звук, например джинглы и звуковые эффекты, создаёт музыку и голоса и сохраняет результат в аудиофайл.
blog-post
101kПомогает агенту писать длинные статьи и посты для блога с местом для изображений, цитат и информации об авторе.
Похожие скиллы
canvas
394kПозволяет агенту показать размещенный визуальный виджет на подключенной панели Mac, а затем скрыть панель или перенести ее на другую страницу.
control-ui
394kПомогает агенту упорядочивать интерфейс управления OpenClaw и устранять неполадки в нем, включая сессии, панели и подключенные Gateway.
diagram-maker
394kПомогает агенту создавать понятные диаграммы в форматах SVG, HTML или редактируемом Excalidraw для процессов, архитектуры систем и эскизов на доске.