hello-perf

Enforces performance coding rules for queries, caching, frontend assets, and concurrency.

702|99|Updated Sep 26, 2025
One-click install
npx skills add https://github.com/hellowind777/helloagents --skill hello-perf
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hello-perf
Source: https://github.com/hellowind777/helloagents/tree/main/skills/hello-perf
Command: npx skills add https://github.com/hellowind777/helloagents --skill hello-perf

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Code often ships with hidden performance problems like N+1 database queries, unpaginated large datasets, unoptimized images, and O(n²) loops that only surface under production load. This Skill gives the AI a concrete performance checklist so these issues are caught and prevented during code generation rather than after deployment.

Core Features & Use Cases

  • Query Optimization: Bans N+1 queries via JOINs, batch loading, and dataloaders; requires pagination, proper indexes, and selecting only needed columns.
  • Caching Strategy: Guides cache usage for read-heavy data with TTLs, write-invalidation, and protection against cache penetration and avalanche.
  • Frontend Performance: Enforces code splitting, lazy loading, WebP/AVIF images with dimension declarations, critical CSS inlining, and virtual scrolling for long lists.
  • Algorithm & Concurrency Rules: Prevents nested loops on large datasets, prefers Map/Set lookups, batch operations, and debounce/throttle for high-frequency events.
  • Use Case: When asking the AI to build a product listing API with images, it will automatically paginate results, avoid N+1 queries, and optimize image delivery.

Quick Start

Ask the AI to review or write performance-sensitive code such as a database-backed list endpoint, and it will apply these optimization rules and run the delivery checklist.

Frequently Asked Questions about hello-perf

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent N+1 queries in my application code?

Replace per-item queries with JOINs, batch loading, or a dataloader pattern so related records are fetched in one round trip. This Skill instructs the AI to apply these patterns automatically whenever it writes data-access code.

What caching strategy should I use for read-heavy data?

Cache read-heavy, write-light data in memory or Redis with a reasonable TTL. Prefer write-time invalidation over timed expiry, and guard against cache penetration with null-value caching and avalanches with randomized TTLs.

How do I optimize frontend performance for long lists and images?

Use virtual scrolling for lists over 50 items, route-level code splitting with lazy loading, and serve images as WebP/AVIF with lazy loading, responsive srcset, and declared width/height to prevent layout shift.

When should I use debounce or throttle on event handlers?

Apply debounce or throttle to high-frequency events like scroll, resize, and input so handlers do not fire on every event. This keeps the UI responsive and avoids redundant computation or network calls.

Why are nested loops on large datasets a performance problem?

Nested loops produce O(n²) or worse time complexity, which becomes unusable on large datasets. Use Map or Set for O(1) lookups instead of Array.includes, and prefer batch operations over per-item processing.