apply-tweaks
Skill0 starsChanged 8 days agoMITView on GitHub
Apply buffered tweaks from pending.yaml to the source HTML file. Invoked when user says "save tweaks", "apply tweaks", "persist panel changes", or runs /apply-tweaks.
1 other project uses a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- bluzir/claude-code-designedited, first seen Apr 20, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 1
- bluzir/claude-code-design★ 10270% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository30 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- animated-videoSkill
- apply-editsSkill
- copy-exampleSkill
- create-design-systemSkill
- doctorSkill
- export-pdfSkill
- export-pptxSkill
- export-standaloneSkill
- governance-reviewSkill
- handoffSkill
- ingest-documentSkill
- ingest-figmaSkill
- ingest-githubSkill
- ingest-screenshotSkill
- inspectSkill
- interactive-prototypeSkill
- live-reloadSkill
- local-commentsSkill
- make-deckSkill
- make-editableSkill
- make-tweakableSkill
- publishSkill
- register-assetSkill
- ship-branchSkill
- snapshotSkill
- sync-design-systemSkill
- use-design-systemSkill
- verify-artifactSkill
- wireframeSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 1 is distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 17
If skipping date match (e.g.
- Very specific: line 26
If pending.yaml is missing or empty — report "no pending tweaks" and stop.
- Very specific: line 32
Validate with code (all or nothing): if the tweaks came from pasted chat text, first Write them to pending.yaml.
- Very specific: line 44
If no pattern matches for a key → fail loudly (HTML didn't use /make-tweakable pattern)
- Distinctive: line 78
If user says "revert last tweaks":
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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.
Files
Apply Tweaks
Persist queued tweak changes (in pending.yaml) back to the source HTML via Edit. Pattern from claude-pipe: files are state, Claude is the writer.
Session lookup
session-id for <html-path> = tweaks-{slugify(basename html-path without ext)}-{today YYYYMMDD}.
Session dir: artifacts/tweaks/<session-id>/.
If skipping date match (e.g. resume from yesterday), Bash(ls artifacts/tweaks/) and find the most recent matching prefix.
Pipeline
- Read session state:
IfRead artifacts/tweaks/<session-id>/state.yaml Read artifacts/tweaks/<session-id>/pending.yamlpending.yamlis missing or empty — report "no pending tweaks" and stop. - Read HTML + schema:
Readthe target HTML (path from state.yaml or$0)- Extract the
__tweak_schemablock (JSON inside<script id="__tweak_schema">)
- Validate with code (all or nothing): if the tweaks came from pasted chat text, first
Writethem topending.yaml. Then run:Bash(node scripts/validate-pending.mjs tweaks artifacts/tweaks/<session-id>/pending.yaml --html <html-path>)- Non-zero exit: stop. Show the script's output (one line per invalid key) to the user. Do not apply a partial set and do not repair values yourself.
- Exit 0: the JSON on stdout (
{key, type, value}per entry) is the only thing you may apply. The script checks key names ([A-Za-z0-9_-]+), that each key exists in__tweak_schema, and the typed value rules (color=#rrggbb;numberwithin[min..max];boolean;enumone ofoptions;stringplain text ≤maxLength, default 200, no<,>or newline).
- Apply: before each
Edit, read the previous value of that key from the HTML you already read (the--tweak-<key>value, the schema"default", the attribute, or the element text, whichever the key type uses) and remember it asprevious. Then for each validated key → value, by type:color/number/boolean— CSS var on:root: find--tweak-<key>: <old>;andEditto new value, and update"default"for that key in the__tweak_schemablock. The panel re-applies every schema default on load as an inline style on<html>, so a stale default would silently override the CSS var you just edited (boolean: the class toggle also starts from the default)enum—Editthe schema"default"and, if the root element carriesdata-tweak-<key>="…", that attributestring—Editthe text content of every element matchingtarget(default[data-tweak="<key>"]) and the schema"default"- Marker block fallback:
<!-- tweak:<key> -->...<!-- /tweak:<key> -->→Editthe content inside - If no pattern matches for a key → fail loudly (HTML didn't use
/make-tweakablepattern)
- Atomic write via Edit: each
Editis already atomic in Claude Code, so no tmp-rename dance needed. - Append to log:
One entry per changed key, values as JSON scalars.Bash(date -u +%Y%m%dT%H%M%SZ) → use the printed value as <ts> (no shell substitution) Write artifacts/tweaks/<session-id>/applied/<ts>.yaml: applied_at: <ts> changes: - key: primaryColor value: "#0a5c36" previous: "#D97757" - key: dark value: true previous: falsepreviousis always the value read from the HTML before the edit, never a guess. - Clear pending:
Write artifacts/tweaks/<session-id>/pending.yamlwith empty content (or{}) - Update state:
Edit artifacts/tweaks/<session-id>/state.yaml: phase: idle → idle (no-op but bump timestamp) last_applied_at: <ts> - Verify:
/done <html-path>— confirms file still renders, new values visible in preview. - Report: "Applied N tweaks. Logged to
artifacts/tweaks/<session-id>/applied/<ts>.yaml. Pending cleared."
Revert path
If user says "revert last tweaks":
Bash(ls artifacts/tweaks/<session-id>/applied/)— the filenames areYYYYMMDDTHHMMSSZ.yaml, so the last one in name order is the most recentReadthat file — get the delta ({key, value, previous}per change)- Build a pending set with every key's value set to its logged
previous,Writeit topending.yaml(format:key: <JSON value>per line), and runBash(node scripts/validate-pending.mjs tweaks artifacts/tweaks/<session-id>/pending.yaml --html <html-path>); stop on a non-zero exit. Then apply the validated set exactly as in Pipeline step 4. If a log entry has noprevious(older log), stop and tell the user — do not guess a value. - Append a new applied entry with
type: revertand reference to reverted file /done
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
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.

