agentleFS
aiatelieaiatelie/ai-atelie/skills/make-tweakable/SKILL.md

make-tweakable

Skill9 starsChanged 6 months agoMITView on GitHub

Add in-design tweak controls

3 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 3 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    When the user changes a value, apply it live in the page and persist it by calling: window.parent.postMessage({type: …

    line 23
  2. Distinctive:

    Keep the Tweaks surface small — a floating panel in the bottom-right of the screen, or inline handles.

    line 43
  3. Distinctive:

    If the user asks for multiple variants of a single element within a largher design, use this to allow cycling thru the options.

    line 45
  4. Distinctive:

    If the user does not ask for any tweaks, add a couple anyway by default.

    line 46
  5. Very specific:

    Add data-cc-no-inspect="true" to the panel root and the FAB so the editor's inspector skips them.

    line 47

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Tweaks

The user can toggle Tweaks on/off from the toolbar. When on, show additional in-page controls that let the user tweak aspects of the design — colors, fonts, spacing, copy, layout variants, feature flags, whatever makes sense. You design the tweaks UI; it lives inside the prototype. Title your panel/window "Tweaks" so the naming matches the toolbar toggle.

Protocol

  • Order matters: register the listener before you announce availability. If you post __edit_mode_available first, the host's activate message can land before your handler exists and the toggle silently does nothing.
  • First, register a message listener on window that handles: {type: '__activate_edit_mode'} → show your Tweaks panel {type: '__deactivate_edit_mode'} → hide it
  • Then — only once that listener is live — call: window.parent.postMessage({type: '__edit_mode_available'}, '*') This makes the toolbar toggle appear.
  • When the user changes a value, apply it live in the page and persist it by calling: window.parent.postMessage({type: '__edit_mode_set_keys', edits: {fontSize: 18}}, '*') You can send partial updates — only the keys you include are merged.

Persisting state

Wrap your tweakable defaults in comment markers so the host can rewrite them on disk, like this:

const TWEAK_DEFAULS = /*EDITMODE-BEGIN*/{
  "primaryColor": "#D97757",
  "fontSize": 16,
  "dark": false
}/*EDITMODE-END*/;

The block between the markers must be valid JSON (double-quoted keys and strings). There must be exactly one such block in the root HTML file, inside inline <script>. When you post __edit_mode_set_keys, the host parses the JSON, merges your edits, and writes the file back — so the change survives reload.

Tips

  • Keep the Tweaks surface small — a floating panel in the bottom-right of the screen, or inline handles. Don't overbuild.
  • Hide the controls entirely when Tweaks is off; the design should look final.
  • If the user asks for multiple variants of a single element within a largher design, use this to allow cycling thru the options.
  • If the user does not ask for any tweaks, add a couple anyway by default; be creative and try to expose the user to interesting possibilities.
  • Add data-cc-no-inspect="true" to the panel root and the FAB so the editor's inspector skips them.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.