optimize

Optimize runtime, size, and memory usage of existing code without changing behavior.

5.5k|794|Updated Nov 26, 2025
One-click install
npx skills add https://github.com/shiaho777/web-to-app --skill optimize-shiaho777
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: optimize
Source: https://github.com/shiaho777/web-to-app/tree/main/app/src/main/assets/skills/optimize
Command: npx skills add https://github.com/shiaho777/web-to-app --skill optimize-shiaho777

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Existing codebases often struggle with performance, memory, or bundle size without changing outward behavior, leading to longer load times and higher resource usage.

Core Features & Use Cases

  • Profiling-first optimizations: identify hot paths and apply targeted improvements.
  • Size and memory reductions: reduce bundle size and runtime memory footprint without altering functionality.
  • Safe refactoring guidance: provide guardrails to avoid risky micro-optimizations.

Quick Start

Identify the actual hot paths with profiling and apply the recommended optimizations in priority order.

Frequently Asked Questions about optimize

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

FAQPage Schema
How do I optimize code runtime and reduce memory usage without changing behavior?

To optimize code runtime and memory usage without altering behavior, identify actual hot paths through profiling first, then apply targeted improvements with safe guardrails to avoid risky speculative micro-optimizations.

What is the best way to reduce frontend bundle size for faster load times?

The best way to reduce frontend bundle size for faster load times is profiling-first optimization, targeting actual hot paths and applying size and memory reductions with safe refactoring guardrails to preserve functionality.

Can I use profiling-driven optimization for both backend and mobile projects?

Yes, profiling-driven optimization applies to frontend, backend, and mobile projects where performance, load times, or bundle size are critical, ensuring safe refactoring without changing outward behavior.

How do I start optimizing an existing codebase for performance and size?

To start optimizing an existing codebase, identify the actual hot paths with profiling and apply the recommended improvements in priority order, reducing runtime and footprint safely.

Why should I avoid speculative micro-optimizations when improving code performance?

You should avoid speculative micro-optimizations because profiling-first decisions enforce safe guardrails, ensuring runtime and memory improvements target actual hot paths without risky refactoring or altering functionality.