Web Performance
Web performance optimization patterns, Core Web Vitals, lazy loading, code splitting, caching strategies, and monitoring
Install
npx skills add cosmicstack-labs/mercury-agent-skills --skill web-performancegit clone --depth 1 https://github.com/cosmicstack-labs/mercury-agent-skills.git /tmp/mercury-agent-skills
mkdir -p ~/.claude/skills
cp -r /tmp/mercury-agent-skills/categories/frontend/web-performance ~/.claude/skills/web-performancePersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# Web Performance
Systematic approach to measuring, analyzing, and optimizing web application performance.
## Core Web Vitals
| Metric | Target | What It Measures |
|--------|--------|------------------|
| **LCP** (Largest Contentful Paint) | < 2.5s | Loading performance |
| **FID** (First Input Delay) | < 100ms | Interactivity |
| **CLS** (Cumulative Layout Shift) | < 0.1 | Visual stability |
| **INP** (Interaction to Next Paint) | < 200ms | Responsiveness |
## Optimization Strategies
### 1. JavaScript Optimization
```tsx
// Dynamic imports — code splitting
const Chart = dynamic(() => import('./Chart'), {
loading: () => <ChartSkeleton />,
ssr: false, // If chart needs browser APIs
});
// Bundle analysis
// next.config.js
const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true',
});
module.exports = withBundleAnalyzer({});
```
### 2. Image Optimization
```tsx
// Next.js Image component
import Image from 'next/image';
<Image
src="/hero.jpg"
alt="Hero"
width={1200}
height={600}
priority // Above-the-fold images
placeholder="blur"
blurDataURL="data:image/webp;base64,..."
/>
// Responsive images with srcSet
<picture>
<source media="(min-width: 1024px)" srcSet="/hero-lg.webp" />
<source media="(min-width: 640px)" srcSet="/hero-md.webp" />
<img src="/hero-sm.webp" alt="Hero" loading="lazy" />
</picture>
```
### 3. Caching StrategyDetails
- Skill name
web-performance- Repository
- cosmicstack-labs/mercury-agent-skills
- Path
categories/frontend/web-performance/SKILL.md- License
- MIT
- Repo updated
- 25 August 2026
FAQ
What does the Web Performance skill do?
Web performance optimization patterns, Core Web Vitals, lazy loading, code splitting, caching strategies, and monitoring
How do I install the Web Performance skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add cosmicstack-labs/mercury-agent-skills --skill web-performance. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Web Performance popular?
It lives in cosmicstack-labs/mercury-agent-skills, which has 492 GitHub stars and 68 forks.
Related skills
Accessibility
492cosmicstack-labs/mercury-agent-skills
Achieve and maintain WCAG compliance through inclusive design practices, proper ARIA usage, and comprehensive testing methodologies.
Accessibility Testing
492cosmicstack-labs/mercury-agent-skills
WCAG 2.1/2.2 audit, axe, Lighthouse, manual testing, screen reader testing, and remediation
Agent Audit Logging
492cosmicstack-labs/mercury-agent-skills
Implement comprehensive audit logging and reporting for multi-agent systems. Covers event capture, structured logging, traceability, compliance reporting, forensic analysis, and real-time monitoring dashboards for agent actions and decisions.
Employer Brand
393shawnpang/startup-founder-skills
When the user needs to create or improve content that shapes how candidates and the public perceive the company as a place to work.
UI Design System
492cosmicstack-labs/mercury-agent-skills
Master the creation, maintenance, and governance of design systems — from design tokens and component architecture to documentation, versioning, and accessibility.
Founder Thought Leadership
393shawnpang/startup-founder-skills
When the user wants to build personal brand, thought leadership, or IP as a founder on Twitter/X or LinkedIn. Also use when the user mentions "founder brand", "personal content", "build audience", or "grow my following".
Browse the most popular Claude skills, all frontend & design skills, or write your own with the skills generator.