AGENT SKILL

lazy-loader

Identify components that should be lazy loaded using AI. Use when optimizing bundle size and initial load.

License 许可
MIT
最近更新
2026-08-23
Stars
★ 1
Forks
0

01 前言 Front Matter

name
lazy-loader
description
Identify components that should be lazy loaded using AI. Use when optimizing bundle size and initial load.

02 资源文件 7

03 SKILL.md 正文

Lazy Load Analyzer

Your bundle is huge and your initial load is slow. This tool finds components that should be dynamically imported and tells you exactly how to split them. Stop shipping the entire app on first load.

One command. Zero config. Just works.

Quick Start

npx ai-lazy-load ./src

What It Does

  • Analyzes your component tree for lazy loading opportunities
  • Identifies below-the-fold components that don't need immediate loading
  • Finds route-based splits for Next.js and React Router
  • Suggests React.lazy() implementations with Suspense boundaries
  • Estimates bundle size impact for each suggestion

Usage Examples

# Analyze all components
npx ai-lazy-load ./src/components

# Focus on pages/routes
npx ai-lazy-load ./src/pages --routes-only

# Show bundle impact estimates
npx ai-lazy-load ./src --with-sizes

# Generate ready-to-use code
npx ai-lazy-load ./src --generate-code

# Next.js specific analysis
npx ai-lazy-load ./src --framework next

Best Practices

  • Don't lazy load everything - Above-the-fold components should load immediately
  • Group related components - Lazy load a feature module, not individual buttons
  • Add proper loading states - Every Suspense boundary needs a fallback
  • Measure the difference - Check your bundle analyzer before and after

When to Use This

  • Initial bundle size is over 200KB gzipped
  • Lighthouse says "reduce unused JavaScript"
  • Adding features and worried about bloat
  • Refactoring an app to improve TTI

Part of the LXGIC Dev Toolkit

This is one of 110+ free developer tools built by LXGIC Studios. No paywalls, no sign-ups, no API keys on free tiers. Just tools that work.

Find more:

Requirements

No install needed. Just run with npx. Node.js 18+ recommended.

npx ai-lazy-load --help

How It Works

The tool parses your component imports and builds a dependency graph. It identifies components that are conditionally rendered, below viewport, or behind user interactions. AI evaluates which splits give you the best performance gains with minimal complexity.

License

MIT. Free forever. Use it however you want.

04 同仓库更多 Skills

kbarbel640-del
kbarbel640-del/skills

crowd-prompting

A marketplace where AI agents improve prompts, system instructions, tool descriptions, and other text-based content with domain expertise from real-world operations — and earn tokens for valuable contributions.

内容创作者
★ 1
kbarbel640-del
kbarbel640-del/skills

dilemm-ai

Compete in DilemmAI, the prisoner's dilemma AI arena at dilemm.ai. Use when an OpenClaw agent wants to create an account, design and submit strategy prompts for their bot, enter matchmaking, analyze historical matches and leaderboards, and iterate on bot strategy. Requires headless browser automation (no API available yet).

Skill与智能体开发
★ 1
kbarbel640-del
kbarbel640-del/skills

arxiv-paper-reviews

Interact with arXiv Crawler API to fetch papers, read reviews, and submit comments. Use when working with arXiv papers, fetching paper lists by date/category/interest, viewing paper details with comments, or submitting paper reviews via API at http://150.158.152.82:8000.

资料检索与研究
★ 1
kbarbel640-del
kbarbel640-del/skills

arxiv-paper-reviews

Interact with arXiv Crawler API to fetch papers, read reviews, and submit comments. Use when working with arXiv papers, fetching paper lists by date/category/interest, viewing paper details with comments, or submitting paper reviews via API at http://150.158.152.82:8000.

资料检索与研究
★ 1
kbarbel640-del
kbarbel640-del/skills

git-summary

Get a quick summary of the current Git repository including status, recent commits, branches, and contributors.

★ 1
kbarbel640-del
kbarbel640-del/skills

agent-constitution

Interact with AgentConstitution governance contracts on Base Sepolia. Check compliance, read rules, log actions, query governance state.

律师与法务Skill与智能体开发
★ 1