fastly-stats

fastly-stats is a skill for Claude Code, Codex from fastly/fastly-agent-toolkit. It costs 98 tokens per session (3,270 once invoked), scanned A, original, MIT.

A guide to reading traffic and usage data from Fastly, a content-delivery service that serves websites from edge servers. It covers cache results, requests, errors, bandwidth, latency, domains, account usage, and billing.

In plain words
What is it for?
Use it to inspect Fastly traffic, cache performance, origin-server load, response errors, latency, usage, and costs.
Why use it?
It helps avoid misleading totals caused by incorrect time windows, unit conversions, or averaging measurements that should be recalculated from raw counts.

Skill for Claude CodeCodex

Part of the fastly-agent-toolkit plugin — 10 skills shipped together

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/fastly/fastly-agent-toolkit/fastly-stats
Any agent
npx skills add fastly/fastly-agent-toolkit --skill fastly-stats
Clone the repo
git clone --depth 1 https://github.com/fastly/fastly-agent-toolkit

Made for: Claude Code, Codex.

Or install fastly-agent-toolkit, the plugin that ships this one along with the rest of its 10 skills.

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 fastly-stats

README.md
[![agentmods](https://agentmods.dev/badge/skills/fastly/fastly-agent-toolkit/fastly-stats.svg)](https://agentmods.dev/skills/fastly/fastly-agent-toolkit/fastly-stats)
Your own site
<a href="https://agentmods.dev/skills/fastly/fastly-agent-toolkit/fastly-stats"><img src="https://agentmods.dev/badge/skills/fastly/fastly-agent-toolkit/fastly-stats.svg" alt="Measured on agentmods" height="20"></a>
Per session 98 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,270 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00098 $0.03270
Opus 5 $0.00049 $0.01635
Sonnet 5 $0.00020 $0.00654
Haiku 4.5 $0.00010 $0.00327

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

Security

Grade A, and why

fastly-stats scanned grade A with 1 finding 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 5d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

Prefer the `fastly` CLI. Drop to `curl` only for the seven things the CLI cannot do, listed under
skills/fastly-stats/SKILL.md · 198 lines

How it starts

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

Fastly stats

Prefer the fastly CLI. Drop to curl only for the seven things the CLI cannot do, listed under Raw API below.

Rules that decide whether the answer is right

  1. Bytes to GB is decimal SI: bytes / 1e9. TB is / 1e12. Never 2^30. Fastly bills in decimal units, so a GiB figure is wrong by 7.4% and still reads as a plausible number.
  2. For a calendar window, pass explicit UTC boundaries: --from 2026-07-01T00:00:00Z --to 2026-08-01T00:00:00Z returns every day bucket in July. A bucket is emitted only when the whole period falls inside the window, and a relative window opens and closes mid-bucket, so --from "N days ago" --by day returns N-1 buckets, never N, and "1 day ago" returns none at all. Relative strings are safe at --by hour, not at --by day.
  3. On the raw API, from=yesterday means 12:00:00 UTC, not midnight, and from=today means now. N days ago / N hours ago are exact offsets. Read back meta.from / meta.to.
  4. hit_ratio, edge_hit_ratio and origin_offload are gauges. Never sum or average them across buckets. Recompute from the summed counters: hits / (hits + miss).
  5. ts/h on rt.fastly.com covers the last 120 seconds, not an hour, and returns only the seconds that carried traffic. Divide a rate by 120 there, or by the window you bounded when sampling with the CLI; never by the sample count or the recorded span. Print the window beside the rate.
  6. fastly stats ... --json emits NDJSON, one object per line, no array. Slurp with jq -s before aggregating. The raw HTTP API returns a normal array in data.
  7. Stats responses omit services with zero traffic in the window. Enumerate from fastly service list --json and default sums with add // 0.
  8. Do not read the newest bucket. Historical aggregation keeps growing for a few minutes after a period closes.
  9. On a Compute service the traffic lands in compute_requests and requests stays 0. Summing requests alone reports zero traffic for a service that is serving fine. Check both.
  10. Status codes split the same way. Use all_status_*, never bare status_* or compute_resp_status_*: status_5xx is 0 on Compute, compute_resp_status_5xx is absent on VCL, all_status_5xx is right on both. No all_requests exists, so denominators still need requests + compute_requests.

Read the full file on GitHub · 198 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 5d ago First seen · 198 lines · 98 tokens per session scan A 9d328ded28cd

Subscribe to this mod's changes

fastly-stats is a skill published in the GitHub repository fastly/fastly-agent-toolkit (32 stars, last pushed 4d ago), licensed MIT. It adds 98 tokens to every session and 3,270 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

google-cloud-solution-guided-gke-ai-migration

Guides the migration of existing AI workloads (Cloud Run, Gemini API, Gemini Enterprise Agent Platform) to self-hosted GKE inference using gcloud and kubectl. Use when the user has an existing AI inference workload (on Cloud Run, the Gemini API, Gemini Enterprise Agent Platform, or a custom VM) and wants to move it to…

google/skills · 157 tokens

agent-platform-tuning

Agent Platform Model Tuning. Use when you need to fine-tune open models or Gemini models using Agent Platform infrastructure. Don't use for model training outside Agent Platform, model deployment to endpoints (use agent-platform-deploy), or managing serving endpoints (use agent-platform-endpoint-management).

google/skills · 64 tokens

gke-alert-configuration

Configures alerting policies in Terraform for Google Kubernetes Engine (GKE) clusters, workloads, and services using PromQL and Google Cloud Managed Service for Prometheus. Use when writing, analyzing, validating, or deploying Terraform alerting policies to monitor GKE service latency, traffic, error rates using…

google/skills · 120 tokens

gke-compute-classes

Configures, optimizes, and troubleshoots GKE ComputeClasses. Use when configuring Spot VMs with on-demand fallback, targeting specific accelerators (GPUs/TPUs) or machine families, restricting ComputeClass access, or debugging pending pods related to node pool auto-creation. Do not use for cluster-level Node Auto…

google/skills · 83 tokens

google-cloud-solution-n-tier-serverless-web-app

Assists in designing and implementing secure n-tier serverless web applications and microservices on Google Cloud. Use when users need architecture designs, security checklists, Terraform code, or deployment guidance for multi-tier serverless apps, regional data residency / European sovereignty compliance, zero-trust…

google/skills · 91 tokens

application-design-center-design-deploy

Processes GCP infrastructure design and deployment workflows within Application Design Center (ADC). Use when: - Designing GCP infrastructure with Terraform. - Validating local HCL. - Performing best-practice plan scans. - Importing templates to Application Design Center (ADC). - Deploying templates. - Troubleshooting…

google/skills · 94 tokens