performance

GitHub

优化前端UI性能以符合Core Web Vitals标准,涵盖加载策略、布局偏移预防及动画优化,旨在提升低配设备上的页面速度与交互流畅度。

.claude/skills/performance/SKILL.md plugin87/ux-ui-agent-skills

触发场景

用户希望提升页面加载速度或减少卡顿 需要修复布局偏移(CLS)或优化动画性能

安装

npx skills add plugin87/ux-ui-agent-skills --skill performance -g -y
更多选项

非标准路径

npx skills add https://github.com/plugin87/ux-ui-agent-skills/tree/main/.claude/skills/performance -g -y

不安装直接使用

npx skills use plugin87/ux-ui-agent-skills@performance

指定 Agent (Claude Code)

npx skills add plugin87/ux-ui-agent-skills --skill performance -a claude-code -g -y

安装 repo 全部 skill

npx skills add plugin87/ux-ui-agent-skills --all -g -y

预览 repo 内 skill

npx skills add plugin87/ux-ui-agent-skills --list

SKILL.md

Frontmatter
{
    "name": "performance",
    "description": "Optimize UI performance against Core Web Vitals (LCP, INP, CLS) with loading\/code-split strategy, layout-shift prevention, and animation performance rules. Use when the user wants to improve speed, fix jank or layout shift, hit Web Vitals budgets, or make a UI feel fast on low-end devices."
}

Skill: Performance

Step 0: is the kit here? This skill reads files from the kit. Check once: ls ${CLAUDE_SKILL_DIR}/../../../tokens >/dev/null 2>&1 && echo KIT_OK || echo KIT_MISSING On KIT_MISSING only the skill folders were installed, which is what npx skills add does. Say so plainly, point the user at npx ux-ui-agent-skills init or the plugin install, and stop. Do not guess the contents of a file you could not open.

Make the UI fast and stable. Treat performance as an accessibility concern: slow/janky UIs fail low-end devices first.

Steps

  1. Read ${CLAUDE_SKILL_DIR}/../../../workflows/performance.md (Core Web Vitals targets, loading strategy, layout-shift, animation perf, design-system runtime cost).
  2. Diagnose against budgets: LCP ≤ 2.5s, INP ≤ 200ms, CLS ≤ 0.1. Measure on a mid-tier mobile profile (throttle slow 4G + 4× CPU).
  3. Loading: render above-fold first (SSR/Server Components), code-split by route + heavy widget, lazy-load below-fold/behind-interaction (Astro islands / Qwik), preload one critical font weight, modern responsive images.
  4. Kill layout shift: size skeletons to final dimensions, reserve media space via aspect-ratio (${CLAUDE_SKILL_DIR}/../../../tokens/sizing.json), never inject content above existing.
  5. Animation: only transform/opacity, will-change sparingly, 100-300ms (${CLAUDE_SKILL_DIR}/../../../tokens/motion.json), honor prefers-reduced-motion. Prefer CSS state styling over JS for low INP; tree-shake/per-component imports.

Verification (definition of done)

  • Lighthouse / field data meets LCP ≤ 2.5s, INP ≤ 200ms, CLS ≤ 0.1 on mid-tier mobile.
  • First interaction stays responsive under slow-4G + 4× CPU throttle.
  • Skeletons + media reserve space (zero CLS on load); no non-compositor animation in loops.

版本历史

  • def84a7 当前 2026-11-03 02:21

    统一文档与代码中的连字符格式,移除旧版封面HTML并更新截图逻辑,确保构建测试通过。

  • 62092bd 2026-10-19 09:19
  • 2ffb677 2026-08-28 11:59
  • 93a7fbb 2026-07-25 07:41

同 Skill 集合

.claude/skills/a11y-audit/SKILL.md
.claude/skills/apply-aesthetic/SKILL.md
.claude/skills/brandkit/SKILL.md
.claude/skills/critique/SKILL.md
.claude/skills/design-code/SKILL.md
.claude/skills/design-component/SKILL.md
.claude/skills/design-doctrine/SKILL.md
.claude/skills/design-qa/SKILL.md
.claude/skills/design-review/SKILL.md
.claude/skills/design-tokens/SKILL.md
.claude/skills/figma-integration/SKILL.md
.claude/skills/gate/SKILL.md
.claude/skills/governance/SKILL.md
.claude/skills/grill-me/SKILL.md
.claude/skills/image-to-code/SKILL.md
.claude/skills/migrate-design-system/SKILL.md
.claude/skills/observe/SKILL.md
.claude/skills/prototype/SKILL.md
.claude/skills/redesign/SKILL.md
.claude/skills/scaffold-project/SKILL.md
.claude/skills/ship/SKILL.md
.claude/skills/token-build/SKILL.md
.claude/skills/ux-writing/SKILL.md
.claude/skills/data-dashboard/SKILL.md
.claude/skills/design-screen/SKILL.md

元信息

文件数
0
版本
def84a7
Hash
469d82e5
收录时间
2026-07-25 07:41

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-11-04 13:48
浙ICP备14020137号-1