/fastly-agent-toolkit:fastly-ngwaffrom fastly-agent-toolkit
Audits Fastly Next-Gen WAF workspaces to verify critical templated protection rules are configured and enabled. Checks login, credit card, and gift card rules, identifies uncovered endpoints, and compares attack vs blocked traffic.
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; scripts run unread.
Audits NGWAF workspaces to verify critical templated rules are configured and enabled. Use the fastly-cli skill to configure rules; this skill identifies gaps.
The bundled assessment requires Bash, the fastly CLI, jq, curl, network access to api.fastly.com, and a CLI token with NGWAF read access.
Configure credentials in the user's local environment or CLI configuration.
Never ask the user to paste an API key into chat or print it in command output.
Set NGWAF_SKILL_DIR to the absolute directory containing this SKILL.md, using the installed skill location supplied by the client.
This is a variable you assign, not a client-provided environment variable.
Run the helper from the user's working directory:
NGWAF_SKILL_DIR=/absolute/path/to/fastly-ngwaf
bash "$NGWAF_SKILL_DIR/scripts/assess_ngwaf_rules.sh"
For manual inspection or partial audits, work through the steps below with the fastly CLI.
The CLI, and so the script, ignores FASTLY_API_KEY. Its precedence is --token > FASTLY_API_TOKEN > fastly.toml
profile > default stored token. If only FASTLY_API_KEY is set:
export FASTLY_API_TOKEN="$FASTLY_API_KEY"
fastly ngwaf workspace list --json | jq -r '.[].id'
If empty, NGWAF is not configured for this account.
fastly ngwaf workspace rule list --workspace-id "$WORKSPACE_ID" --json
Both list commands fetch every page and print a bare JSON array.
rule list also takes --enabled and --action to filter server-side.
For each workspace, verify these templated rules exist and enabled is true:
| Category | Required Signals |
|---|---|
| Login Protection | LOGINDISCOVERY, LOGINATTEMPT, LOGINSUCCESS, LOGINFAILURE |
| Credit Card Validation | CC-VAL-ATTEMPT, CC-VAL-FAILURE, CC-VAL-SUCCESS |
| Gift Card Validation | GC-VAL-ATTEMPT, GC-VAL-FAILURE, GC-VAL-SUCCESS |
Check a specific signal:
fastly ngwaf workspace rule list --workspace-id "$WORKSPACE_ID" --json \
| jq '[.[] | select(.actions[].signal == "LOGINDISCOVERY") | {enabled, id}]'
When LOGINATTEMPT is missing or disabled, search recent request logs for login-like traffic the WAF isn't protecting.
No CLI equivalent exists (there is no fastly ngwaf workspace requests), so use the API:
curl -s -H "Fastly-Key: $(fastly auth token)" \
"https://api.fastly.com/ngwaf/v1/workspaces/$WORKSPACE_ID/requests?limit=100&page=1&q=from%3A-30min%20method%3APOST%20path%3A~%22%2Alogin%2A%22" \
| jq -r '.data[].path' | sort | uniq -c
A rule can be present and enabled and still block nothing when the workspace mode overrides it. requests_attack is
what NGWAF flagged; requests_total_blocked is what it stopped. Attacks above zero with nothing blocked means the
workspace is in log or off mode. Report it even when every rule checks out.
fastly ngwaf workspace time-series get --workspace-id "$WORKSPACE_ID" \
--from=2026-08-01T00:00:00Z --to=2026-08-08T00:00:00Z \
--metrics=requests_total,requests_attack,requests_total_blocked \
--granularity=86400 --json \
| jq -r '.data[] | "\(.timestamp) total=\(.requests_total) attack=\(.requests_attack) blocked=\(.requests_total_blocked)"'
Across every workspace at once, grouped by workspace:
fastly ngwaf time-series list \
--from=2026-08-01T00:00:00Z --to=2026-08-08T00:00:00Z \
--metrics=requests_total,requests_attack \
--granularity=86400 --dimensions=workspaces --json \
| jq -r '.data[] | "\(.dimensions.workspace) \(.dimensions.time) \(.values | add)"'
The workspace-level subcommand is get, the account-level one is list. They differ in three ways that break audit
scripts:
get returns flat objects keyed by metric with a timestamp. list nests them under dimensions
and a values array, hence .values | add.--granularity when passed; get then buckets hourly and list daily. Always
pass it.get reports a quiet metric as 0. list drops it from values, and returns
{"data":[],"meta":{"total":0}} when nothing recorded. A missing key means zero, not an error.Read requests_total_blocked through get. A workspace that blocked nothing is the case this audit is looking for,
and list reports it as an absence.
--from and --metrics are required on both. Timestamps are RFC 3339, not the YYYY-MM-DD that fastly stats takes.
--metrics also accepts XSS, SQLI, HTTP404 and any custom signal name on the workspace, so a rule verified in
step 3 can be checked for real traffic by signal name. Query those through get.
Healthy workspace — all signals present and enabled:
### Workspace: abc123
[LOGIN Rules]
- LOGINDISCOVERY: ENABLED
- LOGINATTEMPT: ENABLED
- LOGINSUCCESS: ENABLED
- LOGINFAILURE: ENABLED
[CC Rules]
- CC-VAL-ATTEMPT: ENABLED
- CC-VAL-FAILURE: ENABLED
- CC-VAL-SUCCESS: ENABLED
[GC Rules]
- GC-VAL-ATTEMPT: ENABLED
- GC-VAL-FAILURE: ENABLED
- GC-VAL-SUCCESS: ENABLED
Unhealthy workspace — missing or disabled rules require remediation:
### Workspace: def456
[LOGIN Rules]
- LOGINDISCOVERY: NOT CONFIGURED (Recommended: CRITICAL: Configure and enable this rule to discover unknown login endpoints)
- LOGINATTEMPT: IS DISABLED (Recommended: Enable this rule)
- LOGINSUCCESS: ENABLED
- LOGINFAILURE: ENABLED
-> LOGINATTEMPT is not enabled. Searching recent request logs for potential login paths...
-> Found potential login paths in last 30 minutes:
3 /api/v1/login
1 /auth/signin
| Error | Cause | Fix |
|---|---|---|
no API token configured for the fastly CLI | No CLI token | Configure one locally, outside chat |
403 Forbidden or status 403 | Token lacks NGWAF scope | Verify token has global:read permission |
No workspaces found | NGWAF not provisioned | Enable NGWAF on the account first |
fastly is not installed | Missing dependency | Install the Fastly CLI |
jq is not installed | Missing dependency | brew install jq or apt-get install -y jq |
curl is not installed | Missing dependency | Install curl with the system package manager |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
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./fastlyConfigures, manages, and debugs the Fastly CDN platform — covering service and backend setup, caching and VCL, security features like DDoS/WAF/NGWAF/rate limiting/bot management, TLS certificates and cache purging, the Compute platform, and the REST API. Use when working with Fastly services or domains, setting up edge caching or origin shielding, configuring security features, making Fastly API calls, enabling products, or looking up Fastly documentation. Also applies when troubleshooting 503 errors or SSL/TLS certificate mismatches on Fastly, and for configuring logging endpoints, load balancing, ACLs, or edge dictionaries. Read the relevant reference file before writing any Fastly API call or curl command — request field names (e.g. the backend fields override_host, ssl_cert_hostname, ssl_sni_hostname, use_ssl) are easy to misremember, and a wrong name causes a silent 503 instead of an error, so do not rely on training-knowledge field names./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-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