skills$openclaw/lazy-loader
lxgicstudios8.9k

by lxgicstudios

lazy-loader – OpenClaw Skill

lazy-loader is an OpenClaw Skills integration for coding workflows. Identify components that should be lazy loaded using AI. Use when optimizing bundle size and initial load.

8.9k stars6.3k forksSecurity L1
Updated Feb 7, 2026Created Feb 7, 2026coding

Skill Snapshot

namelazy-loader
descriptionIdentify components that should be lazy loaded using AI. Use when optimizing bundle size and initial load. OpenClaw Skills integration.
ownerlxgicstudios
repositorylxgicstudios/lazy-loader
languageMarkdown
licenseMIT
topics
securityL1
installopenclaw add @lxgicstudios/lazy-loader
last updatedFeb 7, 2026

Maintainer

lxgicstudios

lxgicstudios

Maintains lazy-loader in the OpenClaw Skills directory.

View GitHub profile
File Explorer
9 files
.
src
cli.ts
972 B
index.ts
1.3 KB
_meta.json
287 B
package-lock.json
46.2 KB
package.json
614 B
README.md
277 B
SKILL.md
2.4 KB
tsconfig.json
211 B
SKILL.md

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

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.

README.md

ai-lazy-load

Identify components that should be lazy loaded using AI.

Install

npm install -g ai-lazy-load

Usage

npx ai-lazy-load ./src/
npx ai-lazy-load ./src/components/

Setup

export OPENAI_API_KEY=sk-...

License

MIT

Permissions & Security

Security level L1: Low-risk skills with minimal permissions. Review inputs and outputs before running in production.

Requirements

No install needed. Just run with npx. Node.js 18+ recommended. ```bash npx ai-lazy-load --help ```

FAQ

How do I install lazy-loader?

Run openclaw add @lxgicstudios/lazy-loader in your terminal. This installs lazy-loader into your OpenClaw Skills catalog.

Does this skill run locally or in the cloud?

OpenClaw Skills execute locally by default. Review the SKILL.md and permissions before running any skill.

Where can I verify the source code?

The source repository is available at https://github.com/openclaw/skills/tree/main/skills/lxgicstudios/lazy-loader. Review commits and README documentation before installing.