$npx -y skills add fastly/fastly-agent-toolkit --skill 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 pe
| 1 | ## Trigger and scope |
| 2 | |
| 3 | Trigger on: Fastly Compute, Compute@Edge, WASM on Fastly, fastlike, XQD ABI, Compute request lifecycle, 508 loop detection, backend subrequests, body streaming, profiling a local Compute app, embedding a Fastly Compute runtime in Go code, or any question about how Compute platform primitives work internally (caching, KV stores, edge rate limiting, ACLs, geolocation, secret stores, config stores, dictionaries, logging, dynamic backends, request collapsing, async I/O). |
| 4 | |
| 5 | Do NOT use for: Fastly VCL (use falco), Fastly CLI/API (use fastly-cli or fastly), Viceroy, CDN comparison, WAF, Terraform, cache purging via API, or Fastly logging/stats configuration. |
| 6 | |
| 7 | # Fastlike — Local Compute Runtime & Reference |
| 8 | |
| 9 | Fastlike is a Go implementation of the Fastly Compute ABI. It runs compiled WebAssembly programs locally, implementing the same 249+ host functions that Fastly's production Compute platform provides: backends, dictionaries, KV stores, caching, geolocation, rate limiting, ACLs, secret stores, and more. |
| 10 | |
| 11 | Equally important, **the fastlike source code is the most complete programmatic specification of how Fastly Compute works** — its ABI implementations document every platform primitive, request lifecycle detail, and data structure as executable code. |
| 12 | |
| 13 | **Fastlike documentation**: https://github.com/avidal/fastlike |
| 14 | |
| 15 | ## Source Code as Compute Reference |
| 16 | |
| 17 | When you have access to the fastlike source code locally (default: `~/src/fastlike`), use these paths to answer specific Compute questions: |
| 18 | |
| 19 | | Question | Read This File | Why | |
| 20 | | ----------------------------------------------------------- | ---------------------------------------------------- | --------------------------------------------------------------- | |
| 21 | | "How does the request lifecycle work?" | `instance.go`, `xqd_http_downstream.go` | Per-request setup, execution, downstream handling | |
| 22 | | "What ABI functions exist for X?" | `xqd_*.go` files | Each file implements a group of related ABI functions | |
| 23 | | "How do backend subrequests work?" | `xqd_backend.go`, `backend.go` | Request sending, dynamic backends, timeouts | |
| 24 | | "How does caching work?" | `xqd_cache.go`, `xqd_http_cache.go`, `cache.go` | Cache operations, Vary, surrogate keys, request collapsing | |
| 25 | | "How does KV store work?" | `xqd_kv_store.go`, `kv_store.go` | CRUD operations, pagination, generation-based concurrency | |
| 26 | | "How does rate limiting work?" | `xqd_erl.go`, `erl.go` | Rate counters, penalty boxes, threshold checks | |
| 27 | | "How do ACLs work?" | `xqd_acl.go`, `acl.go` | CIDR-based IP filtering, most-specific match | |
| 28 | | "What configuration options exist?" | `options.go` | Every `With*` functional option for the runtime | |
| 29 | | "What error codes can operations return?" | `constants.go` | All XQD status codes and error types | |
| 30 | | "How does the profiler work / what does a trace look like?" | `profile.go`, `profile_json.go`, `docs/profiling.md` | Trace data model, JSON wire format, deep-mode metrics, encoders | |
| 31 | |
| 32 | For a comprehensive guide, see [understanding-compute-from-source.md](references/understanding-compute-from-source.md). |
| 33 | |
| 34 | ## Install from Source |
| 35 | |
| 36 | Requires Go 1.24+. |
| 37 | |
| 38 | ```bash |
| 39 | # Clone and build |
| 40 | git clone https://github.com/avidal/fastlike.git ~/src/fastlike |
| 41 | cd ~/src/fastlike |
| 42 | make build # Creates bin/fastlike |
| 43 | |
| 44 | # Or install to GOPATH/bin |
| 45 | make |