Analyzes frontend performance issues (LCP, FCP, CLS, bundle size) and suggests prioritized, practical optimizations for loading and runtime efficiency.
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install frontend-performance或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install frontend-performance⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/frontend-performance/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: frontend-performance description: Analyzes and improves frontend performance: LCP, FCP, CLS, bundle size, lazy loading, and runtime efficiency. Use when 性能优化, 首屏慢, 卡顿, 打包体积, performance optimization, or improving Core Web Vitals. ---
围绕加载性能与运行性能,给出可落地的优化方案与优先级。
| 问题 | 常见原因 | 优化方向 | |------|----------|----------| | LCP 慢 | 大图、阻塞渲染、服务端慢 | 图片优化、优先关键资源、SSR/预取 | | FCP 慢 | JS/CSS 阻塞、首屏依赖多 | 拆包、关键 CSS 内联、延迟非关键 | | TTI 长 | 主线程长任务、大 bundle | 代码分割、懒加载、减少主线程工作 |
| 问题 | 常见原因 | 优化方向 | |------|----------|----------| | CLS 高 | 无尺寸图片/字体、动态插入内容 | 宽高比/尺寸、font-display、预留占位 | | 滚动/操作卡顿 | 重排多、长任务、大列表 | 虚拟列表、防抖节流、requestAnimationFrame、减少 reflow |
| 问题 | 优化方向 | |------|----------| | JS 体积大 | 按路由/按需拆包、tree-shaking、替换大依赖、分析 bundle | | 图片大 | 格式(WebP/AVIF)、尺寸、懒加载、CDN | | 请求多 | 合并、缓存策略、预连接/preload |
@next/bundle-analyzer)看大模块
每个方案注明:
## 性能优化报告
### 现状
- 指标或现象:…
- 主要瓶颈:…
### 优化方案(按优先级)
| 方案 | 收益 | 成本 | 优先级 |
|------|------|------|--------|
| 1. … | … | … | 高/中/低 |
| 2. … | … | … | … |
### 建议落地顺序
1. …
2. …
### 验证方式
- 优化后建议复测:Lighthouse、Performance、关键操作耗时
dynamic 懒加载、Image 组件、分析 next/bundle-analyzer
安装 Frontend Performance 后,可以对 AI 说这些话来触发它
Help me get started with Frontend Performance
Explains what Frontend Performance does, walks through the setup, and runs a quick demo based on your current project
Use Frontend Performance to analyzes frontend performance issues (LCP, FCP, CLS, bundle size) a...
Invokes Frontend Performance with the right parameters and returns the result directly in the conversation
What can I do with Frontend Performance in my developer & devops workflow?
Lists the top use cases for Frontend Performance, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/frontend-performance/ 目录(个人级,所有项目可用),或 .claude/skills/frontend-performance/(项目级)。重启 AI 客户端后,用 /frontend-performance 主动调用,或让 AI 根据上下文自动发现并使用。
Frontend Performance 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
Frontend Performance 可免费安装使用。请查阅仓库了解许可证信息。
Analyzes frontend performance issues (LCP, FCP, CLS, bundle size) and suggests prioritized, practical optimizations for loading and runtime efficiency.
Frontend Performance 属于「Developer & DevOps」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my developer & devops tasks using Frontend Performance
Identifies repetitive steps in your workflow and sets up Frontend Performance to handle them automatically