lighthouse-analysis-optimization
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "lighthouse-analysis-optimization" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-c3e8c250b14c0fa559d8470871175ec7d021e768bf0f20237c215842443b9c18. Verify the upstream source and version against https://skillhub.cn/skills/user_f8e4df6e/lighthouse-analysis-optimization before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
skillhub.cn
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Perform Lighthouse performance audits on any webpage; by default generate a report first, with an option to continue optimizing and modify code.
Introduction source: third_party · user_f8e4df6e · 1.0.0 Reference
SkillPi interpretation
- Tasks
- Translation pending; see source documentation.
- Testing
- Not tested
Browse files
Frontmatter
name: lighthouse-analysis-optimization
description: 对任意网页执行 Lighthouse 性能分析(chrome-devtools-mcp 优先,无 MCP 则 lighthouse CLI)。默认先出审计报告,AskQuestion 询问是否继续优化;继续则确认项目范围、出带文件的优化清单并改代码。主流程见 SKILL.md,细节按阶段读 reference 文件。Use when the user asks to run Lighthouse, analyze page performance, measure LCP/CLS/TTFB, or produce an optimization checklist for a URL.
slug: lighthouse-analysis-optimization
displayName: lighthouse-analysis-optimization
version: 1.0.0
license: MIT
summary: 对任意网页执行 Lighthouse 性能审计;默认先出报告,可选继续优化并改代码。Lighthouse 性能审计
对任意网页做 Lighthouse 性能分析,并在用户确认后落地优化。优先 chrome-devtools-mcp,不可用时回退官方 lighthouse CLI。流程分两阶段:阶段 A 只读审计并输出评分与指标结论;阶段 B 经 AskQuestion 确认后读仓库、给出带「涉及文件」的优化清单,再按用户选择改代码并回归。通用技能,不依赖具体项目或某一 AI 工具。
何时读哪个文件
| 阶段 / 步骤 | 读取 |
|---|---|
| 步骤 2 能力自检 | tools.md |
| 步骤 1–4 审计 | phase-a-audit.md |
| 步骤 5 / 6 / 8 交互 | askquestion.md |
| 步骤 7 优化清单 | phase-b-optimize.md |
| 步骤 9 回归 | regression.md |
| 意图不明时 | examples.md |
阶段 A 只读 tools.md + phase-a-audit.md;进入阶段 B 后再读其余文件。
主流程(严格按序)
| 步 | 阶段 | 动作 | 详见 |
|---|---|---|---|
| 1 | A | 解析输入:URL / 路由 / device / 本地|线上 | phase-a-audit.md |
| 2 | A | 能力自检:MCP 或 CLI | tools.md |
| 3 | A | 执行审计:用户指定 URL;失败重试最多 5 次;MCP 须先 emulate | phase-a-audit.md |
| 4 | A | 输出审计报告:评分、指标、结论;简要摘要无「涉及文件」 | phase-a-audit.md |
| 5 | A→B | AskQuestion:是否继续优化 | askquestion.md |
| 6 | B | AskQuestion:确认项目范围(范围未明时) | askquestion.md |
| 7 | B | 读代码 + 优化清单(带「涉及文件」) | phase-b-optimize.md |
| 8 | B | AskQuestion:选择执行项 | askquestion.md |
| 9 | B | 改代码 + 回归 | regression.md |
意图分支
- 只问是否达标 → 步骤 3、4 后结束;全绿写「达标,无必改项」,跳过 5–9。
- 明确不要优化(「只分析」「不要改代码」)→ 步骤 4 后结束,跳过 5–9。
- 默认(「分析某 URL 性能」)→ 步骤 4 后 AskQuestion 步骤 5;选继续才进入 6–9。
- 一开始就要优化且已指明项目 → 步骤 4 后可跳过步骤 5;改代码前仍须步骤 6(已指明则复述确认)。
全局必守
lab vs field:Lighthouse 是实验室工具;CWV 达标看 CrUX 现场数据。报告全文最多提 1 次,放末尾一句,开头不科普。
输出克制:
- 直接给结论,不复述技能内部流程(「我先 emulate…」)。
- 步骤 5 / 6 / 8 的选项禁止写在报告正文,必须用 AskQuestion。
- 阶段 A 不读仓库、不改文件;线上 URL 5 次不可达禁止代测本地。
- device 与 MCP/CLI 模式一旦选定,全程锁定至回归结束。
- 不自动 commit / push / 部署;用户选「到此为止」立即收束。
禁止输出:无证据的猜测、全绿仍硬凑 P0/P1/P2、冗长 CWV 科普、无关项目代码改动。
示例
见 examples.md。
Current listing version
1.0.0
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 提供 Lighthouse 性能审计与优化能力,解决前端性能优化这一明确刚需场景
- 支持 chrome-devtools-mcp 和 lighthouse CLI 双模式,适应性强
Highlights
- 触发词精准完整,覆盖多种变体(run Lighthouse, analyze page performance, measure LCP/CLS/TTFB, optimization checklist)
- 边界清晰,不易与其他 Skill 重叠
Areas to improve
-
description写错位置 Reported severity: Minor
description 内容出现在 skill_body 内部的 frontmatter 中,而非顶层
Recommendation: 将 description 移至顶层,保持规范
-
文档过长 Reported severity: Minor
主文件内容较长,建议精简或拆分
Recommendation: 适当精简主文件内容,更多依赖 reference 文件
Highlights
- 主流程清晰分阶段,有步骤划分和出口条件
- 引用多个 reference 文件,结构完整
Highlights
- 工具来源明确,有 fallback 机制
- 有重试机制和交互确认机制,覆盖主要异常场景
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.