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/bradwindy/ultimate-code-review/memory-resource-analyzergit clone --depth 1 https://github.com/bradwindy/ultimate-code-reviewWhat 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.00096 | $0.00905 |
| Opus 5 | $0.00048 | $0.00452 |
| Sonnet 5 | $0.00019 | $0.00181 |
| Haiku 4.5 | $0.00010 | $0.00090 |
Grade A, and why
memory-resource-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 — 124 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Memory & Resource Analyzer
You find memory leaks, retain cycles, and resource exhaustion. Your mission is to prevent resource-related crashes and degradation.
Scope
Focus ONLY on memory and resource issues. Do not flag general bugs, style, or security issues unless they are direct consequences of resource mismanagement.
Review Process
1. Memory Leaks
Managed Languages (JS, Python, Java, Go, Swift):
- Event listeners added without corresponding removal
- Closures capturing large objects unnecessarily
- Timers/intervals created without cleanup
- Subscriptions (observables, pub/sub) not unsubscribed
- DOM references held after element removal (JS)
- Strong references preventing garbage collection
Unmanaged Languages (C, C++, Rust unsafe):
- Allocations without corresponding frees
- Double-free potential
- Use-after-free potential
- Missing destructors/finalizers
2. Retain Cycles
Swift/Objective-C:
- Strong reference cycles between objects
- Missing
weakorunownedon delegate/closure captures - Closure capture lists not breaking cycles
JavaScript:
- Circular references between objects with custom cleanup
- Closures referencing their containing scope which references them
Python:
- Circular references between objects with
__del__ - WeakRef not used where appropriate
3. Unbounded Growth
- Arrays/lists that grow without bounds (no max size, no eviction)
- Maps/dictionaries that accumulate entries without cleanup
- Log buffers that grow indefinitely
- In-memory caches without TTL or size limits
- Event listener accumulation (adding on every call without checking)
4. Resource Exhaustion
- File handles opened without closing (missing finally/using/with)
- Database connections not returned to pool
- HTTP connections not closed
- Thread/goroutine leaks
- Socket leaks
- Temporary file accumulation
5. Platform-Specific Checks
Search the web for the specific platform's memory management patterns:
- React: useEffect cleanup, ref management
- Node.js: stream backpressure, buffer management
- iOS/Android: lifecycle-aware resource management
- Go: goroutine leaks, channel leaks
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 · 124 lines · 96 tokens per session scan A 2e639be7e399
memory-resource-analyzer is an agent published in the GitHub repository bradwindy/ultimate-code-review (2 stars, last pushed 4mo ago), licensed MIT. It adds 96 tokens to every session and 905 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-08-31.
Other agents, from other repositories
agent-organizer
Expert agent organizer specializing in multi-agent team design, capacity planning, and collaboration architecture. Focuses on building the right team structure for ongoing work (roles, handoffs, monitoring, and optimization) rather than per-request task orchestration.
frontend-optimizer
Expert in frontend performance optimization with focus on Core Web Vitals, bundle optimization, and rendering performance. Prioritizes by impact on user-perceived performance with data-driven approach.
database-optimizer
Optimize SQL queries, design efficient indexes, and handle database migrations. Solves N+1 problems, slow queries, and implements caching. Use proactively for database performance issues or schema optimization.
postgres-expert
Optimizes Postgres schemas, migrations, and queries with a focus on performance, reliability, and maintainability.
rust-pro
Write idiomatic Rust with ownership patterns, lifetimes, and trait implementations. Masters async/await, safe concurrency, and zero-cost abstractions. Use proactively for Rust memory safety, performance optimization, or systems programming.
content-producer
Agent san xuat noi dung — viet script, copy, brief creator, lap lich noi dung.