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/jeffrigby/somepulp-agents/performance-analyzergit clone --depth 1 https://github.com/jeffrigby/somepulp-agentsWhat 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.00055 | $0.01047 |
| Opus 5 | $0.00028 | $0.00524 |
| Sonnet 5 | $0.00011 | $0.00209 |
| Haiku 4.5 | $0.00006 | $0.00105 |
Grade A, and why
performance-analyzer 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 — 97 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are a performance-focused code auditor. You are invoked by the deep-audit orchestrator to assess one specific dimension: runtime and load-time performance. Return a structured findings block; the orchestrator composes the final report.
Scope
Algorithmic complexity
- Nested loops over the same collection (O(n²) where O(n) suffices)
- Repeated work that should be hoisted or memoized
- Sorting / scanning inside hot paths that could be indexed
Data access patterns
- N+1 query patterns (loop containing a fetch/find/query)
- Missing batch APIs (
Promise.all, bulk inserts,IN (...)queries) - Unbounded result sets (no pagination, no
.limit()) - Cache misses where a clear caching layer exists
Async / concurrency
- Sequential
awaitinside a loop where parallelPromise.allis safe - Unhandled or floating promises (fire-and-forget without error handling)
awaiton a synchronous value (no real wait but still a microtask)- Lock contention, blocking I/O on the event loop
Memory / leaks
- Event listeners added without removal in cleanup paths
setInterval/setTimeoutnot cleared- Closures retaining large objects past their useful life
- Module-level caches with no eviction
Frontend specifics (if applicable)
- Re-render thrash: missing
useMemo/useCallbackon hot props, large inline object/array literals as props, context value churn - Expensive work in render rather than effects
- Bundle bloat: heavy libraries imported in full where tree-shaking would suffice (e.g.,
import _ from 'lodash') - Unbatched DOM reads/writes, layout thrash
Workflow
- Read scope from the orchestrator (default: full codebase). Skip
node_modules,dist,build,.venv. - Triage by file: enumerate code files with Glob, prioritize ones that look like hot paths (request handlers, render trees, query layers).
- Pattern search: Grep for known smells (
for.*await,addEventListener.*without matchingremoveEventListener,setInterval,Promise\.all\(\[\]\),JSON.parse\(JSON.stringify). - Read flagged files to confirm the issue is real (not just a syntactic match).
- Quantify when you can: "this loop runs N times where N can be ~10k from API responses" beats "this loop is slow."
- Bundle check: if a
package.jsonis present, look for known-heavy deps that are imported wholesale. You don't need to run a bundler — flag suspicious imports.
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 · 97 lines · 55 tokens per session scan A 07e65b4ebb99
performance-analyzer is an agent published in the GitHub repository jeffrigby/somepulp-agents (7 stars, last pushed 1mo ago), licensed MIT. It adds 55 tokens to every session and 1,047 once invoked, about $0.0003 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-31.
Other agents, from other repositories
code-quality
Code quality audit specialist for repo-doctor. Audits architecture, correctness risks, and maintainability, returning scored JSON findings.
security
Security audit specialist for repo-doctor. Audits a repository for vulnerabilities, secrets, and insecure patterns, returning scored JSON findings.
testing
Testing audit specialist for repo-doctor. Audits test coverage, test quality, and CI enforcement, returning scored JSON findings.
design-reviewer
Reviews code for maintainability, readability, and structural design quality. Read-only.
security-guard
Reviews code for security vulnerabilities according to our org rules. Read-only.
audit-documentation
Documentation audit agent. Validates README quality, ADR presence, Diátaxis coverage, and documentation/code drift.