anthropics avatar

fastly-agent-toolkit

Fastly development toolkit that adds VCL, Compute, and CDN skills for coding agents with local testing.

CCM score
75 of 100
GitHub stars
36.8K

Own this plugin? Claim it

What it does

  • Covers the Fastly platform: services, caching, VCL, WAF, TLS, DDoS protection, purging, and API usage through the fastly skill
  • Adds fastly-cli for managing services, Compute deploys, logging, and key-value stores, and fastly-stats for traffic figures
  • Includes falco for VCL linting, unit tests, simulation, and formatting, and viceroy and fastlike for running Compute locally
  • Provides fastly-ngwaf to audit Next-Gen WAF workspaces for missing or disabled login protection rules

Fastly development tools and platform skills

Add marketplace

/plugin marketplace add anthropics/knowledge-work-plugins

Run it inside Claude Code once, then install the plugin below.

Install

/plugin install fastly-agent-toolkit@knowledge-work-plugins

Run it inside Claude Code after adding the marketplace.

Files

Discovered from source

Trigger and scope

Trigger on: VCL files, .vcl extensions, XVCL files, .xvcl extensions, falco CLI, VCL unit tests, VCL linting/simulation/formatting, VCL REPL, beresp/bereq/req.http variables, subroutine scopes, backend/ACL/director/table declarations, edge dictionaries, validating VCL in Terraform plans, or running/testing XVCL scripts locally.

Do NOT use for: generic non-Fastly VCL, Fastly Compute/WASM, Fastly API/dashboard ops, CDN comparison, cache purging, or authoring Terraform resources.

Falco — VCL Development Tool & Reference

Falco is a Fastly VCL development tool for linting, testing, simulating, and formatting VCL code. Equally important, the falco source code is the most complete machine-readable specification of Fastly's VCL dialect — its parser, interpreter, and type system document every variable, function, type, and scope rule in VCL.

Official VCL documentation: https://www.fastly.com/documentation/guides/full-site-delivery/fastly-vcl/about-fastly-vcl/

Falco documentation: https://github.com/ysugimoto/falco

Using Falco Source as VCL Reference

If you need to understand how VCL works — what variables exist, which scopes they're available in, what functions are built-in, how types coerce — the falco source code is your best reference. It's a complete Go implementation of Fastly's VCL 2.x and is more precise than prose documentation.

If the falco source is not available locally, recommend cloning it:

git clone https://github.com/ysugimoto/falco.git ~/src/falco

Once available locally, read the source files directly to answer VCL questions. See understanding-vcl-from-source.md for a detailed guide on which files to read for different VCL topics.

Install

# Homebrew
brew install falco

# From source (requires Go 1.25+)
go install github.com/ysugimoto/falco/cmd/falco@latest

# Or clone and build
git clone https://github.com/ysugimoto/falco.git
cd falco
make darwin_arm64    # or darwin_amd64, linux_amd64, linux_arm64

Commands

CommandDescription
falco [lint]Lint VCL files (default command)
falco testRun VCL unit tests
falco simulateStart local simulator server
falco fmtFormat VCL files
falco statsShow VCL code statistics
falco consoleInteractive VCL REPL
falco terraformLint VCL from Terraform plans
falco dapDebug Adapter Protocol server

Common flags (all commands)

FlagDescription
-I, --include_pathAdd include path for VCL imports
-h, --helpShow help
-V, --versionShow version
-r, --remoteFetch snippets from Fastly API
--refreshRefresh remote snippet cache

Quick reference

Lint before deployment:

falco -vv -I ./vcl ./vcl/main.vcl

Run tests:

falco test -I ./vcl ./vcl/main.vcl

Development with watch mode:

falco test -w -I ./vcl ./vcl/main.vcl

Run VCL locally (this is how you "run" or "test locally" — use simulate, not just lint):

falco simulate -I ./vcl ./vcl/main.vcl
# Default port is 3124. Test with: curl http://localhost:3124/path
# Use -p to override: falco simulate -p 8080 ./vcl/main.vcl

Format all VCL:

falco fmt -w ./vcl/**/*.vcl

Terraform integration:

terraform show -json planned.out | falco terraform -vv

Common VCL Issues

Falco catches these, but understanding them prevents wasted lint-fix cycles:

  • Type mismatch: set req.http.X-API = true — HTTP headers are STRING, not BOOL. Use "true".
  • Missing time suffix: set beresp.ttl = 86400 — RTIME values need s suffix: 86400s.
  • Wrong scope: beresp.* only exists in vcl_fetch. In vcl_deliver, use resp.*.
  • Deprecated: req.request → use req.method. Falco accepts both, but always change to req.method when fixing VCL.
  • Synthetic strings: synthetic "text" needs long-string syntax: synthetic {"text"}.
  • Backend naming: Use F_ prefix: backend F_origin { ... }, not backend origin.
  • No modulo operator: VCL has no %. Use substr() on a hash or randomint() for splitting.
  • req.url.path is read-only in tests: Use set req.url = "/path" in test subroutines, not set req.url.path.
  • Vary placement: Vary must be set in vcl_fetch, not just vcl_deliver. Setting Vary after the object enters the cache is too late — the cache key won't include the Vary dimensions.

