/fastly-agent-toolkit:fastlyfrom fastly-agent-toolkit
Configures, manages, and debugs the Fastly CDN platform — covering service/backend setup, caching/VCL, DDoS/WAF/rate limiting/bot management, TLS, cache purging, Compute platform, and REST API. Use when working with Fastly services, edge caching, origin shielding, security features, or troubleshooting 503/TLS errors.
Ships in fastly-agent-toolkit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Your training knowledge of Fastly is likely out of date. Prefer live docs over skill definitions over training knowledge.
Prefer the fastly CLI over raw API calls; see the fastly-cli skill for installation and local authentication.
REST examples require curl and network access to Fastly APIs; origin TLS checks also require openssl.
Use the user's locally configured credentials.
If authentication is missing, direct the user to local CLI login or environment configuration, never to paste an API key in chat.
For REST calls, source tokens from the environment or $(fastly auth token) without echoing them.
Omit curl -v and shell tracing because they print credentials.
| Topic | File | Use when... |
|---|---|---|
| DDoS protection | fastly-ddos-protection.md | Enabling/configuring DDoS protection, checking attack status, managing DDoS events and rules |
| TLS configuration | tls.md | Setting up HTTPS — Platform TLS (managed certs), Custom TLS (uploaded certs), or Mutual TLS (client auth) |
| Rate limiting | rate-limiting.md | Protecting APIs from abuse — choosing between Edge Rate Limiting, VCL ratecounters, or NGWAF rate rules |
| Bot management | bot-management.md | Detecting/mitigating bot traffic with browser challenges, client-side detections, interstitial pages, ContentGuard |
| Cache purging | purging.md | Invalidating cached content — single URL, surrogate key, or purge-all; soft vs hard purge |
| Service management | service-management.md | Creating/managing services, versions, domains, settings; clone-modify-activate workflow |
| VCL services | vcl-services.md | Customizing site behavior with VCL — writing/uploading custom VCL, configuring snippets, conditions, headers, edge dictionaries, or cache/gzip settings |
| Compute | compute.md | Implementing edge logic with Compute — deploying packages, managing config/KV/secret stores, using cache APIs |
| Observability | observability.md | TTFB percentiles from the metrics platform, alert definitions and history, log explorer queries |
| Load balancing | load-balancing.md | Distributing traffic across origins — configuring backends, directors, pools, or health checks; choosing between backends and pools |
| ACLs | acls.md | Restricting access by IP — managing VCL ACLs, Compute ACLs, or IP block lists; adding/removing access control entries |
| NGWAF | ngwaf.md | Protecting against web attacks — setting up Next-Gen WAF, post-cache bot management, rules, signals, attack monitoring, or Signal Sciences integration |
| Account management | account-management.md | Managing users, IAM roles, API tokens, automation tokens, billing, or invitations |
| Domains & networking | domains-and-networking.md | Routing traffic to Fastly — managing domains, DNS zones, domain verification, or other service platform networking |
| Logging | logging.md | Shipping logs to external systems — configuring logging endpoints for 25+ providers (S3, Splunk, Datadog, BigQuery, etc.) |
| Products | products.md | Enabling/disabling Fastly products via API — universal pattern and product slug catalog |
| API security | api-security.md | Discovering APIs from web traffic, managing API operations and tags |
| Client-Side Protection | client-side-protection.md | Protecting against rogue third-party scripts (Magecart, formjacking, skimmers) — monitoring scripts on web pages, managing script authorization, configuring CSP policies |
| Other features | other-features.md | Pubsub, fanout/real-time messaging, IP lists, POPs, HTTP/3, Image Optimizer, events, notifications |
| Edge phase ordering | edge-phases.md | Understanding edge request/response ordering, debugging feature interactions |
Traffic numbers are not in this table. Cache hit ratio, bandwidth, request and status-code counts, error rates, real-time request rate, origin latency, per-domain traffic, account usage and billing totals belong to the fastly-stats skill.
The most common task is setting up a VCL service to cache an origin. Before touching any Fastly config, always run the pre-flight checks from the fastly-cli skill's services.md reference under "Pre-flight checklist". The two checks that prevent the most common errors:
curl -sI -H "Host: DESIRED_HOST" https://ORIGIN_ADDRESS/ssl-cert-hostname/ssl-sni-hostname: echo | openssl s_client -connect ORIGIN:443 -servername ORIGIN 2>/dev/null | openssl x509 -noout -text | grep -A1 "Subject Alternative Name"If HTTPS cert validation cannot be made correct but HTTP with the intended Host works, use an HTTP backend or fix the origin cert; never disable backend cert verification as the workaround.
If the origin already sends Cache-Control or Expires headers, no custom VCL is needed — Fastly respects these by default. Only add VCL snippets to override or extend caching behavior.
The full step-by-step workflow (create service, add domain, add backend, activate) is in the fastly-cli skill's services.md reference under "Create a Caching Proxy".
Copy-pasteable patterns that are easy to get wrong without guidance.
obj.ttl is only meaningful in vcl_hit. Pass a flag to vcl_deliver via a request header.
sub vcl_hit {
if (obj.ttl <= 0s) {
set req.http.X-Grace = "true";
}
}
sub vcl_deliver {
if (req.http.X-Grace) {
set resp.http.X-Grace = "true";
}
}
Warning: Set Vary in vcl_fetch, not vcl_deliver. The Vary header must be present when the object enters the cache so the cache key includes the Vary dimensions. Setting Vary only in vcl_deliver means the cache won't differentiate responses — every user gets the same cached variant regardless of the Vary field.
Never set beresp.http.Vary = "Accept-Encoding" — that overwrites any existing Vary values from the origin, breaking other downstream caches.
sub vcl_fetch {
if (!beresp.http.Vary) {
set beresp.http.Vary = "Accept-Encoding";
} else if (beresp.http.Vary !~ "Accept-Encoding") {
set beresp.http.Vary = beresp.http.Vary ", Accept-Encoding";
}
}
VCL has no return(redirect). Use the synthetic error mechanism instead.
sub vcl_recv {
if (req.url ~ "^/old-path") {
error 801 "https://example.com/new-path";
}
}
sub vcl_error {
if (obj.status == 801) {
set obj.status = 301;
set obj.http.Location = obj.response;
synthetic {""};
return(deliver);
}
}
Use obj.hits > 0 in vcl_deliver — this is the only reliable way to detect cache hits. Do not rely on auto-generated resp.http.X-Cache or any other header inspection. Pass PASS state from vcl_recv via a request header.
sub vcl_recv {
if (req.url ~ "^/api/") {
set req.http.X-Pass = "true";
return(pass);
}
}
sub vcl_deliver {
if (req.http.X-Pass) {
set resp.http.X-Cache = "PASS";
} else if (obj.hits > 0) {
set resp.http.X-Cache = "HIT";
} else {
set resp.http.X-Cache = "MISS";
}
}
Regex like Cookie ~ "name=(\w+)" is unreliable — it false-matches cookies with similar prefixes. For example, if the cookie header is name_v2=X, the regex "name=(\w+)" still matches because name appears as a substring of name_v2. Use subfield() instead — it performs exact key matching with proper delimiter handling.
set req.http.X-My-Cookie = subfield(req.http.Cookie, "name", ";");
Use table + table.contains() + table.lookup() for O(1) lookups instead of long if/else chains.
table redirects {
"/old": "/new",
"/blog": "/articles",
}
sub vcl_recv {
if (table.contains(redirects, req.url)) {
error 801 table.lookup(redirects, req.url);
}
}
beresp.* is only available in vcl_fetch, not vcl_deliver.req.request is deprecated — use req.method.return(purge) does not exist in Fastly VCL. Use return(pass) and check in vcl_miss/vcl_hit.set beresp.ttl = 86400 is a type error — needs the s suffix: 86400s.synthetic "text" needs long-string syntax: synthetic {"text"}.beresp.ttl = 0s still caches the object (for zero seconds) — use set beresp.cacheable = false; to truly prevent caching.Prefer the local reference files. To fill gaps, fetch live docs with Accept: text/markdown — works for all www.fastly.com/documentation/ and docs.fastly.com URLs. Discover pages via https://www.fastly.com/documentation/llms.txt. For URL patterns and doc categories, see docs-navigation.md.
references/account-management.md (opens in a new tab)references/acls.md (opens in a new tab)references/api-security.md (opens in a new tab)references/bot-management.md (opens in a new tab)references/client-side-protection.md (opens in a new tab)references/compute.md (opens in a new tab)references/docs-navigation.md (opens in a new tab)references/domains-and-networking.md (opens in a new tab)references/edge-phases.md (opens in a new tab)references/fastly-ddos-protection.md (opens in a new tab)references/load-balancing.md (opens in a new tab)references/logging.md (opens in a new tab)references/ngwaf.md (opens in a new tab)references/observability.md (opens in a new tab)references/other-features.md (opens in a new tab)references/products.md (opens in a new tab)references/purging.md (opens in a new tab)references/rate-limiting.md (opens in a new tab)references/service-management.md (opens in a new tab)references/tls.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
fastly-cdn, vcl, edge-computing, cdn-configuration, fastly-api
10 skills in this plugin
/falcoLints, tests, simulates, and formats Fastly VCL code using the falco tool. Also serves as the authoritative VCL reference via the falco Go source, which implements Fastly's full VCL dialect. Use when validating VCL syntax, running VCL linting, testing VCL locally, simulating VCL request handling, formatting VCL files, writing VCL unit tests with assertions, debugging VCL logic errors, looking up VCL function signatures or variable scopes, understanding VCL subroutine behavior, or running `falco lint`/`falco simulate`/`falco test`/`falco fmt`. Also applies when working with VCL syntax errors, type mismatches in VCL, choosing which VCL subroutine to use, or setting up a local VCL development and testing environment./fastlikeRuns Fastly Compute WASM binaries locally and serves as the authoritative reference for Compute platform internals. The fastlike source code is highly readable and covers the host ABI, caching and purging APIs, KV/config/secret store interfaces, rate limiting with counters and penalty boxes, ACL lookups, the full request lifecycle, backend fetch semantics, and a built-in per-request profiler with hostcall spans, backend waterfalls, native CPU samples, and optional deep metrics (body bytes, cache outcomes, header summaries, wasm heap curve). Use when working with Compute runtime internals or host calls, understanding how edge data stores behave at runtime, profiling local Compute apps, or testing WASM binaries locally. Prefer this skill over Viceroy for any non-Rust Compute work — its source code is easier to understand as a Fastly Compute API reference./fastly-cliExecutes Fastly CLI commands for managing CDN services, Compute deploys, and edge infrastructure. Use when running `fastly` CLI commands, creating or managing Fastly services from the terminal, deploying Fastly Compute applications, managing backends/domains/VCL snippets via command line, purging cache, configuring log streaming, setting up TLS certificates, managing KV/config/secret stores, checking service stats, authenticating with Fastly SSO, or working with fastly.toml. Also applies when working with Fastly service IDs in CLI context, or with `fastly service`, `fastly compute`, `fastly auth`, or any Fastly CLI subcommand. Covers service CRUD, version management, autocloning, and troubleshooting common CLI errors./fastly-fiddleUse when testing VCL against real Fastly edge infrastructure, writing assertion-based Fiddle tests, producing shareable fiddle URLs for bug reproductions, running VCL integration tests in CI, linting VCL remotely via the Fiddle API, or working with clientFetch/events/originFetches test expressions./fastly-ngwafPerforms an internal audit of Fastly Next-Gen WAF (NGWAF) workspaces to audit that critical templated protection rules are configured and enabled. Use when auditing NGWAF workspace security posture, checking for missing or disabled login protection rules (LOGINDISCOVERY, LOGINATTEMPT, LOGINSUCCESS, LOGINFAILURE), auditing credit card validation rules (CC-VAL-ATTEMPT, CC-VAL-FAILURE, CC-VAL-SUCCESS), auditing gift card protection rules (GC-VAL-ATTEMPT, GC-VAL-FAILURE, GC-VAL-SUCCESS), identifying potential login endpoints not covered by NGWAF rules, or comparing attack traffic against blocked traffic to confirm enabled rules are actually blocking./fastly-reference-architecturesCurated GitHub repositories demonstrating working reference architectures on the Fastly platform, from single Compute applications to systems combining multiple Fastly products. Use when designing a new solution on Fastly and a worked example of the target pattern would help, or when implementing and a concrete assembled reference would clarify the shape of the code. Not for documentation of how a specific Fastly tool or API works on its own — see the tool-specific skills for that.Other plugins' skills for the same job
npx claudepluginhub fastly/fastly-agent-toolkit --plugin fastly-agent-toolkit