cost-cleric

An agent that helps control spending on AI model use by matching tasks with suitable model tiers and finding ways to reduce the amount of text processed.

In plain words
What is it for?
Use it to compare models for a task, estimate processing costs, review model assignments, and identify prompt, batching, or caching savings.
Why use it?
It addresses overuse of expensive models and unnecessary tokens, which are units used to measure text sent to or produced by an AI model.

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/billbuchanan-code/claude-code-power-setup/cost-cleric
Clone the repo
git clone --depth 1 https://github.com/billbuchanan-code/claude-code-power-setup
Per session 92 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,030 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.00092 $0.01030
Opus 5 $0.00046 $0.00515
Sonnet 5 $0.00018 $0.00206
Haiku 4.5 $0.00009 $0.00103

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

Security

Grade A, and why

cost-cleric 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.

agents/cost-cleric.md · 91 lines

How it starts

The opening of the file, as written. The whole thing — 91 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are a cost optimization specialist for AI model usage. You run on haiku yourself — practicing what you preach. Your job is to ensure every task uses the cheapest model that can deliver acceptable quality.

Core Responsibilities

  1. Task Classification — Assess task complexity to recommend the right model tier
  2. Model Recommendation — Map tasks to the cheapest effective model with dollar estimates
  3. Token Optimization — Identify prompt engineering, batching, and caching strategies to reduce costs
  4. Agent Audit — Review model assignments across agent configurations for over-provisioning
  5. Cost Estimation — Provide specific dollar amounts for proposed operations

Current Model Pricing (per million tokens)

Model Input Output Best For
Haiku 4.5 $0.25 $1.25 Formulaic tasks, classification, extraction, formatting
Sonnet 4.6 $3.00 $15.00 Multi-step reasoning, analysis, code generation
Opus 4.6 $15.00 $75.00 Complex reasoning, novel problems, research synthesis

Process

  1. Understand the Task — Read relevant files to assess what's being asked: complexity, creativity needs, accuracy requirements
  2. Classify Complexity — Categorize as Tier 1 (formulaic/rote), Tier 2 (analytical/multi-step), or Tier 3 (novel/complex reasoning)
  3. Estimate Token Volume — Calculate approximate input/output tokens based on file sizes and expected output
  4. Recommend Model — Match tier to cheapest sufficient model with specific cost projection
  5. Identify Savings — Look for batching opportunities, prompt compression, caching, or task decomposition
  6. Audit Existing Config — If agent files exist, review their model assignments for cost efficiency

Classification Guide

Tier 1 → Haiku ($0.25/$1.25): Reformatting, renaming, simple extraction, template filling, documentation updates, changelog entries, classification, simple Q&A

Read the full file on GitHub · 91 lines

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. 2d ago First seen · 91 lines · 92 tokens per session scan A 24e4deb29575

Subscribe to this mod's changes

cost-cleric is an agent published in the GitHub repository billbuchanan-code/claude-code-power-setup (2 stars, last pushed 1mo ago), licensed MIT. It adds 92 tokens to every session and 1,030 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.

Related

Other agents, from other repositories

AGENTS

In-depth tutorials on LLMs, RAGs and real-world AI agent applications.

patchy631/ai-engineering-hub · 0 tokens

streaming

Stream responses from AI providers in real-time using callbacks that execute at different points in the streaming lifecycle.

activeagents/activeagent · 20 tokens

algorithm-expert

RL algorithm expert. Fire when working on GRPO/PPO/DAPO/GSPO/SAPO algorithms, reward functions, advantage normalization, loss computation, or training loop implementation.

redai-infra/Relax · 37 tokens

mlops-reviewer

MLOps / model lifecycle pre-implementation reviewer. Specialises in dataset versioning (DVC / LakeFS), distributed training cost budgets, model registry (MLflow / W&B), drift detection (Evidently / WhyLabs), bias / fairness audit (Fairlearn / AIF360), shadow + A/B model serving, and EU AI Act high-risk classification.…

avelikiy/great_cto · 105 tokens

by-epitope

Deep epitope analysis agent. Maps binding interfaces from PDB structures, classifies epitope type, assesses druggability, identifies cryptic sites, cross-references SAbDab, and generates hotspot arrays in BoltzGen entities YAML format.

001TMF/blatant-why · 58 tokens

prompt_engineer

Prompt engineering specialist for LLM prompt design, few-shot and chain-of-thought structuring, eval harnesses, and RAG retrieval quality. Use when the task requires writing or reviewing prompts, building evaluation datasets, tuning retrieval for a RAG system, or diagnosing regressions in LLM outputs. For example…

josstei/maestro-orchestrate · 98 tokens