backend-analyzer

backend-analyzer is an agent for Claude Code from hculap/better-code. It costs 44 tokens per session (884 once invoked), scanned A, original, MIT.

An analysis agent that reviews server-side code for slow algorithms, blocking work, repeated calculations, and other backend inefficiencies. Backend code runs on the server, while business logic is the code that implements an application's rules.

In plain words
What is it for?
Use it to inspect Node.js, TypeScript, Python, Go, Java, Ruby, or similar backend services for inefficient algorithms, async-operation problems, unnecessary loops, and missing caching opportunities.
Why use it?
It helps find work that makes server requests slower or uses more memory and processing than necessary. It also checks asynchronous code, where tasks can run without stopping other work.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the n1-optimizer plugin — 1 skill, 1 command, 4 agents shipped together

Good fit Use it to inspect Node.js, TypeScript, Python, Go, Java, Ruby, or similar backend services for inefficient algorithms, async-operation problems, unnecessary loops, and missing caching opportunities.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/hculap/better-code/backend-analyzer
Install

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.

Clone the repo
git clone --depth 1 https://github.com/hculap/better-code

Made for: Claude Code.

Or install n1-optimizer, the plugin that ships this one along with the rest of its 1 skill, 1 command, 4 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for backend-analyzer

README.md
[![agentmods](https://agentmods.dev/badge/agents/hculap/better-code/backend-analyzer/github.svg)](https://agentmods.dev/agents/hculap/better-code/backend-analyzer)
Your own site
<a href="https://agentmods.dev/agents/hculap/better-code/backend-analyzer"><img src="https://agentmods.dev/badge/agents/hculap/better-code/backend-analyzer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for backend-analyzer

Your own site · 80×15
<a href="https://agentmods.dev/agents/hculap/better-code/backend-analyzer"><img src="https://agentmods.dev/badge/agents/hculap/better-code/backend-analyzer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 44 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 884 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What 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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00044 $0.00884
Opus 5.5 $0.00018 $0.00354
Sonnet 5.5 $0.00009 $0.00177
Haiku 4.5 $0.00004 $0.00088

Measured 3mo ago against content hash a25442b4d872, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 3mo 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.

plugins/n1-optimizer/agents/backend-analyzer.md · 124 lines

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:

  1. Find inefficient algorithms (O(n²) or worse where O(n) is possible)
  2. Identify blocking operations in async code
  3. Detect unnecessary loops and iterations
  4. Spot redundant computations
  5. Find memory-intensive patterns
  6. Identify missing caching opportunities

Analysis Process:

  1. Detect Tech Stack

    • Node.js/TypeScript, Python, Go, Java, Ruby, etc.
    • Framework: Express, FastAPI, Django, Spring, Rails, etc.
    • Identify async patterns used
  2. 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
  3. 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
  4. 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
Changes

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.

  1. 3mo ago First seen · 124 lines · 44 tokens per session scan A a25442b4d872

Subscribe to this mod's changes

backend-analyzer is an agent published in the GitHub repository hculap/better-code (2 stars, last pushed 1mo ago), licensed MIT. It adds 44 tokens to every session and 884 once invoked, about $0.0002 per session on Opus 5.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.

Related

backend-analyzer compared with agents from other repositories

backend-analyzer next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
backend-analyzerhculap/better-codeAgent21mo agoMITA44Claude Code
debug-integracaotray-tecnologia/tray-api-ai-pluginAgent153mo agoMITA52Claude Code
architectAlberto-Codes/docvetAgent10yesterdayMITA3Claude Code
CodeQL Fix SpecialistDollhouseMCP/collectionAgent113mo agononeA17Claude Code
comment-reviewermelodic-software/claude-code-pluginsAgent33todayMITA89Claude Code
incident-postmortemmickeyyaya/evolve-loopAgent8todayApache-2.0A23Claude Code
backend-executordynos-fit/dynos-workAgent26d agoMITA59Claude Code