Configuration

Create .falco.yaml in project root for persistent settings:

include_paths:
  - ./vcl
  - ./includes

linter:
  verbose: "warning"
  rules:
    rule-name: ERROR  # or WARNING, INFO, IGNORE

testing:
  timeout: 10  # minutes (default: 10)
  filter: "*.test.vcl"

simulator:
  port: 3124

format:
  indent_width: 2
  line_width: 120

Environment variables

VariableDescription
FASTLY_SERVICE_IDService ID for Fastly API
FASTLY_API_KEYAPI key for Fastly API

Required when using -r, --remote flag.

Configure API credentials locally, outside chat. Never ask for an API key in a conversation or print its value.

References

TopicFileUse when...
VCL from Sourceunderstanding-vcl-from-source.mdUnderstanding VCL semantics by reading falco's implementation
Testing VCLtesting-vcl.mdRunning test suites, coverage, watch mode for TDD
Formatting VCLformatting-vcl.mdFormatting VCL for consistent style
Linting VCLlinting-vcl.mdChecking VCL for errors before deployment
Simulating VCLsimulating-vcl.mdTesting VCL against HTTP requests locally
Terraform VCLterraform-vcl.mdValidating VCL from Terraform plans
VCL Consolevcl-console.mdExperimenting with VCL expressions interactively
VCL Statisticsvcl-statistics.mdAnalyzing VCL project size and complexity

Source Code as VCL Reference (Quick Lookup)

When you have access to the falco source code locally (default: ~/src/falco), use these paths to answer specific VCL questions:

QuestionRead This FileWhy
"What variables can I use in vcl_recv?"interpreter/variable/Every req.*, beresp.*, client.* variable with scopes
"What built-in functions exist?"interpreter/function/All 390+ functions with type signatures and scope rules
"What are the VCL types?"interpreter/value/STRING, INTEGER, FLOAT, BOOL, TIME, RTIME, IP, BACKEND
"What's the request lifecycle?"interpreter/context/The 9 scopes: recv, hash, hit, miss, pass, fetch, error, deliver, log
"Is this valid VCL syntax?"token/token.go, lexer/lexer.goEvery keyword, operator, literal type
"How does this VCL statement work?"interpreter/statement.goHow set, unset, return, restart, etc. execute
"What are common VCL mistakes?"linter/, docs/rules.md50+ linting rules with explanations
"How do directors work?"interpreter/director.goRandom, fallback, hash, client, chash director types

For a comprehensive guide, see understanding-vcl-from-source.md.

Readme

Fastly Agent Toolkit

A collection of skills for AI coding agents to work with the Fastly platform and edge computing tools.

Agent Plugins

This repository is a portable Agent Plugin. Clients load the root plugin.json manifest and discover the skills in skills/.

Available skills

  • fastly: Working with the Fastly platform, including services, caching, VCL, WAF, TLS, DDoS protection, purging, and API usage.
  • fastly-cli: Using the Fastly CLI to manage services, compute apps, logging, WAF, TLS, key-value stores, and stats.
  • fastly-fiddle: Testing VCL against real Fastly edge infrastructure with Fastly Fiddle, covering assertion-based tests, the Fiddle HTTP API, shareable bug reproductions, and CI integration.
  • fastly-stats: Fastly traffic numbers via the CLI or raw HTTP, covering the Historical Stats, Real-Time analytics, and Origin/Domain Inspector APIs, and owning the unit, window, and aggregation conventions that decide whether a reported figure is right.
  • fastly-ngwaf: Auditing Next-Gen WAF workspaces for missing or disabled protection rules and checking whether attack traffic is being blocked.
  • fastly-reference-architectures: Curated GitHub repositories demonstrating working reference architectures on Fastly, from single Compute applications to systems combining multiple Fastly products.
  • falco: VCL development with Falco, covering linting, testing, simulation, formatting, REPL, and Terraform integration.
  • fastlike: Running Fastly Compute locally with Fastlike, covering backend configuration, builds, and testing.
  • viceroy: Running Fastly Compute locally with Viceroy, covering serving, configuration, testing, and SDK adaptation.
  • xvcl: The XVCL VCL transpiler, covering syntax extensions, subroutines, header manipulation, and caching logic.

Each skill lives under skills/ with a SKILL.md entrypoint and a references/ directory containing detailed topic files.

Important: SKILL.md files reference companion files in their references/ directory. Make sure your agent is allowed to read from these directories, otherwise it won't be able to follow the references and will miss important context.

Runtime requirements

These skills are intended for coding environments that can read project files and run commands. Install the tools for the workflows you use; installing the plugin does not install its developer tools or connect a Fastly account.

Workflow-specific requirements
WorkflowRequirements
Fastly CLI and traffic statisticsFastly CLI and locally configured authentication; curl and jq for raw API examples
NGWAF assessment scriptBash, Fastly CLI and locally configured authentication, jq, curl
VCL linting, unit tests, and simulationFalco; installation requires Homebrew or Go
XVCL compilationuv with uvx and access to the XVCL package; Falco for the local checks
Local Compute developmentFastlike or Viceroy, plus the build tools and WASM targets required by the application
Fastly Fiddle testsBash, curl 7.76 or newer, jq, and network access to Fastly Fiddle
Documentation and reference architecturesA browser or HTTP client; Git when cloning examples or tool sources

