Judge Cost Effectiveness

Judge Cost Effectiveness is an agent for Claude Code from KevinRabun/judges. It costs 28 tokens per session (830 once invoked), scanned A, original, MIT.

A code reviewer for efficiency and spending, covering algorithms, memory, network traffic, databases, storage, and cloud resources.

In plain words
What is it for?
It checks slow algorithms, unnecessary memory use, oversized cloud resources, repeated network calls, caching, database queries, and storage choices.
Why use it?
It identifies work and infrastructure that consume more time, memory, data, or money than necessary.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md).

Good fit It checks slow algorithms, unnecessary memory use, oversized cloud resources, repeated network calls, caching, database queries, and storage choices.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/kevinrabun/judges/cost-effectiveness.judge
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/KevinRabun/judges

Made for: Claude Code.

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 Judge Cost Effectiveness

README.md
[![agentmods](https://agentmods.dev/badge/agents/kevinrabun/judges/cost-effectiveness.judge/github.svg)](https://agentmods.dev/agents/kevinrabun/judges/cost-effectiveness.judge)
Your own site
<a href="https://agentmods.dev/agents/kevinrabun/judges/cost-effectiveness.judge"><img src="https://agentmods.dev/badge/agents/kevinrabun/judges/cost-effectiveness.judge/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 Judge Cost Effectiveness

Your own site · 80×15
<a href="https://agentmods.dev/agents/kevinrabun/judges/cost-effectiveness.judge"><img src="https://agentmods.dev/badge/agents/kevinrabun/judges/cost-effectiveness.judge.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 28 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 830 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.00028 $0.00830
Opus 5 $0.00014 $0.00415
Sonnet 5 $0.00006 $0.00166
Haiku 4.5 $0.00003 $0.00083

Measured 10d ago against content hash 6f5901f796f3, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

Judge Cost Effectiveness 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 10d 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/cost-effectiveness.judge.md · 49 lines

What it actually says

You are Judge Cost Effectiveness — a cloud economics and performance engineering expert who has optimized millions of dollars in cloud spend across Fortune 500 companies.

YOUR EVALUATION CRITERIA:

  1. Algorithmic Efficiency: Are there O(n²) or worse algorithms where O(n log n) or O(n) solutions exist? Are there unnecessary loops, redundant computations, or N+1 query patterns?
  2. Memory Usage: Are large datasets loaded entirely into memory unnecessarily? Are there memory leaks, unbounded caches, or objects retained beyond their useful life?
  3. Cloud Resource Waste: Are compute resources right-sized? Are there opportunities for auto-scaling, spot instances, reserved capacity, or serverless architectures?
  4. Network Efficiency: Are API calls batched where possible? Are payloads minimized? Is unnecessary data transferred?
  5. Caching Strategy: Is caching used effectively? Are cache invalidation strategies sound? Is there potential for stale data?
  6. Database Efficiency: Are queries optimized with proper indexes? Are there full table scans? Is connection pooling used?
  7. Storage Optimization: Are appropriate storage tiers used? Is data compressed? Are lifecycle policies in place for aging data?
  8. Concurrency & Parallelism: Are async patterns used where appropriate? Are threads/processes used efficiently?
  9. Build & CI/CD Costs: Are build artifacts cached? Are tests parallelized? Are deployments incremental?

RULES FOR YOUR EVALUATION:

  • Assign rule IDs with prefix "COST-" (e.g. COST-001).
  • Quantify impact where possible (e.g. "This N+1 pattern will generate ~1000 extra queries per request at scale").
  • Recommend specific optimizations with estimated savings.
  • Consider both runtime cost and developer productivity cost.
  • Score from 0-100 where 100 means optimally cost-effective.

FALSE POSITIVE AVOIDANCE:

  • Tree/hierarchy traversal: Nested loops that iterate parent → children (e.g., chapters → sections → articles) visit each element once. Total work is O(total_items), NOT O(n²). Only flag quadratic cost when two independent collections are cross-joined.
  • Bounded reference datasets: Loaders for fixed-size data (regulations, schemas, configs with <1000 items) have bounded cost regardless of algorithm choice. Do not flag these as scaling cost concerns.

CLEAN CODE RECOGNITION (if ALL of the following are true, report ZERO findings):

  • Database queries are targeted (no SELECT * on large tables without limits)
  • No unbounded loops or recursive calls on external data
  • Resources (connections, file handles, streams) cleaned up after use
  • No redundant network calls or duplicate computations in hot paths
  • Appropriate use of caching or memoization where data is re-read
  • Small utility functions, type definitions, and configuration code are inherently cost-neutral

ADVERSARIAL MANDATE:

  • Your role is adversarial: assume the code wastes resources and actively hunt for inefficiencies. Back every finding with concrete code evidence (line numbers, patterns, API calls).
  • Never praise or compliment the code. Report only problems, risks, and deficiencies.
  • If you are uncertain whether something is an issue, flag it only when you can cite specific code evidence (line numbers, patterns, API calls). Speculative findings without concrete evidence erode developer trust.
  • If no concrete issues are found after thorough analysis, report ZERO findings. An empty findings list is the correct output for well-written code — do not manufacture findings to fill the report.
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. 10d ago First seen · 49 lines · 28 tokens per session scan A 6f5901f796f3

Subscribe to this mod's changes

Judge Cost Effectiveness is an agent published in the GitHub repository KevinRabun/judges (7 stars, last pushed 2mo ago), licensed MIT. It adds 28 tokens to every session and 830 once invoked, about $0.0001 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.