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 skills/ericrisco/rsc-harness/performancenpx skills add ericrisco/rsc-harness --skill performancegit clone --depth 1 https://github.com/ericrisco/rsc-harnessWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/ericrisco/rsc-harness/performance)<a href="https://agentmods.dev/skills/ericrisco/rsc-harness/performance"><img src="https://agentmods.dev/badge/skills/ericrisco/rsc-harness/performance.svg" alt="Measured on agentmods" height="20"></a>What 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.00091 | $0.03907 |
| Opus 5 | $0.00046 | $0.01954 |
| Sonnet 5 | $0.00018 | $0.00781 |
| Haiku 4.5 | $0.00009 | $0.00391 |
Grade A, and why
performance scanned grade A with 0 findings 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 today.
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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 230 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Performance: make one thing fast
Performance makes a single request, page, or interaction faster for one user. Scaling makes many requests survive at the same time. Different problem, different toolbox — if the system is fine for you and only bends under concurrent load, that is ../scaling/SKILL.md, not this.
The whole job in one line: measure with a profiler → attribute the cost to one specific phase → apply the one fix that moves that phase → re-measure against a number. Repeat until you clear the threshold, then stop.
Prime directive: no fix without a profile first. A waterfall, a flame chart, a bundle treemap, or a field CWV number comes before you touch code. The fix you guess is almost never the fix the measurement points at, and a "fast" change that moves a phase nobody was waiting on is wasted work that you then have to maintain.
Cross-reference, don't duplicate: the last column of the table below names where each deep fix lives. The one case it has no row for — you decided what to cache to cut a phase and now need that cache race-free — is ../redis/SKILL.md.
Decision table — symptom to first move
| Symptom | Metric / phase | First probe | First lever | Deep fix lives in |
|---|---|---|---|---|
| Slow load, hero appears late | LCP | Lighthouse + DevTools trace | attribute to a subpart, then fix that one | this skill / ../postgresdb/SKILL.md if TTFB |
| Janky scroll, laggy typing/click | INP | DevTools Performance trace (long-task bars) | break the >50 ms task, yield | this skill |
| Layout jumps as it loads | CLS | Lighthouse layout-shift trace | reserve space (dimensions / aspect-ratio) | this skill |
| "First Load JS is huge" | bundle bytes | @next/bundle-analyzer / source-map-explorer |
kill/replace the heavy dep, then dynamic import | this skill |
| Component re-renders constantly | render time | React DevTools Profiler ("why did this render") | fix the unstable ref / boundary | ../react/SKILL.md for the pattern |
'use client' drags server work down |
First Load JS | bundle analyzer server/client trace | push the boundary to a leaf | ../nextjs/SKILL.md |
| Slow only under concurrent load | throughput, not latency | load test | — not this skill — | ../scaling/SKILL.md |
| TTFB dominated by one query | server time | query plan / EXPLAIN |
— not this skill — | ../postgresdb/SKILL.md |
What ships with it
4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- today First seen · 230 lines · 91 tokens per session scan A ffbdecc1e453
performance is a skill published in the GitHub repository ericrisco/rsc-harness (60 stars, last pushed yesterday), licensed MIT. It adds 91 tokens to every session and 3,907 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other skills, from other repositories
nextjs-optimization
Optimize images, fonts, scripts, and metadata for Next.js performance and Core Web Vitals. Use when configuring next/image for LCP, next/font for zero layout shift, next/script loading strategies, or generateMetadata for SEO.
react-performance-debugging
Diagnose and fix slow catalog, cart, compare-page, and API-route performance issues in Next.js by targeting upstream fetch patterns, non-blocking side effects, bundle size, and unnecessary rerenders without breaking required test hooks or instrumentation.
performance-optimization
Optimizes application performance. Use when performance requirements exist, when you suspect performance regressions, or when Core Web Vitals or load times need improvement. Use when profiling reveals bottlenecks that need fixing.
fix-visual-stability
Fix visual stability issues in Next.js e-commerce apps — covers CLS (Cumulative Layout Shift), FOIT (Flash of Invisible Text), and theme flicker.
frontend-performance
Make pages load fast and stay responsive. Invoke when Core Web Vitals regress, pages feel slow, or bundle size balloons.
Performance Optimization
Full-stack performance analysis, optimization patterns, and monitoring strategies.