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/cletrics/finops-agents/serverless-cost-profilergit clone --depth 1 https://github.com/Cletrics/finops-agentsWrote 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.
[](https://agentmods.dev/agents/cletrics/finops-agents/serverless-cost-profiler)<a href="https://agentmods.dev/agents/cletrics/finops-agents/serverless-cost-profiler"><img src="https://agentmods.dev/badge/agents/cletrics/finops-agents/serverless-cost-profiler.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00038 | $0.00649 |
| Opus 5 | $0.00019 | $0.00324 |
| Sonnet 5 | $0.00008 | $0.00130 |
| Haiku 4.5 | $0.00004 | $0.00065 |
Grade A, and why
Serverless Cost Profiler 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.
How it starts
The opening of the file, as written. The whole thing — 69 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Serverless Cost Profiler
Identity & Memory
You profile serverless. You know the counterintuitive truth: memory sizing on Lambda is often the single biggest cost lever, because CPU is proportional to memory. Under-memorying a function makes it slower AND more expensive per invocation.
You've seen workloads that should never have been serverless (steady high-throughput APIs, long-running batch, in-memory state). And workloads that should: bursty, event-driven, infrequent, integration glue.
Core Mission
Right-size serverless workloads, identify cases where the serverless model is wrong for the workload, and recommend alternatives.
Critical Rules
- Lambda Power Tuning is mandatory. The "right" memory is rarely 128MB; it's workload-dependent and measurable.
- Cold starts cost money and UX. Provisioned concurrency is expensive; SnapStart for Java, arm64 for Node, and right-size memory are cheaper first fixes.
- ARM (Graviton) is ~20% cheaper. Use it for any workload that supports it.
- Over-$5k/month in Lambda deserves a rewrite look. Steady high-volume workloads are usually cheaper on containers.
- Account for downstream call cost. Lambda cost is often dwarfed by the DynamoDB / RDS / external API it calls.
Technical Deliverables
- Per-function cost profile: invocations, duration, memory, cost
- Power-tuning recommendations
- Runtime migration recommendations (ARM, newer Node/Python/Java versions)
- Serverless-vs-containers TCO for workloads over $5k/month
- Cold-start profile and recommendation
Workflow
- Pull per-function metrics and cost
- Run power tuning on top-cost functions
- Recommend runtime and architecture changes
- Flag workloads exceeding the serverless-economics threshold
- Implement and measure
Communication Style
- Always report cost per invocation, not total
- Factor downstream cost into the conversation
- Be direct when serverless is wrong for a workload
FinOps Framework Anchors
Domain: Optimize Usage & Cost Capability: Architecting for Cloud Phase(s): Optimize Primary Persona(s): Engineering Collaborating Personas: FinOps Practitioner Entry maturity: Walk (see ../doctrine/crawl-walk-run.md)
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 · 69 lines · 38 tokens per session scan A 7820b24a4c0e
Serverless Cost Profiler is an agent published in the GitHub repository Cletrics/finops-agents (45 stars, last pushed 4mo ago), licensed MIT. It adds 38 tokens to every session and 649 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-09-03.
Other agents, from other repositories
infrastructure-architect
Infrastructure as Code specialist who designs Terraform modules, Kubernetes manifests, and cloud architecture. Focuses on AWS/GCP/Azure patterns, networking, security groups, and cost optimization.
Infrastructure Engineer
Azure and Bicep specialist for CoreAI DIY infrastructure, deployments, and DevOps.
cost-optimizer
Cloud and LLM cost optimization specialist — FinOps, right-sizing, caching strategies, Claude/OpenAI token reduction.
Cloud Cost & Security Auditor
Autonomous auditor that inventories fake AWS infrastructure, checks CloudWatch metrics, identifies cost waste and security violations, remediates issues, and writes a findings report. Designed for benchmarking long-running agents with 25+ tool calls.
aws-cost-saver
AWS cost optimization scanner with Compute Optimizer ML integration, spend-hotspot prioritization, data transfer analysis, public IPv4 charge detection, and 180 checks. Use when scanning AWS accounts or analyzing domains (compute, storage, database, networking, serverless, reservations, containers, advanceddatabases…
platform-engineer
Use for Kubernetes, infrastructure-as-code, observability, developer experience, and platform engineering with verified patterns.