xvcl

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

A preprocessing language for Fastly VCL, the configuration language used to control how Fastly handles web requests. XVCL adds reusable definitions, loops, constants, conditions, and includes, then compiles them into standard VCL.

In plain words
What is it for?
Use it to write reusable Fastly routing, backend, header, and caching rules, compile them to VCL, lint them, and simulate them locally.
Why use it?
It reduces repeated configuration and lets you test generated Fastly rules locally before deployment.

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/xvcl
Any agent
npx skills add fastly/fastly-agent-toolkit --skill xvcl
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 xvcl

README.md
[![agentmods](https://agentmods.dev/badge/skills/fastly/fastly-agent-toolkit/xvcl.svg)](https://agentmods.dev/skills/fastly/fastly-agent-toolkit/xvcl)
Your own site
<a href="https://agentmods.dev/skills/fastly/fastly-agent-toolkit/xvcl"><img src="https://agentmods.dev/badge/skills/fastly/fastly-agent-toolkit/xvcl.svg" alt="Measured on agentmods" height="20"></a>
Per session 176 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,010 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.00176 $0.03010
Opus 5 $0.00088 $0.01505
Sonnet 5 $0.00035 $0.00602
Haiku 4.5 $0.00018 $0.00301

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

Security

Grade A, and why

xvcl 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 4d 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.

# Then test with: curl http://localhost:3124/
skills/xvcl/SKILL.md · 275 lines

How it starts

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

Trigger and scope

Trigger on: XVCL, .xvcl files, VCL transpiler, VCL metaprogramming, #const/#for/#def/#inline in VCL context, writing a VCL script, writing VCL and running it locally, or any Fastly VCL writing task.

Do NOT trigger for: debugging existing .vcl files without XVCL, Fastly API/CLI ops, Fastly Compute, or Terraform — even if they mention VCL.

Writing VCL with XVCL

XVCL is a VCL transpiler that adds metaprogramming to Fastly VCL. Write .xvcl files, compile to .vcl, then test with Falco or deploy to Fastly. All XVCL constructs are resolved at compile time — zero runtime overhead.

Quick Start

# Compile (no install needed with uvx)
uvx xvcl main.xvcl -o main.vcl

# Lint the output
falco lint main.vcl

# Run locally — this is how you "run" VCL on your machine
falco simulate main.vcl
# Listens on localhost:3124 by default
# Then test with: curl http://localhost:3124/

When the user asks to "run locally" or "test locally", always compile and run falco simulate — linting alone doesn't run the VCL.

Minimal Working Example

Backend naming: Fastly VCL requires backends to use F_ prefixed names (e.g., F_origin, F_api). Never use backend default — falco will reject it. Always set req.backend explicitly in vcl_recv.

#const ORIGIN_HOST = "api.example.com"
#const REGIONS = [("us", "us.example.com"), ("eu", "eu.example.com")]

#for name, host in REGIONS
backend F_{{name}} {
  .host = "{{host}}";
  .port = "443";
  .ssl = true;
}
#endfor

sub vcl_recv {
  #FASTLY recv
  set req.backend = F_us;
  return (lookup);
}

sub vcl_deliver {
  #FASTLY deliver
  set resp.http.X-Served-By = "edge";
  return (deliver);
}

XVCL Directives Summary

Read xvcl-directives.md for complete syntax and examples of every directive.

Constants — #const

#const NAME = value              // type auto-inferred
#const NAME TYPE = value         // explicit type
#const TTL INTEGER = 3600
#const ORIGIN = "origin.example.com"
#const ENABLED BOOL = true
#const DOUBLE_TTL = TTL * 2      // expressions supported
#const BACKENDS = ["web1", "web2"] // lists
#const PAIRS = [("api", 8080), ("web", 80)] // tuples

Read the full file on GitHub · 275 lines

Files

What ships with it

10 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. 4d ago First seen · 275 lines · 176 tokens per session scan A 97940257d100

Subscribe to this mod's changes

xvcl is a skill published in the GitHub repository fastly/fastly-agent-toolkit (32 stars, last pushed 4d ago), licensed MIT. It adds 176 tokens to every session and 3,010 once invoked, about $0.0009 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

market-research-reports

Build evidence-traceable market research reports and assumption-driven market sizing or forecast scenarios. Use for market definition, industry and customer evidence, competitive landscapes, TAM/SAM/SOM reconciliation, forecast sensitivity, and auditable report scaffolds.

K-Dense-AI/claude-scientific-writer · 53 tokens

ansem-crypto

Use when evaluating crypto narratives, attention rotation, memecoin cycles, Solana-style ecosystem momentum, social distribution, and reflexive retail flows in an Ansem-style crypto market framework.

questflowai/investorskills · 41 tokens

a16z-crypto

Use when evaluating crypto networks and companies through an a16z crypto lens: web3 adoption, infrastructure vs apps, open networks, and long-duration crypto ecosystem investing.

questflowai/investorskills · 39 tokens

cryptocred-structure

Use when evaluating crypto charts through a CryptoCred-style structure lens: levels, confluence, market structure, risk definition, and educational technical process.

questflowai/investorskills · 35 tokens

need-explorer

Clarify intent, scope, constraints, and success criteria before artifact creation. Invoke when the request is fuzzy, the user is comparing options, or the workflow needs a stable change definition before writing artifacts.

MageByte-Zero/spec-superflow · 44 tokens

blueprint

Define reusable Airflow task group templates with Pydantic validation and compose DAGs from YAML. Use when creating blueprint templates, composing DAGs from YAML, validating configurations, or enabling no-code DAG authoring for non-engineers.

astronomer/agents · 49 tokens