Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Model Serverless Cost And Scale

ASecurity

Model serverless cost and scale — a per-invocation cost model (invocations × duration × memory + requests + data-transfer + downstream), the serverless-vs-container crossover point where steady high-throughput makes always-on cheaper (and 'serverless is cheaper' stops being true at scale), and concurrency/quota/limit planning (account/region caps, reserved/provisioned concurrency, throttle headroom). Reach for this on 'is serverless actually cheaper here?', 'where do we cross over to containe...

7 stars
0 votes
0 copies
0 views
Added 9/23/2026
ai-agentsgorailsapi

Works with

api

Security Analysis

A100/100

Scanned 9/23/2026

$npx -y skills add mcorbett51090/RavenClaude --skill model-serverless-cost-and-scale --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Model Serverless Cost And Scale?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Model Serverless Cost And Scale
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/mcorbett51090-model-serverless-cost-and-scale/badge)](https://www.skillsdirectory.com/skills/mcorbett51090-model-serverless-cost-and-scale)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
name: model-serverless-cost-and-scale
description: "Model serverless cost and scale — a per-invocation cost model (invocations × duration × memory + requests + data-transfer + downstream), the serverless-vs-container crossover point where steady high-throughput makes always-on cheaper (and 'serverless is cheaper' stops being true at scale), and concurrency/quota/limit planning (account/region caps, reserved/provisioned concurrency, throttle headroom). Reach for this on 'is serverless actually cheaper here?', 'where do we cross over to containers?', or 'plan our concurrency/quota headroom'. Driven by `serverless-runtime-and-ops-engineer` (primary), consulted by `serverless-architect` for the cost side of the serverless-vs-not call."
---

# Skill: model-serverless-cost-and-scale

> **Invoked by:** `serverless-runtime-and-ops-engineer` (primary). Consulted by `serverless-architect` for the cost crossover that decides the serverless-vs-container-vs-managed-service call, and by `harden-serverless-runtime` for the cost impact of provisioned/warm concurrency.
>
> **When to invoke:** "Is serverless actually cheaper than a container here?"; "where's the crossover point at scale?"; "model our per-invocation cost"; "plan our concurrency/quota headroom"; any cost/scale question on a serverless design.
>
> **Output:** a per-invocation cost model + the steady-vs-spiky crossover point (where always-on containers get cheaper) + a concurrency/quota headroom plan, with the assumptions and flip conditions stated.

## Procedure

1. **Frame the traffic and the unit of work.** Requests per second/day (and the *shape* — steady vs spiky/bursty vs near-zero-then-peak), the per-invocation duration, the memory/CPU allocation, and the downstream cost per call (DB, third-party API, data transfer). Cost is driven by the *shape*, not just the total.
2. **Build the per-invocation cost model** using [`../../knowledge/serverless-engineering-patterns-2026.md`](../../knowledge/serverless-engineering-patterns-2026.md). The generic model: `cost ≈ invocations × (duration × memory-price) + invocations × request-price + data-transfer + downstream`. Keep the *unit prices generic* (they're volatile — retrieval date or route to research); the **structure** of the model is what matters. Add the fixed cost of any **provisioned/warm concurrency** floor (it's always-on, so it looks like a container line item).
3. **Compute the serverless-vs-container crossover** via [`../../knowledge/serverless-engineering-decision-tree.md`](../../knowledge/serverless-engineering-decision-tree.md) Tree D. Serverless wins on **spiky/bursty/low-duty-cycle** traffic (you pay ~nothing at idle). A **steady, high-throughput** load keeps functions warm-equivalent 24/7 — at which point an always-on container/instance (flat hourly cost, high utilization) gets **cheaper per request**. Find the utilization/throughput level where the two lines cross and state it as the crossover.
4. **Sanity-check the "serverless is cheaper" claim.** At low/spiky volume it usually is; at high steady volume it usually isn't. Name *which regime this workload is in* — don't let "serverless is cheaper" ship as a slogan when the traffic is steady-high.
5. **Plan the concurrency & quota headroom.** Map peak RPS × duration → peak concurrent executions; compare to the **account/region concurrency limit**; decide **reserved** concurrency for critical paths and whether a **provisioned** floor is justified (cost from step 2). Leave throttle headroom and name the quota-increase path.
6. **Protect the downstream in the scale math.** If the function fronts a connection-pooled RDBMS, the concurrency cap is set by the *pool*, not the account limit — factor that ceiling in (and route the design fix to `harden-serverless-runtime`).
7. **State assumptions, seams, and flip conditions.** Record the traffic and price assumptions in [`../../templates/serverless-architecture-decision-record.md`](../../templates/serverless-architecture-decision-record.md); route exact provider prices to `ravenclaude-core/deep-researcher`; name the flip conditions (traffic doubles and goes steady, duration grows, memory rightsizes) that move the crossover.

## Worked example

> User: "We're told serverless will be cheaper than our two always-on containers. The function runs 300ms, 512MB, and we do about 200 requests/second all day, every day. Is that right?"

- **Traffic shape is the tell:** 200 rps *all day, every day* is **steady high-throughput**, not spiky — the regime where serverless is *least* likely to win.
- **Concurrency:** 200 rps × 0.3s ≈ **~60 concurrent executions** sustained, 24/7. That's effectively ~60 always-warm function-equivalents around the clock — you're paying per-invocation for near-100% duty cycle.
- **Per-invocation model:** ~200 × 86,400 ≈ **17.3M invocations/day**, each 300ms × 512MB, plus request + data cost. Build the model with generic unit prices (flag them volatile), then compare to the flat cost of the two containers at high utilization.
- **Crossover call (Tree D):** at this steady, high duty cycle the always-on containers are almost certainly **cheaper per request** — this workload is *past* the crossover. Serverless would win if the traffic were spiky (big peaks, near-zero troughs), because you'd stop paying at idle; it isn't.
- **Recommendation:** keep the containers (or a rightsized instance) for this steady load; reserve serverless for the spiky/bursty edges. Model the exact numbers before committing.
- **Flip condition:** if the traffic becomes spiky (e.g. a batch/seasonal pattern with long idle troughs), re-run the model — the crossover moves toward serverless.

## Guardrails

- **Never ship "serverless is cheaper" as a slogan** — name the traffic regime (spiky → serverless; steady high-throughput → container) and model the crossover for *this* workload.
- **Cost = per invocation** — invocations × duration × memory + requests + data-transfer + downstream; a provisioned/warm floor is an always-on line item, count it.
- **Model the crossover before scale makes serverless expensive** — the "serverless gets expensive at scale" point is real and predictable.
- **Concurrency math is peak RPS × duration** — compare to the account/region limit, plan reserved/provisioned, leave throttle headroom.
- **The RDBMS pool, not the account limit, may be the real concurrency ceiling** — factor it in (fix → `harden-serverless-runtime`).
- **Unit prices are volatile** — keep the model *structure* fixed and generic, carry a retrieval date, and route exact provider prices to `ravenclaude-core/deep-researcher`. See [`../../knowledge/serverless-engineering-patterns-2026.md`](../../knowledge/serverless-engineering-patterns-2026.md).

Attribution

mcorbett51090mcorbett51090
View sourceSee grades on GitHubMore from mcorbett51090 →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Caveman

Terse caveman voice: answer first, fluff gone, every technical fact kept. Use for /caveman, "caveman mode", "talk like caveman", "be brief", "less tokens". Stays on until "stop caveman" or "normal mode".

1100021 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

698621 votes

Writing Skills

Create and manage Claude Code skills in HASH repository following Anthropic best practices. Use when creating new skills, modifying skill-rules.json, understanding trigger patterns, working with hooks, debugging skill activation, or implementing progressive disclosure. Covers skill structure, YAML frontmatter, trigger types (keywords, intent patterns), UserPromptSubmit hook, and the 500-line rule. Includes validation and debugging with SKILL_DEBUG. Examples include rust-error-stack, cargo-dep...

3931 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3421 votes

catchup

Recovers the conversation and failed tool calls of a previous Codex, Amp, Claude Code, Antigravity, Cline, Copilot CLI, Cursor, DeepSeek Harness, Grok Build, Kimi, OpenCode, Pi Agent, or ZCode session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", asks to recover/summarize a previous session before continuing, or asks to diagnose or report a catchup failure. Do NOT use for the current conversation, git history, or any non-agent log.

741 votes
View all in ai-agents →