Fixing Motion Performance Skill Security Audit
What the author says it does (original text)
Audit and fix animation performance issues including layout thrashing, compositor properties, scroll-linked motion, and blur effects. Use when animations stutter, transitions jank, or reviewing CSS/JS animation performance.
No obvious risks found in this check
- Files checked
- 1
- Risks found
- 0
Inside this skill
This Skill is a set of front-end animation performance review and modification guidelines; when a user supplies a file, it calls for exact violations, a short reason, and a code-level fix.
View source
- `/fixing-motion-performance <file>` Review the file against all rules below and report: - violations (quote the exact line or snippet) - why it matters (one short sentence) - a concrete fix (code-level suggestion)Its main guidance favors transform and opacity and rejects interleaved layout reads/writes, animation loops without stop conditions, and animation driven directly by scroll events.
View source
- do not interleave layout reads and writes in the same frame- do not animate layout continuously on large or meaningful surfaces- do not drive animation from scrollTop, scrollY, or scroll events- no requestAnimationFrame loops without a stop condition- do not mix multiple animation systems that each measure or mutate layout- default to transform and opacity for motion- use JS-driven animation only when interaction requires it- paint or layout animation is acceptable only on small, isolated surfaces- one-shot effects are acceptable more often than continuous motion- prefer downgrading technique over removing motion entirelyIt limits the modification scope: animation libraries should not be migrated unless explicitly requested, and the rules should be applied within the existing animation system without mixing API styles in one component.
View source
### 9. tool boundaries (critical)- do not migrate or rewrite animation libraries unless explicitly requested- apply these rules within the existing animation system- never partially migrate APIs or mix styles within the same componentThe supplied CSS and JavaScript are explicitly presented as common-fix examples, showing replacement of width animation with transform and measurement followed by transform animation; the text does not instruct command execution, network access, credential access, or data upload.
View source
## common fixes```css/* layout thrashing: animate transform instead of width *//* before */ .panel { transition: width 0.3s; }/* after */ .panel { transition: transform 0.3s; }```js// measurement: batch reads before writes (FLIP)// before — layout thrashel.style.left = el.getBoundingClientRect().left + 10 + 'px';// after — measure once, animate via transformconst first = el.getBoundingClientRect();el.classList.add('moved');const last = el.getBoundingClientRect();el.style.transform = `translateX(${first.left - last.left}px)`;requestAnimationFrame(() => { el.style.transition = 'transform 0.3s'; el.style.transform = ''; });```Files and check records1 files
Coverage and gaps
Content covered in each file
These are the source ranges included in this check, not a guarantee that every issue has been resolved.
SKILL.mdFull text included
This report is for the version above. We read the available code and instructions without running the skill or checking extra packages it installs. This is not a promise of safety: a different version or setup may behave differently.
SKILL.mdInstructions
- Lines read
- 152
- File checksum (to compare versions)
- e84e0ba71e7de9f47d1c6810c2c7a625baf930db02a7b275031d7a9b5effa7d6