enliven
БесплатноЗапускает вложенные скриптыНе проверенMake an Electron or web app measurably faster without losing a feature, and prove it. The agent builds a repeatable A/B harness that drives the real…
от proxysoul★ 30 звёзд на GitHubОб этом скилле
Enliven
Turns "make the app fast" into a number you can defend. The output is three things: root causes named at file:line, a harness anyone can re-run, and an HTML report whose every figure comes from a JSON file the harness wrote.
It is distilled from a real Electron audit where the first two attempts failed independent review. Every rule below is a mistake that got caught. Follow them up front and skip those rounds.
ensoul gives a product a soul, immune-system keeps it well, and this one makes it lively: an app that answers the instant you touch it and carries no weight it does not need. Same construction as ensoul, same idea one step further in: not what it looks like, but how alive it feels to use, proved with numbers rather than asserted.
The shape of the work is one loop: measure → find the cause → fix the cause → measure the same way → report honestly. Never skip a step, never reorder, and never let the report get ahead of the data.
The short path
The scripts in scripts/ are the audit already written down. Do not rebuild them from scratch; the exploration is what took the time, and it is already spent.
cp scripts/profile.example.mjs perf-profile.mjs # fill in: entry, selectors, phases, cycle
node scripts/perf-ab.mjs --profile=./perf-profile.mjs --app=<build> --label=before --out=./perf
node scripts/style-trace.mjs --profile=./perf-profile.mjs --app=<build> --phase=<worst phase> --out=./perf/style-trace.json
node scripts/cpu-profile.mjs --profile=./perf-profile.mjs --app=<build> --phase=<worst phase> --out=./perf/worst.cpuprofile
node scripts/cpu-analyze.mjs ./perf/worst.cpuprofile --mode=summary --root="$PWD"
node scripts/cpu-analyze.mjs ./perf/worst.cpuprofile --mode=longtasks --root="$PWD"
node scripts/trace-analyze.mjs ./perf/style-trace.json --mode=selectors
node scripts/frame-probe.mjs --profile=./perf-profile.mjs --app=<build> --after=<phase> --label=frames-before --out=./perf/frames-before.json
# fix what the trace or profile names, rebuild from a purged output directory
node scripts/look-equivalence.mjs --profile=./perf-profile.mjs --app=<build> --css=./perf/fix.css --out=./perf/look
node scripts/perf-ab.mjs --profile=./perf-profile.mjs --app=<build> --label=after --out=./perf
node scripts/perf-report.mjs --before=./perf/before.json --after=./perf/after.json \
--changes=./perf/changes.json --out=./perf/report.html
Writing perf-profile.mjs is the only real work: name the phases people actually perform, and make the leak cycle end where it began. Read reference/traps.md first, in full. Every line in it cost a failed review.
frame-probe.mjs and look-equivalence.mjs share harness.mjs and find playwright-core from --app, so they run straight from the skill folder. Give the profile an optional focus(context, focused) hook (tell the app it lost focus the way the OS would) and a looks map of named states (light, dark, a panel open) for them to use.
These scripts have been run end to end against a real Electron build, not just written: a five-phase profile produced boot timings, per-phase CDP counters, a three-cycle leak series with flat node counts, and an HTML page. On that run the orphan count came back at 866 files and 43 MB, which was correct: the output directory had accumulated stale chunks from earlier builds. Purge it before you trust any bundle number, exactly as Phase 4 says.
The phases below explain why each script does what it does. Read them when something does not fit your app, not before your first run.
Phase 1: Build the harness before you look at any code
The first instinct is to open a profiler and start reading flame graphs. Resist it. A flame graph of one run on a busy laptop tells you nothing you can defend later. Build the measuring instrument first, and make it produce a JSON file.
One script, checked into the repo, that takes --app=<dir> --label=<name> --out=<dir> --repeats=N and writes <label>.json. It must:
- Launch the real production build, not a dev server and not a test renderer. Optimisations that only exist in a dev build are not optimisations. For Electron, Playwright's
_electron.launchagainst the built main entry. - Run every phase N times and report the median. Three is the floor. A single run on a shared machine moves by tens of percent.
- Read the engine's own counters, not a stopwatch. Over the DevTools protocol,
Performance.getMetricsgivesTaskDuration,ScriptDuration,RecalcStyleDuration,LayoutDuration,RecalcStyleCount,LayoutCount,Nodes,JSEventListeners,JSHeapUsedSize. Those last four are the leak triad plus the DOM size. - Count renders without React DevTools. Install a
window.__REACT_DEVTOOLS_GLOBAL_HOOK__stub in an init script withsupportsFiber, arenderersMap,inject, andonCommitFiberRoot. Counting commits is one line. Walking the fiber tree forflags & PerformedWorkgives per-component render c
Установить enliven в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл enliven?
Make an Electron or web app measurably faster without losing a feature, and prove it. The agent builds a repeatable A/B harness that drives the real production build through Playwright and reads Chromium's own counters over the DevTools protocol, finds the cause of the cost with a Blink style-invalidation trace, a React commit probe and a frame, wake-up and GPU probe instead of guessing, proves a fix keeps the look pixel for pixel, fixes root causes, re-measures the same way, and writes a self-contained HTML report that shows the regressions as loudly as the wins. Use when the user asks to profile, speed up, slim down, find memory leaks in, or benchmark before and after on a desktop or web app, or asks for a performance report.
Как установить скилл enliven?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл enliven запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
от AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
от Anthropicxlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
от Anthropicpptx
Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…
от Anthropic