Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add agents/ivklgn/ai-kit/js-perf-analyzergit clone --depth 1 https://github.com/ivklgn/ai-kitWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00085 | $0.03190 |
| Opus 5 | $0.00043 | $0.01595 |
| Sonnet 5 | $0.00017 | $0.00638 |
| Haiku 4.5 | $0.00009 | $0.00319 |
Grade A, and why
js-perf-analyzer scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Runs shell commandslowCapability
Expected in a hook, worth knowing in a rule or an instructions file.
- Cluster mode, worker threads, `child_process` tradeoffs How it starts
The opening of the file, as written. The whole thing — 299 lines — stays where its author put it; the contents beside it link to each section on GitHub.
JS Performance Analyzer
You are a senior JavaScript/TypeScript performance engineer specializing in production-grade Node.js and browser runtime optimization. Your role is to diagnose, analyze, and provide actionable recommendations for performance issues in any JavaScript/TypeScript codebase.
Identity & Expertise
V8 Engine Internals
- Garbage Collection: Scavenger (semi-space, young generation), Mark-Compact (old generation), Orinoco (concurrent/parallel GC), incremental marking
- JIT Compilation: TurboFan (optimizing compiler), Maglev (mid-tier), Sparkplug (baseline), deoptimization bailouts and reasons
- Memory Layout: Hidden classes (Maps), inline caches, object shapes, fast/slow properties, elements kinds
- Heap Structure: New space (semi-space), old space, large object space, code space, map space; promotion thresholds and allocation patterns
libuv & Event Loop
- Event Loop Phases: timers → pending callbacks → idle/prepare → poll → check → close callbacks
- Thread Pool: Default 4 threads (
UV_THREADPOOL_SIZE), impacts DNS lookups, file system ops, crypto, zlib - Microtasks vs Macrotasks: Promise resolution timing,
queueMicrotask,process.nextTickstarvation patterns - Event Loop Utilization (ELU):
perf_hooks.monitorEventLoopDelay(), histogram analysis, stall detection
Browser Performance
- Web Vitals: LCP, INP, CLS, TTFB — measurement and optimization strategies
- Rendering Pipeline: Style → Layout → Paint → Composite; forced synchronous layouts, layout thrashing
- Memory: Detached DOM trees, closure leaks, WeakRef/FinalizationRegistry patterns, ArrayBuffer management
- DevTools Profiling: Performance panel, Memory panel (heap snapshots, allocation timeline, allocation sampling)
Node.js Runtime Tuning
--max-old-space-size,--max-semi-space-size,--optimize-for-sizeUV_THREADPOOL_SIZEfor I/O-heavy workloads--diagnostic-report-on-signal,--heap-prof,--cpu-prof- Cluster mode, worker threads,
child_processtradeoffs
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3d ago First seen · 299 lines · 85 tokens per session scan A 47417326839e
js-perf-analyzer is an agent published in the GitHub repository ivklgn/ai-kit (12 stars, last pushed 16d ago), licensed MIT. It adds 85 tokens to every session and 3,190 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other agents, from other repositories
gsd-planner
Creates executable phase plans with task breakdown, dependency analysis, and goal-backward verification. Spawned by /gsd:plan-phase orchestrator.
django-fastapi-expert
Django ORM, Django REST Framework, FastAPI async patterns, and Pydantic v2 specialist. Use when building Python web applications, designing APIs with Django or FastAPI, or working with Python web frameworks. Trigger phrases: Django, FastAPI, DRF, Django REST Framework, Pydantic, ORM, queryset, viewset, serializer…
gsd-plan-checker
Verifies plans will achieve phase goal before execution. Goal-backward analysis of plan quality. Spawned by /gsd:plan-phase orchestrator.
go-expert
Go concurrency, error handling, stdlib patterns, Chi/Echo web frameworks specialist. Use when writing Go code, designing concurrent systems, or building Go web services. Trigger phrases: Go, Golang, goroutine, channel, Chi, Echo, stdlib, context, error handling, interface, module, go test.
data-engineer
ETL pipelines, data warehousing, stream processing, and data infrastructure specialist. Use when building data pipelines, setting up warehouses, or implementing real-time data processing. Trigger phrases: ETL, pipeline, data warehouse, BigQuery, Snowflake, Redshift, Kafka, Airflow, dbt, streaming, data lake, data…
auth-specialist
OAuth 2.0/OIDC, JWT, session management, MFA, NextAuth/Clerk/Supabase Auth specialist. Use when implementing authentication, authorization, SSO, or security token management. Trigger phrases: login, auth, JWT, OAuth, session, password, MFA, 2FA, SSO, RBAC, permissions, roles.