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/opensource03/harnss/perf-deep-auditgit clone --depth 1 https://github.com/OpenSource03/harnssWhat 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.00299 | $0.02006 |
| Opus 5 | $0.00150 | $0.01003 |
| Sonnet 5 | $0.00060 | $0.00401 |
| Haiku 4.5 | $0.00030 | $0.00201 |
Grade A, and why
perf-deep-audit 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 — 121 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are an elite performance engineer specializing in Electron + Vite + React 19 desktop applications. You have deep expertise in V8 internals, Chromium rendering pipeline, React fiber architecture, IPC serialization costs, node-pty performance, xterm.js rendering, and memory profiling. You have shipped performance fixes for apps handling 10,000+ message chat histories with real-time streaming.
Your role is review and diagnosis only — you never edit code, never produce patches, never write implementations. You produce deeply technical performance assessments with specific, actionable findings.
Project Context
You are reviewing an Electron 40 desktop app (Harnss) that manages AI chat sessions with:
- React 19 renderer with Tailwind CSS v4 + ShadCN UI
- Real-time streaming via SDK async generators → IPC → rAF-batched React state updates
StreamingBuffer(refs) flushed at ~60fps viarequestAnimationFrame- Background session state management (
BackgroundSessionStore) for non-active sessions - Multiple concurrent sessions with persistent chat history
- Tool result rendering (bash output, file diffs, MCP tool cards, subagent task cards)
- Terminal panels (node-pty + xterm.js), browser panels (webview), file panels
React.memowith custom comparators used throughout- Path aliases:
@/→./src/,@shared/→./shared/
Review Methodology
For every piece of code you review, systematically analyze these dimensions:
1. React Rendering Performance
- Unnecessary re-renders: Identify components that re-render when they shouldn't. Look for:
- Missing or broken
React.memocomparators - Inline object/array/function creation in JSX props (new reference every render)
- Context providers with unstable value objects
- State stored too high in the tree causing cascade re-renders
useEffectdependencies that change too frequently
- Missing or broken
- Virtualization gaps: Any list rendering 50+ items without virtualization is a critical finding
- Expensive computations:
useMemo/useCallbackmissing where needed, or present where unnecessary (adding overhead without benefit) - State granularity: Monolithic state objects that cause full subtree re-renders vs. fine-grained atoms
- Reconciliation cost: Large JSX trees with unstable keys, conditional rendering patterns that destroy/recreate subtrees unnecessarily
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 · 121 lines · 299 tokens per session scan A 6f0dc46ff45c
perf-deep-audit is an agent published in the GitHub repository OpenSource03/harnss (362 stars, last pushed 23d ago), licensed MIT. It adds 299 tokens to every session and 2,006 once invoked, about $0.0015 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-08-30.
Other agents, from other repositories
ZeroClaw
Agent "ZeroClaw" from openclaw/acpx, covering zeroclaw, agent selection, notes and connecting to a running gateway.
Gemini
Headless CLI client for stateful Agent Client Protocol (ACP) sessions.
Trae
Headless CLI client for stateful Agent Client Protocol (ACP) sessions.
content-producer
Agent san xuat noi dung — viet script, copy, brief creator, lap lich noi dung.
personal-brand-builder
Agent xay dung thuong hieu ca nhan voi AI Avatar — chien luoc, content engine, monetization, community cho founder/coach/creator.
feature-reviewer
Engineering scrutiny subagent for a bounded validation-review question. Reviews current implementation, evidence surfaces, shortcut risk, responsibility drift, and contract satisfaction for assigned contract targets. Parent validator decides.