hellowind777/helloagents · Archived

hello-perf

优化性能、处理数据库查询、实现缓存、懒加载、分页、打?

First seen Apr 21, 2026

Installation

$ npx skills add hellowind777/helloagents --skill hello-perf

Stronger alternatives

This repository is archived — consider an actively maintained alternative.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from hellowind777/helloagents · top by installs.

npx skills add hellowind777/helloagents

Browse all from hellowind777/helloagents

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 702
License LICENSE.md
Default branch main
Open issues 19
Status Archived

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 1,422 B
  • docs SUMMARY.md 183 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 7 installs

SKILL.md

性能相关代码必须遵循以下规范。

编码前

先定位性能瓶颈(I/O / 计算 / 内存),再写代码。

查询优化

  • 禁止 N+1 查询:使用 JOIN、批量加载、dataloader
  • 大数据集必须分页,不一次加载全部
  • 数据库索引覆盖常用查询条件
  • 只查需要的字段(SELECT 具体列,不用 SELECT *)

缓存策略

  • 读多写少的数据 → 缓存(内存/Redis)
  • 设置合理的 TTL
  • 缓存失效策略:写时失效 > 定时过期
  • 防止缓存穿透(空值缓存)和雪崩(随机 TTL)

前端性能

  • 代码分割 + 路由级懒加载
  • 图片:WebP/AVIF、懒加载、srcset 响应式
  • 声明 width/height 或 aspect-ratio 防止布局偏移
  • 关键 CSS 内联,非关键 CSS 异步加载
  • 50+ 项列表使用虚拟滚动

算法与并发

  • 注意时间复杂度,禁止嵌套循环处理大数据集(O(n²)+)
  • Map/Set 查找 O(1) vs Array.includes O(n)
  • 批量操作优于逐条操作
  • 高频事件(scroll/resize/input)使用 debounce/throttle

交付检查

  • 无 N+1 查询
  • 列表接口有分页
  • 图片已优化(格式/懒加载/尺寸声明)
  • 无嵌套循环处理大数据集