Each skill describes its prerequisites and installation options. Package installation and source builds may need network access. Bundled scripts and examples are resolved from the installed skill directory, while your project files stay relative to your project's working directory.

Set up Fastly authentication yourself using the CLI's interactive login or local configuration. Do not paste API keys into a conversation, include them in project files, or share command output that reveals them. Choose credentials with only the permissions needed for the task.

Support and privacy

For questions about these skills or to report a bug, open an issue in the GitHub issue tracker. Report security issues privately through the process in SECURITY.md.

Read Privacy and data handling for details about local credentials, account data, and public Fiddle uploads. Fastly's privacy policy and terms of service describe the applicable Fastly policies and service terms. The skills are available under the MIT license.

Usage

Pick the skills relevant to your project. You probably don't need all of them.

Manual copy

If your agent supports the .agents/skills/ convention, this is the most portable option. Agents that use this location include Amp, Cline, Codex, Cursor, Gemini CLI, GitHub Copilot, Kimi Code, OpenCode, Replit Agent, Swival, and Warp.

Install into the current project:

mkdir -p .agents/skills
cp -R ./skills/{falco,viceroy} .agents/skills/

Install globally (for agents that support ~/.agents/skills/):

mkdir -p ~/.agents/skills
cp -R ./skills/{falco,viceroy} ~/.agents/skills/

If your agent doesn't support .agents/skills/, expand the agent-specific instructions below.

Agent-specific installation

Claude Code

Install the bundled skills as a plugin:

claude plugin install fastly-agent-toolkit@claude-plugins-official
claude plugin list

Codex

Install the bundled skills as a plugin:

codex plugin marketplace add https://github.com/fastly/fastly-agent-toolkit.git
codex plugin add fastly-agent-toolkit@fastly-agent-toolkit

Perplexity

In Perplexity Computer, open Plugins → Add custom → Import plugin from GitHub and paste https://github.com/fastly/fastly-agent-toolkit. You need a plan that includes Computer and, for organization accounts, permission to import custom plugins.

To upload a ZIP instead, install the validation dependencies and run this from the repository root:

make package

Choose Plugins → Add custom → Upload plugin and select tmp/fastly-agent-toolkit-<version>.zip, using the version from plugin.json. The generated archive puts plugin.json at its root and includes each skill's supporting files. The package checks enforce Perplexity's limits of 32 skills, 1,000 files, and 20 MB uncompressed. See Perplexity's custom plugin instructions.

After either installation method, open the plugin on the Installed tab and confirm that every skill in Available skills is listed. This is a skills-only plugin with no MCP connectors; tools and Fastly authentication still need the separate setup described in Runtime requirements.

Swival

Stage the collection in your library first, then add the skills you want:

swival skills add --global https://github.com/fastly/fastly-agent-toolkit  # stage into ~/.config/swival/library
swival skills add fastly-agent-toolkit                                     # install the collection into this project
swival skills add --global fastly-agent-toolkit                            # or activate it in every project

Prefer only a couple of skills? Activate them by name instead of the whole collection: swival skills add falco, swival skills add viceroy.

Qwen Code

Qwen Code requires the experimental skills feature. Enable it by adding to .qwen/settings.json:

{
  "tools": {
    "experimental": {
      "skills": true
    }
  }
}

Then copy skills to the project directory:

mkdir -p .qwen/skills
cp -R ./skills/{falco,viceroy} .qwen/skills/

Gemini CLI

Gemini CLI supports .agents/skills/ as shown above. You can also link the whole repository using Gemini's extension workflow:

gemini extensions link .

Swap {falco,viceroy} for whatever combination you need. For VCL work, falco and xvcl are the most useful. For Fastly Compute, grab fastly-cli and either viceroy or fastlike.

Using the skills CLI

The skills CLI installs skills into the standard .agents/skills/ directory and automatically symlinks them into agent-specific directories. It supports most agents out of the box.

Install into the current project:

bunx skills add github:fastly/fastly-agent-toolkit --skill falco --skill viceroy
# or with node:
npx skills add github:fastly/fastly-agent-toolkit --skill falco --skill viceroy

Install globally (available across all projects via ~/.agents/skills/):

bunx skills add -g github:fastly/fastly-agent-toolkit --skill falco --skill viceroy

Skill format

Each skill lives in its own directory as a SKILL.md file with YAML frontmatter following the Agent Skills spec. The skills are validated with skillscheck.

Contributing new skills

See CONTRIBUTING.md.

Details

Marketplace
anthropics/knowledge-work-plugins
Source
https://github.com/fastly/fastly-agent-toolkit.git
Category
Community
Listed since
Apr 7, 2026

More from anthropics/knowledge-work-plugins

All 123

Similar to fastly-agent-toolkit

More DevOps & Cloud