performance
Skill77 starsChanged 20 days agoMITView on GitHub
Measuring and improving HAEO's speed — optimization cycle time, input loading on the event loop, LP rebuild and solve time, output sensor building, pytest-benchmark model benchmarks, and profiling with cProfile. Use when asked to make something faster, when a change could affect solve or load time, when Home Assistant reports a slow or blocking update, or before claiming a performance improvement.
86 other projects use a version of this.
Adopted by
Most recently taken up by
- arxdsilva/ai-loopstheir own version, first seen Nov 16, 2026
- Ajustor/claude-skillstheir own version, first seen Nov 16, 2026
- jestermaxdelta/roblox-building-skilltheir own version, first seen Nov 16, 2026
- Ivan-propio/claude-skillstheir own version, first seen Nov 16, 2026
- Birdiz/skillstheir own version, first seen Nov 16, 2026
- aazirani/flutter_agentifytheir own version, first seen Nov 15, 2026
Used with
Projects with it also use app-brief, design-from-app and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
StijnusSkillapp-brief
One-page brief (docs/BRIEF.md) for a new macOS app, written before any code. Use when the user has an app idea, wants to replace an app they pay for, or the research and clone skills are done.
Also in 3 projects that use this
StijnusSkilldesign-from-app
Rebuild the look of an app the user likes as a native SwiftUI design kit, by measuring its screenshots (sizes, spacing, type, colors, icons), building its parts, and comparing pixel by pixel until they match. Use when the user names an app whose look they want, shares screenshots of one, or says "make it look like X".
Also in 3 projects that use this
FlorianBruniauxSkilltdd-rust
Also in 3 projects that use this
RodrigoTomeESSkillweb-quality-audit
Comprehensive web quality audit covering performance, accessibility, SEO, and best practices. Use when asked to "audit my site", "review web quality", "run lighthouse audit", "check page quality", or "optimize my website".
Also in 9 projects that use this
launchapp-devSkilllayout-grid
Define responsive layout grid systems with columns, gutters, margins, and breakpoint behavior.
Also in 3 projects that use this
MohamedAbdallah-14Skillapp-icon
Generate an app icon from a single 1024² master and fan out to iOS (AppIcon.appiconset with squircle-ready 1024 opaque), Android (adaptive foreground + background + Android 13 monochrome), PWA (192/512 + 512 maskable with 80% safe zone), and visionOS (3-layer parallax).
Also in 3 projects that use this
- +1 more from Stijnus
Other versions86 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 86
- rtk-ai/rtk★ 87ksame name
- millionco/react-doctor★ 15ksame name
- midudev/preguntas-entrevista-react★ 7.8ksame name
- BuilderIO/agent-native★ 7.7ksame name
- ethereum/ethereum-org-website★ 6ksame name
- plugin87/ux-ui-agent-skills★ 3.2ksame name
- static-web-server/static-web-server★ 2.4ksame name
- daveebbelaar/bama★ 1.7ksame name
- lichtblick-suite/lichtblick★ 1.2ksame name
- theexperiencecompany/gaia★ 327same name
76 more not listed
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 repository18 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agent-setupSkill
- config-flowSkill
- coverageSkill
- documentationSkill
- elementsSkill
- explain-planSkill
- integrationSkill
- lintSkill
- manifestSkill
- modelSkill
- pythonSkill
- release-notesSkill
- scenariosSkill
- testingSkill
- translationsSkill
- update-docsSkill
- update-versionSkill
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 2 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 58 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
Model rebuild and solve: run in the executor. The network persists between cycles: each horizon roll changes the period widths, which …
- Distinctive: line 16
Output extraction and sensor building: run on the event loop after every solve.
- Very specific: line 32
Run uv run pytest tests/scenarios/test_benchmark.py -m benchmark --benchmark-enable and compare medians against the base branch.
“Common” is measured: kept by at least 6 in 10 of the 58 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Performance work
Stages of an optimization cycle
Measure each stage before choosing what to change; which one dominates depends on the configuration and the path being exercised.
- Input loading runs on the Home Assistant event loop whenever a source entity changes. Forecast integrations write many entities in one pass, so per-change work multiplies by the number of sources in a field.
- Model rebuild and solve run in the executor. The network persists between cycles: each horizon roll changes the period widths, which rebuilds most constraints, and HiGHS then warm starts.
- Output extraction and sensor building run on the event loop after every solve.
- Cold start (network build plus the first solve) happens only at setup or reload.
Rules
- Replace per-period, per-point, and per-row Python loops with numpy operations on whole arrays.
In the model layer this means
LinearArray; themodelskill covers how. - Work done for every element, output, or sensor must not repeat work that is the same for all of them, such as converting horizon timestamps.
- Coalesce bursts of state changes into one reload, but load immediately when an optimization could otherwise read stale inputs.
- A performance change must not change results. Dump every model output before and after across cold solves and horizon rolls and compare them. Costs and primal outputs must match; shadow prices may differ only where the LP is degenerate, and the cause must be explained.
Measuring
- Model benchmarks are disabled by default.
Run
uv run pytest tests/scenarios/test_benchmark.py -m benchmark --benchmark-enableand compare medians against the base branch. - A benchmark round must change something real.
Re-solving unchanged inputs measures a warm no-op, which is why
test_time_shiftalternates between two horizons and updates the periods. - The helpers in
tests/scenarios/test_benchmark.pybuild a network from a scenario without Home Assistant, which suits ad hoc timing andcProfilescripts. - Split solve time from Python time by timing the solver
run()calls insideNetwork.optimize()(theHighssubclass incore/model/solver.py); the remainder is model rebuild.
Profiling pitfalls
- Scenario tests run under freezegun, which also freezes
time.perf_counter. Time withfreezegun.api.real_perf_counter, and expect datetime-heavy code to look several times slower than it is in production. - On Python 3.12 and later,
cProfilerecords every thread, so executor work appears in an event loop profile. Its timings include waiting for the GIL. - Profile the path a user actually hits, such as a burst of source entity changes or a horizon roll, not only a forced re-run with unchanged inputs.
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.

