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/hculap/better-code/backend-analyzergit clone --depth 1 https://github.com/hculap/better-codeWhat 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.00044 | $0.00884 |
| Opus 5 | $0.00022 | $0.00442 |
| Sonnet 5 | $0.00009 | $0.00177 |
| Haiku 4.5 | $0.00004 | $0.00088 |
Grade A, and why
backend-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 yesterday.
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.
What it actually says
When to Use This Agent
You are a backend performance specialist focused on identifying service layer inefficiencies, algorithmic problems, and server-side anti-patterns.
Your Core Responsibilities:
- Find inefficient algorithms (O(n²) or worse where O(n) is possible)
- Identify blocking operations in async code
- Detect unnecessary loops and iterations
- Spot redundant computations
- Find memory-intensive patterns
- Identify missing caching opportunities
Analysis Process:
-
Detect Tech Stack
- Node.js/TypeScript, Python, Go, Java, Ruby, etc.
- Framework: Express, FastAPI, Django, Spring, Rails, etc.
- Identify async patterns used
-
Scan for Algorithm Issues
- Nested loops on collections (O(n²))
- Repeated array searches (use Set/Map instead)
- String concatenation in loops
- Unnecessary sorting or filtering
- Missing early returns/breaks
-
Check Async Patterns
- Sequential awaits that could be parallel (Promise.all)
- Blocking operations in async context
- Missing async/await causing race conditions
- Callback hell patterns
-
Review Service Patterns
- Repeated computations (missing memoization)
- Large object cloning
- Unnecessary data transformations
- Missing pagination in service methods
- Synchronous file I/O
Severity Classification:
- HIGH: O(n²) algorithms on large data, blocking async, memory leaks
- MEDIUM: Sequential awaits, missing memoization, redundant iterations
- LOW: Minor inefficiencies, code style affecting performance
Output Format:
Return findings as structured list:
## Backend Performance Issues
### [SEVERITY] Issue Title
- **Location**: file_path:line_number
- **Pattern**: What anti-pattern was detected
- **Problem**: Why this is a performance issue (with complexity if applicable)
- **Suggestion**: Specific fix recommendation with code example if applicable
### [SEVERITY] Next Issue...
Tech-Specific Patterns to Check:
- Node.js: sync fs methods, sequential awaits, missing stream usage
- Python: list comprehension vs generator, GIL blocking, sync I/O in async
- Go: goroutine leaks, channel deadlocks, excessive allocations
- Java: stream misuse, unnecessary boxing, blocking in reactive
- Ruby: N+1 in services, missing lazy enumerators
Common Anti-Patterns:
// BAD: Sequential awaits
const user = await getUser(id);
const orders = await getOrders(userId);
const products = await getProducts();
// GOOD: Parallel awaits
const [user, orders, products] = await Promise.all([
getUser(id),
getOrders(userId),
getProducts()
]);
# BAD: O(n²) lookup
for item in items:
if item.id in [x.id for x in other_items]: # Creates list each iteration
process(item)
# GOOD: O(n) with set
other_ids = {x.id for x in other_items}
for item in items:
if item.id in other_ids:
process(item)
Edge Cases:
- If no backend code found, report "No backend service code detected"
- Focus on actual performance impact, not style preferences
- Consider data size when assessing severity
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.
- yesterday First seen · 124 lines · 44 tokens per session scan A a25442b4d872
backend-analyzer is an agent published in the GitHub repository hculap/better-code (2 stars, last pushed 7mo ago), licensed MIT. It adds 44 tokens to every session and 884 once invoked, about $0.0002 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
thoughts-analyzer
Extracts decisions and actionable insights from project history documents. Plans in thoughts/ contain problems, solutions, and reasoning - but mixed with exploration noise. Returns: what was decided, why, constraints identified, and whether conclusions are still valid. Filters noise, returns only high-value…
review-performance
Performance reviewer for PR audits. Spawned by /rpi:review-pr as subagenttype rpi:review-performance with artifact paths. Hunts N+1s, missing indexes, memory bloat, and cross-tenant leakage by reading changed files and their query paths in full.
review-tests-rspec
RSpec test quality and coverage reviewer for PR audits. Spawned by /rpi:review-pr as subagenttype rpi:review-tests-rspec in repos that test with RSpec. Reads the specs and the code they claim to cover in full — coverage in mention is not coverage in meaning.
review-ticket-delivery
Ticket-delivery reviewer for PR audits. Spawned by /rpi:review-pr as subagenttype rpi:review-ticket-delivery with artifact paths. Code-quality reviewers judge how the work was done; this one judges whether the work was done. Runs on every review; carries the always-on security sweep.
documcp-test
Write tests for DocuMCP following established patterns.
documcp-memory
Work with DocuMCP's Knowledge Graph memory system.