Serverless Cost Profiler

Serverless Cost Profiler is a skill for Claude Code, Codex from Cletrics/finops-agents. It costs 38 tokens per session (644 once invoked), scanned A, original, MIT.

A guide for reviewing the cost and suitability of serverless functions such as AWS Lambda, Google Cloud Functions, and Azure Functions. It covers memory sizing, startup delays, runtime choices, and cases where containers or another model may fit better.

In plain words
What is it for?
Use it to measure different memory settings, assess cold starts, choose runtime and processor options, and decide whether a function should move to containers.
Why use it?
It helps avoid paying for functions that are too slow, wrongly sized, or running on an unsuitable platform. It considers both function usage and the cost of services those functions call.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

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 skills/cletrics/finops-agents/serverless-cost-profiler
Any agent
npx skills add Cletrics/finops-agents --skill serverless-cost-profiler
Clone the repo
git clone --depth 1 https://github.com/Cletrics/finops-agents

Made for: Claude Code, Codex.

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 Serverless Cost Profiler

README.md
[![agentmods](https://agentmods.dev/badge/skills/cletrics/finops-agents/serverless-cost-profiler.svg)](https://agentmods.dev/skills/cletrics/finops-agents/serverless-cost-profiler)
Your own site
<a href="https://agentmods.dev/skills/cletrics/finops-agents/serverless-cost-profiler"><img src="https://agentmods.dev/badge/skills/cletrics/finops-agents/serverless-cost-profiler.svg" alt="Measured on agentmods" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 644 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.1 $0.00038 $0.00644
Opus 5 $0.00019 $0.00322
Sonnet 5 $0.00008 $0.00129
Haiku 4.5 $0.00004 $0.00064

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

Security

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

integrations/gemini-cli/skills/serverless-cost-profiler/SKILL.md · 68 lines

How it starts

The opening of the file, as written. The whole thing — 68 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

  1. Lambda Power Tuning is mandatory. The "right" memory is rarely 128MB; it's workload-dependent and measurable.
  2. Cold starts cost money and UX. Provisioned concurrency is expensive; SnapStart for Java, arm64 for Node, and right-size memory are cheaper first fixes.
  3. ARM (Graviton) is ~20% cheaper. Use it for any workload that supports it.
  4. Over-$5k/month in Lambda deserves a rewrite look. Steady high-volume workloads are usually cheaper on containers.
  5. 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

  1. Pull per-function metrics and cost
  2. Run power tuning on top-cost functions
  3. Recommend runtime and architecture changes
  4. Flag workloads exceeding the serverless-economics threshold
  5. 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)

Read the full file on GitHub · 68 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 · 68 lines · 38 tokens per session scan A b7d7d62ca3c3

Subscribe to this mod's changes

Serverless Cost Profiler is a skill published in the GitHub repository Cletrics/finops-agents (45 stars, last pushed 4mo ago), licensed MIT. It adds 38 tokens to every session and 644 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.

Related

Other skills, from other repositories

cis-aws-foundations-2.2

Maintain current AWS account contact details.

CyberStrikeus/CyberStrike · 16 tokens

azure-mgmt-applicationinsights-dotnet

Azure Application Insights SDK for .NET. Application performance monitoring and observability resource management. Use for creating Application Insights components, web tests, workbooks, analytics items, and API keys. Triggers: "Application Insights", "ApplicationInsights", "App Insights", "APM", "application…

microsoft/skills · 82 tokens

azure-resource-manager-mysql-dotnet

Azure MySQL Flexible Server SDK for .NET. Database management for MySQL Flexible Server deployments. Use for creating servers, databases, firewall rules, configurations, backups, and high availability. Triggers: "MySQL", "MySqlFlexibleServer", "MySQL Flexible Server", "Azure Database for MySQL", "MySQL database…

microsoft/skills · 87 tokens

scaffold

Generate deployment-ready infrastructure code from an architecture plan, verify it with adversarial self-review, and bridge to validation — all without deploying.

microsoft/skills · 0 tokens

azure-mgmt-botservice-dotnet

Azure Resource Manager SDK for Bot Service in .NET. Management plane operations for creating and managing Azure Bot resources, channels (Teams, DirectLine, Slack), and connection settings. Triggers: "Bot Service", "BotResource", "Azure Bot", "DirectLine channel", "Teams channel", "bot management .NET", "create bot".

microsoft/skills · 78 tokens

azure-mgmt-fabric-dotnet

Azure Resource Manager SDK for Fabric in .NET. Use for MANAGEMENT PLANE operations: provisioning, scaling, suspending/resuming Microsoft Fabric capacities, checking name availability, and listing SKUs via Azure Resource Manager. Triggers: "Fabric capacity", "create capacity", "suspend capacity", "resume capacity"…

microsoft/skills · 88 tokens