Token导航 LogoToken导航

Agent Skill · 前端设计

web-perf(网络性能)

web-perf 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

web-perf 是前端设计类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为操作浏览器;许可证信息还不明确,第三方扫描有未通过项,按安装量在前端设计类的 10,216 个 Skill 里排第 5,171。

总安装 724周安装 29GitHub Stars 25下载 234核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:web-perf(网络性能)
来源仓库:https://github.com/oimiragieo/agent-studio
仓库路径:skills/web-perf
安装命令:
npx skills add https://github.com/oimiragieo/agent-studio --skill web-perf
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/oimiragieo/agent-studio --skill web-perf

这个 Skill 是做什么的

前端设计类 Skill 关注页面结构、视觉规范和组件写法,输出通常是可运行的界面代码。

web-perf 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。适合围绕仓库状态、代码变更或协作事项进行整理和查询。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态及是否触发联网或文件读写。

涉及创建 PR、修改 Issue 时需确认 token 权限和目标仓库范围。

来源仓库内路径:skills/web-perf

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/oimiragieo/agent-studio --skill web-perf;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要操作浏览器,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

web-perf 怎么安装?

在终端执行 npx skills add https://github.com/oimiragieo/agent-studio --skill web-perf。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

web-perf 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

web-perf 需要什么权限?

权限级别是操作浏览器。该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

web-perf 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

web-perf 用的人多吗?

公开数据是累计安装 724 次,近一周安装 29 次,下载 234 次,GitHub 25 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

web-perf 安全吗?

第三方扫描有未通过项,风险较高。除非你确认过源码,否则不建议直接安装到常用环境。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理前端设计类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

前端设计类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
frontend-design

前端设计 · Codex、Claude

8,823,360126,072只读MIT通过
vercel-composition-patterns

Vercel 组合模式 · Codex、Claude

3,858,81625,893需要联网MIT通过
vercel-react-native-skills

Vercel React native skills 前端 · Codex、Claude

2,468,66425,878只读MIT通过
adapt

adapt 搜索 · Codex、Claude

2,027,04023,125操作浏览器未明确通过
bolder

bolder 分析 · Codex、Claude

2,004,28823,130只读未明确通过
web-perf

网络性能 · 本页

72425操作浏览器未明确未通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Web Performance Audit

Structured 5-phase web performance audit workflow. Diagnose performance bottlenecks, measure Core Web Vitals, and produce actionable optimization recommendations.

When to Apply

Use this skill when:

  • Auditing website performance for Core Web Vitals compliance
  • Diagnosing slow page loads, high Time to Interactive, or layout shifts
  • Optimizing Largest Contentful Paint (LCP), Cumulative Layout Shift (CLS), or Interaction to Next Paint (INP)
  • Reviewing frontend code for performance anti-patterns
  • Preparing a site for Google's page experience ranking signals
  • Optimizing build output for Webpack, Vite, Next.js, or Nuxt

Core Web Vitals Thresholds

MetricGoodNeeds ImprovementPoorWhat It Measures
LCP<= 2.5s2.5s - 4.0s> 4.0sLoading performance
CLS<= 0.10.1 - 0.25> 0.25Visual stability
INP<= 200ms200ms - 500ms> 500msInteractivity (replaced FID)

Additional Performance Metrics

MetricGoodPoorWhat It Measures
FCP<= 1.8s> 3.0sFirst content rendered
TTFB<= 800ms> 1800msServer response time
TBT<= 200ms> 600msMain thread blocking
Speed Index<= 3.4s> 5.8sVisual completeness over time

5-Phase Audit Workflow

Phase 1: Performance Trace

Capture a performance trace to establish baseline metrics.

Browser-Based (Chrome DevTools):

  1. Open Chrome DevTools (F12) > Performance tab
  2. Click "Record" and reload the page
  3. Stop recording after page fully loads
  4. Analyze the flame chart for:

- Long tasks (> 50ms, marked in red) - Layout thrashing (forced reflow cycles) - Render-blocking resources - JavaScript execution bottlenecks

Lighthouse Audit:

# CLI-based Lighthouse audit
npx lighthouse https://example.com --output=json --output-path=./lighthouse-report.json

# With specific categories
npx lighthouse https://example.com --only-categories=performance --output=html

# Mobile simulation (default)
npx lighthouse https://example.com --preset=perf --throttling-method=simulate

Key Trace Indicators:

  • Main thread busy time: Should be < 4s total
  • Largest task duration: Should be < 250ms
  • Script evaluation time: Should be < 2s
  • Layout/style recalculation: Should be < 500ms

Phase 2: Core Web Vitals Analysis

Measure each Core Web Vital and identify specific causes.

LCP Diagnosis

LCP measures loading performance -- when the largest content element becomes visible.

