{"id":"8ebbd45e-7fe7-4263-a5da-299cfad47383","shortId":"yUzZ4z","kind":"skill","title":"tweaks","tagline":"Wrap any HTML artifact with a side panel of live, parameterized\ncontrols — accent color, type scale, density, motion, theme — that\nrewrite CSS custom properties in real time and persist to\nlocalStorage. Lets the user explore variants of a design without\nre-prompting the agent. Us","description":"# Tweaks Skill · 参数化变体面板\n\nWrap any HTML artifact with a side panel of live controls that rewrite\nCSS custom properties in real time and persist to `localStorage`.\nInspired by the *huashu-design* tweak pattern.\n\n## What you produce\n\nA single self-contained HTML file with two layers:\n\n1. **Stage** — the original artifact (landing page / deck / dashboard)\n   re-keyed so all visual decisions read from CSS custom properties:\n   `--accent`, `--scale`, `--density`, `--mode`, `--motion`.\n2. **Panel** — a fixed sidebar (or drawer on small viewports) with\n   form controls bound to those custom properties via a tiny\n   vanilla-JS bridge. Persists every change to `localStorage` keyed\n   by the artifact identifier.\n\nThe user can:\n\n- Open the artifact and see the stage rendered with their saved\n  preferences (or sensible defaults).\n- Adjust accent / scale / density / mode / motion in the panel and\n  watch the stage update instantly — no rerender.\n- Press <kbd>T</kbd> to hide / reveal the panel; <kbd>R</kbd> to\n  reset to defaults.\n- Refresh the page — every choice is persisted.\n\n## When to use\n\n- The user generated something they like 80% of, and wants to dial\n  in the last 20% themselves.\n- You're presenting a design system / brand and want the audience to\n  feel the variants live (instead of you re-running the agent).\n- You're shipping a stand-alone demo (e.g. a portfolio piece) and\n  want viewers to play.\n\n## When *not* to use\n\n- One-shot artifacts that won't be iterated on (e.g. a runbook —\n  parameters don't help).\n- When the artifact's value is in fixed ratios (e.g. an infographic\n  with carefully balanced data viz — knobs would degrade it).\n\n## The 5 standard knobs\n\n> Pick a subset that suits the artifact. Don't ship all 5 if only 2\n> matter — clutter is a regression.\n\n### 1. `--accent` — Accent color\n\nA select with 5–8 curated swatches (don't ship a free color picker —\nthe user will pick a bad color and blame you).\n\n```js\nconst ACCENT_PRESETS = [\n  { id: 'rust',    val: '#c96442', label: 'Rust' },\n  { id: 'cobalt',  val: '#2c4d8e', label: 'Cobalt' },\n  { id: 'sage',    val: '#4a7a3f', label: 'Sage' },\n  { id: 'plum',    val: '#7a3f6a', label: 'Plum' },\n  { id: 'graphite',val: '#3a3a3a', label: 'Graphite' },\n];\n```\n\nThe artifact uses `var(--accent)` everywhere it had a hard-coded\naccent before. Border / link / pull-quote rule / CTA all flip\ntogether.\n\n### 2. `--scale` — Type scale (0.85 / 1.0 / 1.15)\n\nThree settings: *Compact* (0.85), *Normal* (1.0), *Generous* (1.15).\nAll `font-size` declarations multiply by `var(--scale)` via\n`calc(... * var(--scale))`.\n\nDon't go beyond ±15% — beyond that the layout breaks (column flow,\nbreakpoints, line counts).\n\n### 3. `--density` — Layout density (Tight / Normal / Roomy)\n\nThree settings that swap the spacing scale: *Tight* (0.75) /\n*Normal* (1.0) / *Roomy* (1.4). All `padding` / `gap` / `margin`\ndeclarations multiply by `var(--density)`.\n\nThis is the highest-impact knob — it's also the most fragile, so\n**every layout-critical container must declare its base spacing in\ncustom properties** before you wrap.\n\n### 4. `--mode` — Light / Dark\n\nA 2-state toggle. Sets `data-mode=\"light\"` vs `\"dark\"` on the\n`<html>` element and the artifact's `:root` selector responds with\ntwo color sets.\n\nIf the artifact already has a media-query-based dark mode, *replace*\nit with the data-attr version — the user's choice should win over\ntheir OS.\n\n### 5. `--motion` — Off / Subtle / Lively\n\nThree settings. Maps to a CSS variable `--motion-mult` that scales\nall `transition-duration` / `animation-duration` declarations:\n\n- *Off* — `0s` (also disables WebGL canvases / decorative animation).\n- *Subtle* — `1.0` (the artifact's authored timing).\n- *Lively* — `1.6` (slower transitions, more visible motion).\n\nRespect `prefers-reduced-motion`: default to *Off* if the user has\nthat set, regardless of stored preference.\n\n## Implementation primitives\n\nRead `assets/wrap.html` — it ships the panel + bridge as an\ninert template. Your job is to:\n\n1. Take the user's existing artifact HTML.\n2. Lift its accent / mode / spacing / scale into custom properties\n   (search for hard-coded `#hex` / `Npx` / `Nrem` and convert).\n3. Paste the contents into the marked region of `wrap.html`.\n4. Edit `assets/wrap.html`'s `KNOBS` array to keep only the knobs\n   you decided are relevant to *this* artifact. Don't ship 5 if 2\n   matter.\n5. Patch the `STORAGE_KEY` to a unique slug (`tweaks-<artifact-slug>`).\n\nThe bridge in `wrap.html`:\n- Loads `localStorage[STORAGE_KEY]` JSON on first paint.\n- Applies values as `document.documentElement.style.setProperty('--accent', ...)`.\n- Listens to every form control's `change` event and writes back.\n- Exposes <kbd>T</kbd> (toggle panel) and <kbd>R</kbd> (reset).\n\n## Workflow\n\n### Step 1 — Acquire the artifact\n\nSame options as the critique skill:\n\n1. Project file (`index.html` in the project folder).\n2. Pasted HTML in the chat.\n3. Generated by you in this turn.\n\n### Step 2 — Decide which knobs apply\n\nRead the artifact's CSS first. For each knob, decide *yes / no*:\n\n- `--accent` — yes if the artifact has 1 accent color used ≥ 3 times.\n- `--scale` — yes if the artifact is type-driven (article, deck,\n  pricing page).\n- `--density` — yes if the artifact has consistent gap / padding\n  rhythm (deck, dashboard, landing). No for runbooks (already dense).\n- `--mode` — yes if the artifact has authored dark mode tokens, or\n  you're willing to derive them.\n- `--motion` — yes if the artifact has any transition / animation\n  worth scaling. No for static reports / critique reports.\n\nDefault: **3 knobs is the sweet spot.** Five is too busy, one is\nnot worth a panel.\n\n### Step 3 — Lift hard-coded values into custom properties\n\nOpen `assets/wrap.html`'s `<style>` block — copy its custom-property\nnaming scheme (`--accent`, `--scale`, etc.). In the user's artifact,\nfind every place those concerns live and rewrite:\n\n- `color: #c96442` → `color: var(--accent)`\n- `font-size: 18px` → `font-size: calc(18px * var(--scale))`\n- `padding: 24px 32px` → `padding: calc(24px * var(--density)) calc(32px * var(--density))`\n- `transition: opacity 200ms` → `transition: opacity calc(200ms * var(--motion-mult))`\n\nIf the artifact uses `clamp()` or `vw` already, multiply the\n*outer* value by the custom property — don't tear apart `clamp(...)`.\n\n### Step 4 — Paste into the wrap\n\nCopy the artifact's `<style>` and `<body>` into the marked regions\nof `wrap.html`. Keep the panel + bridge intact.\n\n### Step 5 — Test the loop\n\nOpen the result, click each knob at least once, refresh the page,\nconfirm the choice persists. If a knob breaks the layout —\n*remove it*, don't ship it.\n\n## Output contract\n\n```\n<artifact identifier=\"tweaks-<artifact-slug>\" type=\"text/html\" title=\"<Artifact Title> · Tweaks\">\n<!doctype html>\n<html>...</html>\n</artifact>\n```\n\nOne sentence before the artifact (\"Wrapped X with a 3-knob tweak\npanel — accent / scale / mode.\"). Stop after `</artifact>`.\n\n## Hard rules\n\n- **Don't ship a free color picker** — only curated swatches. Users\n  pick bad colors when given freedom; saving them from that is the\n  whole point.\n- **Persist by artifact identifier** — `tweaks-<slug>`, not a global\n  key. Two artifacts open in two tabs must not share state.\n- **Respect `prefers-reduced-motion`** — default to *Off* for motion\n  if the user has that set, override only on explicit click.\n- **Single-file** — no external CSS / JS / fonts beyond the artifact's\n  existing imports. Inline the panel + bridge.\n- **Panel hidden by default on viewports < 720px** — slide-in drawer\n  via a \"T\" button at top-right.\n- **Don't ship more than 5 knobs.** Three is the sweet spot.","tags":["tweaks","open","design","nexu-io","agent-skills","ai-agents","ai-design","byok","claude","claude-code-for-design","claude-design","coding-agents"],"capabilities":["skill","source-nexu-io","skill-tweaks","topic-agent-skills","topic-ai-agents","topic-ai-design","topic-byok","topic-claude","topic-claude-code-for-design","topic-claude-design","topic-coding-agents","topic-design-systems","topic-design-tools","topic-desktop-app","topic-figma-alternative"],"categories":["open-design"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/nexu-io/open-design/tweaks","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add nexu-io/open-design","source_repo":"https://github.com/nexu-io/open-design","install_from":"skills.sh"}},"qualityScore":"0.700","qualityRationale":"deterministic score 0.70 from registry signals: · indexed on github topic:agent-skills · 36607 github stars · SKILL.md body (7,665 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-11T06:52:27.373Z","embedding":null,"createdAt":"2026-05-01T18:52:34.191Z","updatedAt":"2026-05-11T06:52:27.373Z","lastSeenAt":"2026-05-11T06:52:27.373Z","tsv":"'0.75':481 '0.85':427,433 '0s':609 '1':95,337,665,775,785,830 '1.0':428,435,483,617 '1.15':429,437 '1.4':485 '1.6':624 '15':455 '2':121,331,423,530,673,726,793,807 '20':228 '2c4d8e':378 '3':466,693,799,834,902,919 '3a3a3a':396 '4':525,703 '4a7a3f':384 '5':314,328,344,583,724,728 '7a3f6a':390 '8':345 '80':219 'accent':14,116,175,338,339,367,403,411,676,754,824,831 'acquir':776 'adjust':174 'agent':46,253 'alon':260 'alreadi':557,865 'also':504,610 'anim':605,615,892 'animation-dur':604 'appli':750,811 'array':708 'articl':845 'artifact':5,54,99,154,161,278,294,323,400,545,556,619,671,720,778,814,828,840,853,871,888 'assets/wrap.html':651,705,929 'attr':572 'audienc':240 'author':621,873 'back':765 'bad':360 'balanc':306 'base':517,563 'beyond':454,456 'blame':363 'border':413 'bound':134 'brand':236 'break':460 'breakpoint':463 'bridg':145,656,739 'busi':911 'c96442':372 'calc':448 'canvas':613 'care':305 'chang':148,761 'chat':798 'choic':207,577 'clutter':333 'cobalt':376,380 'code':410,687,923 'color':15,340,353,361,552,832 'column':461 'compact':432 'consist':855 'const':366 'contain':89,513 'content':696 'control':13,61,133,759 'convert':692 'count':465 'critic':512 'critiqu':783,899 'css':23,64,113,593,816 'cta':419 'curat':346 'custom':24,65,114,137,520,681,926 'dark':528,539,564,874 'dashboard':103,860 'data':307,535,571 'data-attr':570 'data-mod':534 'decid':715,808,821 'decis':110 'deck':102,846,859 'declar':442,490,515,607 'decor':614 'default':173,202,635,901 'degrad':311 'demo':261 'dens':866 'densiti':18,118,177,467,469,494,849 'deriv':882 'design':40,79,234 'dial':224 'disabl':611 'document.documentelement.style.setproperty':753 'drawer':127 'driven':844 'durat':603,606 'e.g':262,285,301 'edit':704 'element':542 'event':762 'everi':147,206,509,757 'everywher':404 'exist':670 'explor':36 'expos':766 'feel':242 'file':91,787 'first':748,817 'five':908 'fix':124,299 'flip':421 'flow':462 'folder':792 'font':440 'font-siz':439 'form':132,758 'fragil':507 'free':352 'gap':488,856 'generat':215,800 'generous':436 'go':453 'graphit':394,398 'hard':409,686,922 'hard-cod':408,685,921 'help':291 'hex':688 'hide':194 'highest':499 'highest-impact':498 'html':4,53,90,672,795 'huashu':78 'huashu-design':77 'id':369,375,381,387,393 'identifi':155 'impact':500 'implement':648 'index.html':788 'inert':659 'infograph':303 'inspir':74 'instant':188 'instead':246 'iter':283 'job':662 'js':144,365 'json':746 'keep':710 'key':106,151,732,745 'knob':309,316,501,707,713,810,820,903 'label':373,379,385,391,397 'land':100,861 'last':227 'layer':94 'layout':459,468,511 'layout-crit':510 'let':33 'lift':674,920 'light':527,537 'like':218 'line':464 'link':414 'listen':755 'live':11,60,245,587,623 'load':742 'localstorag':32,73,150,743 'map':590 'margin':489 'mark':699 'matter':332,727 'media':561 'media-query-bas':560 'mode':119,178,526,536,565,677,867,875 'motion':19,120,179,584,596,629,634,884 'motion-mult':595 'mult':597 'multipli':443,491 'must':514 'normal':434,471,482 'npx':689 'nrem':690 'one':276,912 'one-shot':275 'open':159,928 'option':780 'origin':98 'os':582 'pad':487,857 'page':101,205,848 'paint':749 'panel':9,58,122,182,197,655,769,917 'paramet':288 'parameter':12 'past':694,794 'patch':729 'pattern':81 'persist':30,71,146,209 'pick':317,358 'picker':354 'piec':265 'play':270 'plum':388,392 'portfolio':264 'prefer':170,632,647 'prefers-reduced-mot':631 'present':232 'preset':368 'press':191 'price':847 'primit':649 'produc':84 'project':786,791 'prompt':44 'properti':25,66,115,138,521,682,927 'pull':416 'pull-quot':415 'queri':562 'quot':417 'r':198,771 'ratio':300 're':43,105,231,250,255,879 're-key':104 're-prompt':42 're-run':249 'read':111,650,812 'real':27,68 'reduc':633 'refresh':203 'regardless':644 'region':700 'regress':336 'relev':717 'render':166 'replac':566 'report':898,900 'rerend':190 'reset':200,772 'respect':630 'respond':549 'reveal':195 'rewrit':22,63 'rhythm':858 'roomi':472,484 'root':547 'rule':418 'run':251 'runbook':287,864 'rust':370,374 'sage':382,386 'save':169 'scale':17,117,176,424,426,446,450,479,599,679,836,894 'search':683 'see':163 'select':342 'selector':548 'self':88 'self-contain':87 'sensibl':172 'set':431,474,533,553,589,643 'ship':256,326,350,653,723 'shot':277 'side':8,57 'sidebar':125 'singl':86 'size':441 'skill':49,784 'skill-tweaks' 'slower':625 'slug':736 'small':129 'someth':216 'source-nexu-io' 'space':478,518,678 'spot':907 'stage':96,165,186 'stand':259 'stand-alon':258 'standard':315 'state':531 'static':897 'step':774,806,918 'storag':731,744 'store':646 'subset':319 'subtl':586,616 'suit':321 'swap':476 'swatch':347 'sweet':906 'system':235 'take':666 'templat':660 'theme':20 'three':430,473,588 'tight':470,480 'time':28,69,622,835 'tini':141 'togeth':422 'toggl':532,768 'token':876 'topic-agent-skills' 'topic-ai-agents' 'topic-ai-design' 'topic-byok' 'topic-claude' 'topic-claude-code-for-design' 'topic-claude-design' 'topic-coding-agents' 'topic-design-systems' 'topic-design-tools' 'topic-desktop-app' 'topic-figma-alternative' 'transit':602,626,891 'transition-dur':601 'turn':805 'tweak':1,48,80,737 'two':93,551 'type':16,425,843 'type-driven':842 'uniqu':735 'updat':187 'us':47 'use':212,274,401,833 'user':35,157,214,356,575,640,668 'val':371,377,383,389,395 'valu':296,751,924 'vanilla':143 'vanilla-j':142 'var':402,445,449,493 'variabl':594 'variant':37,244 'version':573 'via':139,447 'viewer':268 'viewport':130 'visibl':628 'visual':109 'viz':308 'vs':538 'want':222,238,267 'watch':184 'webgl':612 'will':880 'win':579 'without':41 'won':280 'workflow':773 'worth':893,915 'would':310 'wrap':2,51,524 'wrap.html':702,741 'write':764 'yes':822,825,837,850,868,885 '参数化变体面板':50","prices":[{"id":"1056b360-5d5b-47c1-b571-334efa5a537f","listingId":"8ebbd45e-7fe7-4263-a5da-299cfad47383","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"nexu-io","category":"open-design","install_from":"skills.sh"},"createdAt":"2026-05-01T18:52:34.191Z"}],"sources":[{"listingId":"8ebbd45e-7fe7-4263-a5da-299cfad47383","source":"github","sourceId":"nexu-io/open-design/tweaks","sourceUrl":"https://github.com/nexu-io/open-design/tree/main/skills/tweaks","isPrimary":false,"firstSeenAt":"2026-05-01T18:52:34.191Z","lastSeenAt":"2026-05-11T06:52:27.373Z"},{"listingId":"8ebbd45e-7fe7-4263-a5da-299cfad47383","source":"skills_sh","sourceId":"nexu-io/open-design/tweaks","sourceUrl":"https://skills.sh/nexu-io/open-design/tweaks","isPrimary":true,"firstSeenAt":"2026-05-07T20:42:46.426Z","lastSeenAt":"2026-05-07T22:41:47.246Z"}],"details":{"listingId":"8ebbd45e-7fe7-4263-a5da-299cfad47383","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"nexu-io","slug":"tweaks","github":{"repo":"nexu-io/open-design","stars":36607,"topics":["agent-skills","ai-agents","ai-design","byok","claude","claude-code-for-design","claude-design","coding-agents","design-systems","design-tools","desktop-app","figma-alternative","generative-ai","hermes-agent","local-first","nextjs","no-code","prototyping","ui-generator","vibe-coding"],"license":"apache-2.0","html_url":"https://github.com/nexu-io/open-design","pushed_at":"2026-05-11T06:48:43Z","description":"🎨 Local-first, open-source alternative to Anthropic's Claude Design. ⚡ 19 Skills · ✨ 71 brand-grade Design Systems 🖼 Generate web · desktop · mobile prototypes · slides · images · videos · HyperFrames 📦 Sandboxed preview · HTML/PDF/PPTX/MP4 export 🤖 Runs on Claude Code / Codex / Cursor / Gemini / OpenCode / Qwen / Copilot / Hermes / Kimi CLI.","skill_md_sha":"bf2809e69f36601b6f408e2c135c04683d046ea3","skill_md_path":"skills/tweaks/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/nexu-io/open-design/tree/main/skills/tweaks"},"layout":"multi","source":"github","category":"open-design","frontmatter":{"name":"tweaks","description":"Wrap any HTML artifact with a side panel of live, parameterized\ncontrols — accent color, type scale, density, motion, theme — that\nrewrite CSS custom properties in real time and persist to\nlocalStorage. Lets the user explore variants of a design without\nre-prompting the agent. Use when the brief asks for \"variants\",\n\"side-by-side options\", \"tweak this\", \"let me adjust\", \"live\nknobs\", or \"实时调参\"."},"skills_sh_url":"https://skills.sh/nexu-io/open-design/tweaks"},"updatedAt":"2026-05-11T06:52:27.373Z"}}