performance-optimize

用于提升系统或应用性能的工具或模块,目标是改进执行效率与响应能力。

仓库最近推送
GitHub Stars
194
Forks
13
Issues / PRs
0

安装方式

先用 Prompt 核对来源与依赖。也可下载安装包。

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "performance-optimize":https://skillpi.com/zh/skills/deepskill-38b7d46a420ec0b3c5e43dae34c141d97ecf0f9751db25836b47aa46f2d9ef4d。安装前核对上游来源和版本:https://github.com/jasonswett/llm-skills。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

来源与配置

github.com

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

用于提升系统或应用性能的工具或模块,目标是改进执行效率与响应能力。

0 下载

介绍来源: third_party · jasonswett · 0.0.1 参考来源

SkillPi 解读

能完成的任务
翻译待完成,请参阅来源文档。
实测状态
未测试

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
Frontmatter
name: performance-optimize
description: "Performance engineer loop — speed, memory, scalability, extra rendering. Find the bottleneck, then ship a measured fix against an explicit target."
disable-model-invocation: true
argument-hint: "[path] [--report-only]"

Performance optimize

Slowness, memory, or extra rendering with a measurable target. No target → agree one before changing code.

$ARGUMENTS is the scope (path / surface) and/or --report-only. --report-only baselines and names the bottleneck; it does not edit.

Hard gates

  • Measure first. A story about what is slow is not a baseline.
  • Fix the bottleneck you measured, not a neighboring one that looks ugly.
  • Re-measure the same probe after the fix. If the number did not move, revert.
  • Do not trade correctness or a hard product rule for a faster path.
  • Do not add a library that duplicates one already in the repo.

1. Target

Write one line before any profile:

  • What is slow / fat / over-rendering (user-visible or a named job)
  • Probe (command, trace, log field, heap snapshot — the thing you will run twice)
  • Number (p50/p95 latency, RSS, allocs, render count, LCP/INP/CLS, query count, CPU-ms)
  • Budget (good enough). If the user did not give one, pick a conservative budget from the probe and state it.

No probe you can run in this environment → say so and stop, or switch to a probe you can run. Do not ship an unmeasured “should be faster.”

2. Baseline

Run the probe. Record: command, environment, n, result. That number is the only “before.”

Frontend: DevTools/Lighthouse/trace, render counts, bundle bytes. Backend/jobs: timing around the hot function, query logs, heap, CPU profile. Rendering: how many times the expensive component/function ran per user action.

3. Find the bottleneck

Use the symptom tree; do not skip to a rewrite:

What is slow?
├── First load / TTFB / LCP     → bytes, blocking, server wait, images
├── Interaction / INP / jank    → long tasks, extra renders, layout thrash
├── After navigation            → waterfalls, refetch, cache miss
├── One API / job               → queries, locks, sync CPU, N+1, huge payloads
├── Memory growth               → unbounded cache, retained DOM/closures, giant JSON
└── Scale (n items / n markets) → O(n²), full-table walks, no pagination

Name one dominant cost with evidence (stack, query, flame, render reason). Secondary issues go on a parked list.

4. Report

Print: target, baseline, bottleneck + evidence, proposed fix, parked list, how you will re-measure.

--report-only ends here.

5. Fix (not --report-only)

Change only what the bottleneck requires. Typical moves, only when the profile points here:

  • Cut extra renders (stable props, split state, skip work off-screen)
  • Cut bytes / parse cost (smaller payload, less JSON, fewer round trips)
  • Cut queries (batch, index, stop N+1)
  • Bound memory (caps, streaming, drop caches that grow with the slate)
  • Move work off the critical path (cache, defer, compute once)

No speculative memoization. No new abstraction “for later.”

6. Verify

Run the same probe. Report before → after vs budget. If it missed, either a second evidence-backed pass on the same bottleneck or revert. Add a guard when cheap (test that counts queries/renders, CI budget, log).

Done

Target, before, after, and whether the budget cleared. Parked items named, not silently “fixed.”

当前收录版本

0.0.1

核对来源版本 ↗

安全与评测信息

质量评测

满分100 · 来自 SkillPi LAB 实验室的评测报告。

场景价值75/100

亮点

  • 提供端到端性能工程闭环:从目标设定、基线测量到瓶颈定位与验证
  • 覆盖前端、后端、内存、渲染等多维度优化场景,实用性强
触发精准65/100

待提升项

  • 缺少自然语言触发词描述 原报告严重程度:轻微

    description 侧重技术术语,未显式列出用户可能使用的口语化触发指令

    改进建议:在 frontmatter 或开头补充常见触发短语,如“帮我优化性能”“分析页面卡顿原因”

亮点

  • argument-hint 提供了命令行参数提示,有助于精确匹配
结构规范90/100

亮点

  • Phase 划分清晰,含硬门控规则和可执行步骤
  • 文档结构完整,frontmatter 规范,长度适中
执行可靠68/100

待提升项

  • 缺乏对不可逆操作的确认机制 原报告严重程度:重大

    Fix 阶段涉及代码修改,但未要求用户确认或提供回滚保障

    改进建议:在执行实际修改前增加确认提示,并建议备份或生成 diff 预览

  • 探针执行失败时缺乏 fallback 方案 原报告严重程度:重大

    当环境无法运行指定探针时仅建议停止,未提供替代测量方法

    改进建议:增加常见探针的替代方案说明,或引导用户提供可运行的测量方式

亮点

  • 强调‘Measure first’和‘Re-measure’,确保修改有据可依
  • 包含 revert 机制和 parked list,避免过度修改
证据可验 (前四项均值)75/100

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

正文静态检测

100 / 100 · skillpi-20261123-no-r3-v1

正文未命中当前规则。

分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

safe · 静态证据核验,不代表运行安全保证。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。