Common LCP Elements:

  • <img> elements (hero images)
  • <video> poster images
  • Block-level elements with background images
  • Text blocks (<h1>, <p>)

LCP Optimization Checklist:

  1. Preload the LCP resource <link rel="preload" as="image" href="/hero.webp" fetchpriority="high" />
  2. Eliminate render-blocking resources <!-- Defer non-critical CSS --> <link rel="stylesheet" href="/non-critical.css" media="print" onload="this.media='all'" /> <!-- Async non-critical JS --> <script src="/analytics.js" async></script>
  3. Optimize server response time (TTFB)

- Use CDN for static assets - Enable HTTP/2 or HTTP/3 - Implement server-side caching - Use streaming SSR where supported

  1. Optimize image delivery <!-- Modern format with fallback --> <picture> <source srcset="/hero.avif" type="image/avif" /> <source srcset="/hero.webp" type="image/webp" /> <img src="/hero.jpg" alt="Hero" width="1200" height="600" fetchpriority="high" decoding="async" /> </picture>
CLS Diagnosis

CLS measures visual stability -- unexpected layout shifts during page load.

Common CLS Causes:

  • Images without explicit dimensions
  • Ads or embeds without reserved space
  • Dynamically injected content above the fold
  • Web fonts causing FOIT/FOUT (Flash of Invisible/Unstyled Text)

