Token导航 LogoToken导航TokenDH.com
开发敏感数据github未标认证来源可访问许可证需确认审计提醒

falcofalco 命令行

Agent Skill

falco 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

881

周安装

36

GitHub Stars

21

下载量

285
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:falco(falco 命令行)
来源仓库:https://github.com/fastly/fastly-agent-toolkit
仓库路径:skills/falco
安装命令:
npx skills add https://github.com/fastly/fastly-agent-toolkit --skill falco
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/fastly/fastly-agent-toolkit --skill falco

简介

用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。

  • 适合在仓库状态跟踪或代码变更管理时提供结构化支持。
  • 可结合原始 README 继续核验具体功能与使用方式。
  • 需注意权限控制,避免触发不必要的网络请求或文件操作。
  • falco 属于开发类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

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.

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.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.82%
按下载量换算102

Claude

27.83%
按下载量换算79

Cursor

19.63%
按下载量换算56

Gemini CLI

8.83%
按下载量换算25

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills