Speed is the feature

From oborchers/fractional-cto · View interactive version

Speed is the feature is an AI agent skill from the GitHub repository oborchers/fractional-cto. This skill should be used when the user is building or reviewing loading states, optimistic UI updates, skeleton screens, code splitting, lazy loading, or performance budgets. Covers perceived speed, bundle size optimization, INP targets, and any work where application responsiveness and perceived l

How to use this skill

Skill file

Speed Is the Feature

Speed is not an optimization — it is the product. Linear built a billion-dollar company on this insight. Every architectural decision should serve Nielsen's three perception thresholds.

The Three Thresholds

| Threshold | Perception | Target For |

|-----------|------------|------------|

| 100ms | Instantaneous — feels caused by the user | Toggles, selections, navigating between loaded views |

| 1 second | Flow uninterrupted — user feels in control | Page transitions, data loads |

| 10 seconds | Attention limit — user wants to multitask | Show percent-done indicator or lose them |

Core Principle: Decouple Feedback from the Network

The UI must respond before the server confirms. This does not require a local-first architecture — it requires separating the feedback loop from network latency.

Optimistic UI

Update the UI immediately on user action. Reconcile with the server in the background.

When to use optimistic updates:

Rules:

Skeleton Screens

Skeleton screens beat spinners, but only when done correctly.

Research findings (Bill Chung):

When to use which loading indicator:

| Load Duration | Indicator |

|---------------|-----------|

| < 1.5 seconds | Nothing, or a subtle spinner |

| 1.5–10 seconds | Skeleton screen with shimmer |

| > 10 seconds | Percent-done progress bar |

Performance Budget

Enforce concrete budgets, not aspirational goals.

Bundle budget: Total JavaScript under 200KB gzipped. Code-split by route. Lazy-load modals, charts, and non-critical UI.

Responsiveness budget: INP (Interaction to Next Paint) must stay at or below 200ms. This measures responsiveness across all interactions, not just page load. Keep main-thread tasks under 50ms. Break long operations with requestAnimationFrame or scheduler.yield().

Examples

Working implementations in examples/:

Review Checklist

When reviewing existing code for speed:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.