CLS Optimization Checklist:

  1. Always set image dimensions <img src="/photo.jpg" width="800" height="600" alt="Photo" /> Or use CSS aspect-ratio: .hero-image {aspect-ratio: 16 / 9; width: 100%;}
  2. Reserve space for dynamic content .ad-slot {min-height: 250px;}.skeleton {height: 200px; background: #f0f0f0;}
  3. Use font-display: swap with size-adjust @font-face {font-family: 'CustomFont'; src: url('/font.woff2') format('woff2'); font-display: swap; size-adjust: 100.5%; /* Match fallback font metrics */}
  4. Avoid inserting content above existing content

- Banners should push down from top, not shift existing content - Use transform animations instead of top/left/width/height

INP Diagnosis

INP measures interactivity -- the delay between user interaction and visual response.

Common INP Causes:

  • Long JavaScript tasks blocking the main thread
  • Synchronous layout/style recalculations
  • Heavy event handlers
  • Excessive re-renders (React, Vue)

INP Optimization Checklist:

  1. Break up long tasks // Instead of one long task function processAllItems(items) {for (const item of items) {/* heavy work */}} // Break into chunks with scheduler async function processAllItems(items) {for (const item of items) {processItem(item); // Yield to main thread between items await scheduler.yield();}}
  2. Debounce/throttle event handlers // Throttle scroll handler let ticking = false; window.addEventListener('scroll', () => {if (!ticking) {requestAnimationFrame(() => {updateUI(); ticking = false;}); ticking = true;}}, {passive: true});
  3. Use requestIdleCallback for non-urgent work requestIdleCallback(() => {// Analytics, prefetching, non-visible updates sendAnalytics(data);});

Phase 3: Network Analysis

Analyze network waterfall for optimization opportunities.

Key Checks:

  1. Resource count and total size

- Target: < 100 requests, < 2MB total (compressed) - Check: performance.getEntriesByType('resource').length

  1. Critical request chains

- Identify chains longer than 3 requests - Break chains with preload/prefetch hints

  1. Compression

- All text resources should use Brotli (br) or gzip - Check Content-Encoding header in response

  1. Caching headers # Immutable assets (hashed filenames) Cache-Control: public, max-age=31536000, immutable # HTML documents Cache-Control: no-cache # API responses Cache-Control: private, max-age=0, must-revalidate
  2. HTTP/2+ multiplexing

- Verify protocol in DevTools Network tab - Multiple resources should load in parallel over single connection

Phase 4: Accessibility Performance

Performance optimizations must not degrade accessibility.

Validation Checklist:

  • Lazy-loaded images have alt attributes
  • Deferred scripts do not break keyboard navigation
  • Skeleton loaders have aria-busy="true" and aria-label
  • prefers-reduced-motion is respected for animations
  • Focus management works with dynamically loaded content
/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

Phase 5: Codebase Analysis

Review source code for performance anti-patterns.

Webpack Optimization
// webpack.config.js
module.exports = {
  optimization: {
    splitChunks: {
      chunks: 'all',
      maxInitialRequests: 25,
      minSize: 20000,
      cacheGroups: {
        vendor: {
          test: /[\\/]node_modules[\\/]/,
          name(module) {
            const packageName = module.context.match(/[\\/]node_modules[\\/](.*?)([\\/]|$)/)[1];
            return `vendor.${packageName.replace('@', '')}`;
          },
        },
      },
    },
  },
};
Vite Optimization
// vite.config.ts
export default defineConfig({
  build: {
    rollupOptions: {
      output: {
        manualChunks: {
          vendor: ['react', 'react-dom'],
          router: ['react-router-dom'],
        },
      },
    },
    cssCodeSplit: true,
    sourcemap: false, // Disable in production
  },
});
Next.js Optimization
// next.config.ts
const nextConfig = {
  images: {
    formats: ['image/avif', 'image/webp'],
    deviceSizes: [640, 750, 828, 1080, 1200],
  },
  experimental: {
    optimizePackageImports: ['lucide-react', '@heroicons/react'],
  },
};
Common Code Anti-Patterns
Anti-PatternImpactFix
Barrel file importsBundle bloatImport directly from module
Synchronous localStorage in renderMain thread blockMove to useEffect or worker
Unoptimized imagesLCP, bandwidthUse next/image or <picture>
Inline <script> in bodyRender blockingUse async or defer
CSS @import chainsCSSOM blockingConcatenate or inline critical CSS
Unthrottled scroll listenersINPUse passive: true + requestAnimationFrame
document.querySelectorAll in loopsLayout thrashingCache DOM references

Audit Report Template

# Web Performance Audit Report

**URL:** [target URL]
**Date:** [audit date]
**Tool:** Lighthouse [version] / Chrome DevTools

## Core Web Vitals Summary

| Metric | Score | Rating                      | Target   |
| ------ | ----- | --------------------------- | -------- |
| LCP    | X.Xs  | GOOD/NEEDS IMPROVEMENT/POOR | <= 2.5s  |
| CLS    | X.XX  | GOOD/NEEDS IMPROVEMENT/POOR | <= 0.1   |
| INP    | Xms   | GOOD/NEEDS IMPROVEMENT/POOR | <= 200ms |
| FCP    | X.Xs  | -                           | <= 1.8s  |
| TTFB   | Xms   | -                           | <= 800ms |
| TBT    | Xms   | -                           | <= 200ms |

## Critical Findings

### P0 (Immediate Action Required)

1. [Finding] - [Impact] - [Recommended Fix]

### P1 (Address This Sprint)

1. [Finding] - [Impact] - [Recommended Fix]

### P2 (Address This Quarter)

1. [Finding] - [Impact] - [Recommended Fix]

## Optimization Recommendations (Priority Order)

1. [Recommendation with estimated impact]
2. [Recommendation with estimated impact]
3. [Recommendation with estimated impact]

Anti-Patterns

  • Do NOT optimize without measuring first -- always capture baseline metrics
  • Do NOT lazy-load above-the-fold content -- it worsens LCP
  • Do NOT remove image dimensions to "fix" CLS -- use CSS aspect-ratio instead
  • Do NOT bundle all JS into a single file -- use code splitting
  • Do NOT ignore mobile performance -- test with CPU/network throttling
  • Do NOT use loading="lazy" on the LCP image -- it delays loading
  • Do NOT serve images without modern formats (AVIF/WebP)

References

Iron Laws

  1. ALWAYS measure Core Web Vitals (LCP, INP, CLS) with field data (CrUX) before proposing optimizations
  2. NEVER optimize based on lab data alone — real user metrics determine actual user experience
  3. ALWAYS prioritize LCP ≤2.5s, INP ≤200ms, CLS ≤0.1 as the primary performance targets
  4. NEVER ship a performance fix without a before/after measurement proving improvement
  5. ALWAYS address critical rendering path issues before layout or paint optimizations

Anti-Patterns

Anti-PatternWhy It FailsCorrect Approach
Optimizing without baseline measurementCan't prove improvement, may optimize wrong thingMeasure CWV with Lighthouse and CrUX first
Lab-only metrics (Lighthouse only)Doesn't reflect real user network/device conditionsCombine lab data with CrUX field data
Fixing CLS before LCP is addressedLCP impacts far more users than CLSPrioritize in order: LCP → INP → CLS
Shipping without before/after metricsNo evidence of improvement for stakeholdersRecord pre-fix and post-fix CWV scores
Adding polyfills without code splittingBloats JS bundle for all usersUse dynamic import() with target browserslist

Memory Protocol (MANDATORY)

Before starting: Read .claude/context/memory/learnings.md

After completing:

  • New pattern -> .claude/context/memory/learnings.md
  • Issue found -> .claude/context/memory/issues.md
  • Decision made -> .claude/context/memory/decisions.md

平台分布

Codex

39.2%
按下载量换算92

Claude

29.59%
按下载量换算69

Cursor

19.15%
按下载量换算45

Gemini CLI

9.25%
按下载量换算22

安全审计

Gen Agent Trust Hub

可疑

Socket

通过

Snyk

未通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills