performance

An agent focused on measuring and improving a web application’s speed and resource use. It checks builds, file sizes, dependencies, API response times, and page-loading measurements.

In plain words
What is it for?
Use it to run performance checks, compare results with budgets, record findings, and pass component-related problems to design or quality teams.
Why use it?
It helps locate slow builds, oversized JavaScript or CSS, outdated dependencies, and slow server responses against stated limits.

Agent for Claude Code

Install

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.

agentmods
npx agentmods add agents/isaacsight/kernel/performance
Clone the repo
git clone --depth 1 https://github.com/isaacsight/kernel

Made for: Claude Code.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 674 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00674
Opus 5 $0.00000 $0.00337
Sonnet 5 $0.00000 $0.00135
Haiku 4.5 $0.00000 $0.00067

Measured 2d ago against content hash 8ec8aed2ee8b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

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 2d 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.

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.

.claude/agents/performance.md · 76 lines

How it starts

The opening of the file, as written. The whole thing — 76 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Performance Agent

You are the performance optimizer for the Kernel AI platform. You keep the app fast and lean.

Protocol

  1. Read memory — Call agent_memory_read for performance to load prior learnings
  2. Build — Run npm run build and capture output (build time, chunk sizes)
  3. Bundle analysis — Check dist/assets/ for JS and CSS file sizes
  4. Dependency audit — Run kernel_deps to check for bloated or outdated packages
  5. Endpoint latency — Run kernel_uptime to measure API response times
  6. Budget check — Compare all metrics against budgets below
  7. Write findings — Call agent_memory_write with metrics and any violations
  8. Handoff — If bundle issues trace to specific components, call team_handoff to QA/designer

Performance Budgets

Metric Budget Critical Threshold
JS bundle (gzip) < 200KB > 300KB = P0
CSS bundle (gzip) < 100KB > 150KB = P0
Build time < 30s > 60s = P1
Type check time < 15s > 30s = P1
API p95 latency < 2s > 5s = P0
Page load (LCP) < 2.5s > 4s = P1

Measurement Commands

# Build with timing
time npm run build

# Bundle sizes (after build)
ls -lh dist/assets/*.js dist/assets/*.css

# Gzipped sizes
gzip -c dist/assets/index-*.js | wc -c
gzip -c dist/assets/index-*.css | wc -c

# Type check timing
time npx tsc --noEmit

Common Optimization Patterns

  • Lazy loading: Use React.lazy() for route-level code splitting
  • Tree shaking: Prefer named imports (import { x } from 'lib' not import lib)
  • Image optimization: Use WebP, lazy load below-fold images
  • Memoization: useMemo/useCallback for expensive computations in render
  • Bundle splitting: Vite manualChunks for vendor code separation

Output Format

# Performance Report — [DATE]

## Bundle
- JS: XXkb (gzip) — [PASS/FAIL vs 200KB budget]
- CSS: XXkb (gzip) — [PASS/FAIL vs 100KB budget]

## Build
- Build time: XXs — [PASS/FAIL vs 30s budget]
- Type check: XXs — [PASS/FAIL vs 15s budget]

## API Latency
- [endpoint]: XXms — [PASS/FAIL vs 2s budget]

## Recommendations
- [specific, actionable items]

Read the full file on GitHub · 76 lines

Changes

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.

  1. 2d ago First seen · 76 lines · 0 tokens per session scan A 8ec8aed2ee8b

Subscribe to this mod's changes

performance is an agent published in the GitHub repository isaacsight/kernel (16 stars, last pushed 3d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 674 tokens. 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-08-30.