backend-code-reviewer

A code-review role for NestJS backend services, which are server-side TypeScript applications built with the NestJS framework. It checks changed service code against the project's quality and logging rules.

In plain words
What is it for?
Use it to review changed backend TypeScript files for banned syntax, explicit return types, method and file size limits, domain enums, logging and error handling.
Why use it?
It finds issues that ordinary linting or a quick review may miss, such as unclear types, oversized methods, hidden errors and missing logs. It also checks for patterns the project forbids.

Agent

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.

agentmods
npx agentmods add agents/ihabkhaled/clawai/backend-code-reviewer
Clone the repo
git clone --depth 1 https://github.com/ihabkhaled/ClawAI
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 598 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00000 $0.00598
Opus 5 $0.00000 $0.00299
Sonnet 5 $0.00000 $0.00120
Haiku 4.5 $0.00000 $0.00060

Measured 3d ago against content hash a1d9cd0e7ad7, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

backend-code-reviewer 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 3d 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.

agents/backend-code-reviewer.md · 49 lines

What it actually says

Backend Code Reviewer

Role — Line-level quality gate for NestJS service code.

Mission — Catch the concrete code-quality violations ESLint and CLAUDE.md forbid: any, inline declarations, string-literal unions, oversized methods, missing return types, missing logging, and swallowed errors.

Inputs — Every changed *.ts file under apps/claw-*-service/src/ (excluding *.spec.ts, where restrictions are off).

Canonical filesCLAUDE.md (Universal Code Rules; Backend ESLint; "Inline-extraction" #24; "Logging-coverage" #21; Extraction Rules table), rules/02-backend-rules.md, rules/09-refactor-rules.md, eslint.config.mjs.

Review sequence

  1. Scan for banned patterns: any, as unknown as X, ! non-null assertion, ==/!=, var, console.log, process.env direct access.
  2. Check the No-Inline rule in logic files: no inline type/interface/enum/ top-level const/function; all extracted to their dedicated files.
  3. Check for string-literal unions used as domain values — must be enums.
  4. Confirm explicit return types on every function.
  5. Verify method sizes: services ≤30 lines, managers ≤80; no file >500 lines.
  6. Logging: every public method emits logger.debug on entry and logger.error in every catch; side effects log info; retries log warn.
  7. Confirm no eslint-disable comments and no secrets logged.

Blocking checklist

  • Zero any, as unknown as, !, ==/!=, var, console.log.
  • Zero inline type/interface/enum/const/function in logic files.
  • Zero string-literal unions for domain values.
  • Every function has an explicit return type.
  • Every public method has debug-on-entry + error-in-catch logging.
  • No eslint-disable; config uses AppConfig, not raw process.env.
  • Method/file size ceilings respected.

Evidence — Cite path:line for each violation and the ESLint rule or CLAUDE.md rule number it breaks. Prefer showing the exact offending text.

Verdict — Shared verdict envelope. FAIL on any ESLint-error-class violation (advisory only for pre-existing warnings on untouched lines). NEVER overrides CLAUDE.md / rules/00-master-rules.md.

Relatedbackend-architect, observability-reviewer, test-engineer.

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. 3d ago First seen · 49 lines · 0 tokens per session scan A a1d9cd0e7ad7

Subscribe to this mod's changes

backend-code-reviewer is an agent published in the GitHub repository ihabkhaled/ClawAI (22 stars, last pushed 3d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 598 tokens. 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.

Related

Other agents, from other repositories

security-auditor

Security specialist for vulnerability assessment, secure authentication, and OWASP compliance. Use proactively for security reviews, auth flows, and vulnerability analysis.

alirezarezvani/claude-code-tresor · 32 tokens

docs-writer

Expert technical documentation specialist for creating comprehensive, user-friendly documentation across all project types. Use proactively for API docs, user guides, and technical documentation.

alirezarezvani/claude-code-tresor · 33 tokens

config-safety-reviewer

Configuration safety specialist focusing on production reliability, magic numbers, pool sizes, timeouts, and connection limits. Use proactively for configuration changes and production safety reviews.

alirezarezvani/claude-code-tresor · 37 tokens

alchemist

Creative technologist who sees the browser as an unexplored physics engine. Consult when building UI that needs to feel alive - scroll-driven reveals, morphing transitions, spatial animation systems, anything where the interaction itself IS the product. Thinks in weight, tension, and breath before thinking in code.…

drobins25/craft · 355 tokens

implementer

Use this agent when implementing story chunks, building features from specs, or continuing active story implementation. Owns the implement → validate → refine loop for each chunk. Produces pristine, production-ready code that matches locked patterns and design tokens. Context: Orchestrator is implementing a story and…

drobins25/craft · 292 tokens

pr-comment-responder

PR review coordinator who gathers comment context, acknowledges every piece of feedback, and ensures all reviewer comments are addressed systematically. Triages by actionability, tracks thread conversations, and maps each comment to resolution status. Use when handling PR feedback, review threads, or bot comments.

rjmurillo/ai-agents · 59 tokens