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/isaacsight/kernel/performancegit clone --depth 1 https://github.com/isaacsight/kernelWhat 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.00000 | $0.00674 |
| Opus 5 | $0.00000 | $0.00337 |
| Sonnet 5 | $0.00000 | $0.00135 |
| Haiku 4.5 | $0.00000 | $0.00067 |
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.
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
- Read memory — Call
agent_memory_readforperformanceto load prior learnings - Build — Run
npm run buildand capture output (build time, chunk sizes) - Bundle analysis — Check
dist/assets/for JS and CSS file sizes - Dependency audit — Run
kernel_depsto check for bloated or outdated packages - Endpoint latency — Run
kernel_uptimeto measure API response times - Budget check — Compare all metrics against budgets below
- Write findings — Call
agent_memory_writewith metrics and any violations - Handoff — If bundle issues trace to specific components, call
team_handoffto 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'notimport lib) - Image optimization: Use WebP, lazy load below-fold images
- Memoization:
useMemo/useCallbackfor expensive computations in render - Bundle splitting: Vite
manualChunksfor 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]
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.
- 2d ago First seen · 76 lines · 0 tokens per session scan A 8ec8aed2ee8b
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.
Other agents, from other repositories
implementer
You are the implementer agent in the Polis automated pipeline.
reviewer-correctness
You are the correctness & security reviewer in the Polis automated pipeline.
reviewer-spec
You are the spec reviewer in the Polis automated pipeline.
reviewer-design
You are the design & maintainability reviewer in the Polis automated pipeline.
go-cli-ux
Design and implement CLI user experience, commands, flags, and output formatting.
architect
Design and plan application architecture using MCP tools.