accelint-ts-performance_skill

This skill performs systematic TypeScript performance audits and applies targeted optimizations to reduce runtime and memory usage.
  • TypeScript

6

GitHub Stars

3

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill gohypergiant/agent-skills --skill accelint-ts-performance

  • AGENTS.md7.7 KB
  • README.md3.9 KB
  • SKILL.md20.4 KB

Overview

This skill performs systematic JavaScript/TypeScript performance audits and targeted optimizations using V8 profiling knowledge and proven runtime patterns. It inspects code for algorithmic and allocation anti-patterns, V8 deoptimizations, and hot-path issues, then reports findings with expected gains and remediation examples. Use it to prioritize safe, measurable speedups while preserving correctness.

How this skill works

The skill scans code and runtime profiles to identify anti-patterns such as O(n²) nested loops, excessive allocations, blocking async, try/catch in hot paths, and inline-caching issues that cause V8 deoptimization. For each finding it categorizes the issue, estimates impact, and provides ❌/✅ examples and concrete remediation steps (caching, batching, data-structure changes, loop hoisting). It can run as a standalone audit that produces a structured report or operate inline to suggest and apply fixes with verification steps.

When to use it

  • When a user reports 'this is slow', 'optimize performance', or 'reduce allocations'.
  • Before shipping critical, latency-sensitive functionality or when profiling shows hot paths.
  • When code contains many utility/formatter/parser functions that may be in hot loops.
  • To find and fix V8 deoptimizations (polymorphism, try/catch in hot functions, shape changes).
  • During code reviews for changes that could affect algorithmic complexity or memory use.

Best practices

  • Always profile first and measure before/after; don’t apply blind micro-optimizations.
  • Fix algorithmic complexity before micro-optimizations; O(n² → O(n)) yields far bigger gains.
  • Preserve correctness: add or run comprehensive tests and cover edge cases before refactors.
  • Avoid optimizing code you don't own without coordination; prefer stable targets.
  • Balance memory vs CPU: cap caches or use WeakMap where lifecycle matters; monitor GC.

Example use cases

  • Replace nested filter/map loops with single-pass reductions to cut allocations in rendering pipelines.
  • Convert repeated Array.includes() lookups into a Set.has() for O(1) repeated membership checks.
  • Hoist invariant computations and precompute lengths or lookup maps outside tight loops.
  • Move await expressions into branches to avoid unnecessary I/O, and batch network calls where possible.
  • Refactor try/catch out of hot paths to allow V8 inlining and reduce deoptimization.

FAQ

No — V8 behaviour varies by Node and browser versions and architecture. Always profile target environments and keep fallbacks.

Should I replace all array helpers with manual loops?

Not necessarily. Use manual loops only in proven hot paths where profiling shows a measurable benefit and tests protect correctness.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational