darknecrocities/skillbuilder/performance

Claude Code and agent skill by darknecrocities/skillbuilder

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Performance profiling and optimization skill. Audits Core Web Vitals (LCP, CLS, INP), N+1 queries, bundle budgets, and memory leaks.

Install

npx vskill@latest install darknecrocities/skillbuilder/performance

SKILL.md

The same SKILL.md was published earlier as darknecrocities/skillbuilder/performance.

Performance Profiling & Optimization (/performance)

Philosophy: Measure with evidence, not intuition. Eliminate N+1 query cascades, bound memory allocations, and enforce strict Core Web Vitals budgets. If it is not measured, it will degrade.

This skill establishes performance optimization standards across frontend client bundles, Core Web Vitals, API latency budgets, memory leaks, and database query executions.


1. Quick Navigation & Progressive Disclosure

Resource TypeDocumentDescription
Referencereferences/core-web-vitals-audit.mdLCP, INP, and CLS metric targets, hero image preloading, layout shift prevention.
Referencereferences/memory-leak-profiling.mdFront-end leak sources, detached DOM nodes, Chrome DevTools heap profiling.
Utilityscripts/audit_performance_budgets.pyAudits bundle sizes, unoptimized images, inline fetch waterfalls, and N+1 query loops.

2. Performance Guardrails & Budgets

mermaid
flowchart TD
subgraph FrontendBudgets["1. Frontend & Client Budgets"]
A["Core Web Vitals: LCP < 2.5s, CLS < 0.1, INP < 200ms"]
B["Initial JS Bundle Budget: < 150KB Gzip"]
C["Aspect-Ratio Reservation on All Media"]
end
subgraph NetworkBudgets["2. Network & Caching"]
D["API p95 Latency < 200ms"]
E["Bounded LRU Caches with TTL & Eviction"]
F["Immutable Cache Headers on Static Assets"]
end
subgraph DataBudgets["3. Datastore & Execution"]
G["Zero N+1 Query Cascades (Batch / Join Fetch)"]
H["Connection Pool Sizing <= 2 * CPU Cores"]
I["Zero Unbounded Loops in Event Handlers"]
end
FrontendBudgets --> NetworkBudgets --> DataBudgets

2. Core Web Vitals (CWV) Optimization Guide

MetricTarget BudgetOptimization StrategiesFailure Anti-Pattern
LCP (Largest Contentful Paint)< 2.5sPreload hero image (fetchpriority="high"), inline critical CSS, server-side render text contentLazy-loading the hero image (loading="lazy" on above-the-fold content)
CLS (Cumulative Layout Shift)< 0.1Explicit width and height or aspect-ratio: 16/9, reserved skeleton blocks for ads/bannersDynamic insertion of content above existing content without reserved space
INP (Interaction to Next Paint)< 200msDebounce inputs (200-300ms), break long tasks via scheduler.yield(), move heavy compute to Web WorkersSynchronous regex or sorting of 10,000 items on main thread

3. JavaScript Memory Safety & Leak Prevention

Avoid the 3 most common Node.js / React memory leaks:

  1. Unbounded Global Maps / Caches:

```typescript // ❌ LEAK: Map grows indefinitely until OOM crash const cache = new Map();

// ✅ PRODUCTION: LRU cache with strict entry cap import { LRUCache } from "lru-cache"; const cache = new LRUCache({ max: 500, ttl: 1000 60 5 }); // 5 minutes TTL ```

  1. Dangling Event Listeners:

``typescript // Always remove listeners in cleanup function useEffect(() => { const handler = () => handleResize(); window.addEventListener("resize", handler); return () => window.removeEventListener("resize", handler); }, []); ``

  1. Uncleared Timers / Intervals:

Store timer references and clear them in component unmount or error handlers.


4. Input Debouncing & Rate Limiting

Never trigger network requests on every raw keystroke. Debounce input changes:

typescript
export function useDebounce<T>(value: T, delayMs: number = 300): T {
const [debounced, setDebounced] = useState<T>(value);
useEffect(() => {
const timer = setTimeout(() => setDebounced(value), delayMs);
return () => clearTimeout(timer);
}, [value, delayMs]);
return debounced;
}

5. Performance Budget Auditor CLI

Scan your repository for bundle size violations, missing media dimensions, and N+1 query patterns:

bash
python3 skills/performance/scripts/audit_performance_budgets.py --path .

Audits:

  • Presence of explicit dimensions or aspect ratios on image/video tags.
  • Nested loop database queries in backend controllers.
  • Unbounded in-memory collections without eviction policies.
  • Client bundles exceeding size budgets.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/darknecrocities/skillbuilder/performance/badge)](https://verified-skill.com/skills/darknecrocities/skillbuilder/performance)

Something wrong with this skill or its page? Tell us.