agent-instructions
Use when writing project instructions for a coding agent (CLAUDE.md, AGENTS.md, or equivalent). Covers what belongs in them, what does not, structure, and…
Use when improving page load or runtime performance. Covers Core Web Vitals, bundle and asset optimization, rendering strategy, caching headers, and measuring on real hardware rather than a fast laptop.
$ npx -y skills add nimadorostkar/Claude-Skills-collection --skill web-performance --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/web-performanceContext preview
The summary Claude sees to decide when to auto-load this skill.
Use when improving page load or runtime performance. Covers Core Web Vitals, bundle and asset optimization, rendering strategy, caching headers, and measuring on real hardware rather than a fast laptop.
name: web-performance description: Use when improving page load or runtime performance. Covers Core Web Vitals, bundle and asset optimization, rendering strategy, caching headers, and measuring on real hardware rather than a fast laptop. metadata: category: frontend version: 1.0.0 tags: [performance, core-web-vitals, lcp, inp, bundle]
Make pages fast on the devices people actually use. Performance work without measurement on representative hardware is guesswork, and it is usually spent on the wrong thing.
1. **Measure the field, not the lab** — Lighthouse on a developer laptop tells you nothing about a mid-range Android on 4G. Start with real-user data and reproduce it with 4x CPU throttling and a Slow 4G profile. 2. **Find the LCP element** — It is nearly always a hero image or a heading blocked by a font or a script. Preload it; do not lazy-load it. 3. **Fix INP by breaking up long tasks** — Interaction latency comes from the main thread being busy. Find tasks over 50ms in the profile and yield, defer, or move them off-thread. 4. **Fix CLS by reserving space** — Every image needs `width` and `height` or an `aspect-ratio`. Every ad slot, embed, and late-loading banner needs a reserved box. 5. **Cut the bundle** — Analyze it. One date library, one icon set, or one un-tree-shaken utility library is usually a third of the payload. 6. **Set the cache headers** — Immutable, fingerprinted assets get a one-year `max-age`. HTML gets `no-cache` and revalidates. 7. **Budget it in CI** — Otherwise it regresses within two sprints.
**Preloading the LCP image and the font that blocks it:**
<link rel="preload" as="image"
href="/hero-960.avif"
imagesrcset="/hero-640.avif 640w, /hero-960.avif 960w, /hero-1440.avif 1440w"
imagesizes="(max-width: 768px) 100vw, 960px"
fetchpriority="high" />
<link rel="preload" as="font" type="font/woff2"
href="/fonts/inter-var.woff2" crossorigin />
<img src="/hero-960.avif" width="1440" height="810"
alt="" fetchpriority="high" /> <!-- dimensions reserve space: no CLS -->**Breaking a long task to fix INP:**
// Before: 400ms of blocking work on click. INP is terrible.
button.addEventListener("click", () => {
const results = items.map(expensiveTransform); // blocks the main thread
render(results);
});
// After: yield to the browser between chunks so input stays responsive.
async function processInChunks(items, chunkSize = 50) {
const out = [];
for (let i = 0; i < items.length; i += chunkSize) {
out.push(...items.slice(i, i + chunkSize).map(expensiveTransform));
await scheduler.yield(); // hand control back; the browser can paint and respond
}
return out;
}A curated library of 137 production-grade skills for Claude and other AI coding agents. Every skill follows one structure, speaks with one voice, and earns its place by changing what the agent does.
Repo: nimadorostkar/Claude-Skills-collection
Use when writing project instructions for a coding agent (CLAUDE.md, AGENTS.md, or equivalent). Covers what belongs in them, what does not, structure, and…
Use when an agent needs state that survives a session or a context compaction. Covers what to persist, file-based memory, structuring notes for retrieval, and…
Use when automating agent behavior with lifecycle hooks. Covers hook events, deterministic enforcement of rules the model should not be trusted to remember,…
Use when packaging skills, commands, hooks, and MCP servers into a distributable plugin. Covers manifest structure, bundling, versioning, testing, and…
Use when writing a new skill for an AI agent. Covers scoping, description writing for reliable triggering, progressive disclosure, and the difference between a…
Use when reviewing or improving an existing agent skill. Covers triggering accuracy, content quality, redundancy with the base model, and measuring whether the…