vercel/vercel-plugin/vercel-firewall

Claude Code and agent skill by vercel/vercel-plugin

Trust tier 4
  • vendor
Source check pending

Checking that the SKILL.md file is still in the repository.

Vercel Firewall expert guidance — automatic DDoS mitigation, the Vercel WAF (custom rules, IP blocking, managed rulesets, rate limiting), Attack Mode, system bypass, bot management, and the `vercel firewall` CLI. Use when configuring platform-level security, responding to attacks, or staging firewall rules.

Install

npx vskill@latest install vercel/vercel-plugin/vercel-firewall

SKILL.md

Vercel Firewall

You are an expert in the Vercel Firewall including the vercel firewall CLI, Vercel WAF and platform-level protections (custom rules, managed rulesets, IP blocks, system bypass, Attack Mode, system mitigations). You follow all the best practices outlined below.

Core Knowledge

  • Vercel ships a multi-layered firewall, not just a CDN. The Platform-wide Firewall provides DDoS Protections and is free for every customer. Customers can also configure a Web Application Firewall with IP blocks and custom rules. Vercel also provides managed rulesets such as OWASP Core Ruleset, Bot Protection and AI Bots.
  • Automatic DDoS mitigation is on for every project on every plan, including Hobby, with no configuration required. It covers L3/L4/L7 attacks.
  • Vercel does not bill for traffic blocked by DDoS mitigations or WAF. Usage is only incurred for requests served before mitigation kicked in or not classified as an attack. You do not pay for requests or bandwidth for denies, challenges, or rate-limits from WAF custom rules or managed rules.
  • Custom rules allows the user to define their own Firewall rules. Includes actions deny, challenge, log, bypass, rate_limit, redirect and matching on fields such as host, path, query, protocol, scheme, method, route, ip_address, header, cookie, user_agent, environment, region, geo_continent, geo_country, geo_city, and ja4_digest. See https://vercel.com/docs/vercel-firewall/vercel-waf/rule-configuration for full information.

Overview

Commands act on the linked project (vercel link). Pass --project <name> to target another project, including from an unlinked directory.

bash
vercel firewall overview # active rules, blocks, bypasses, attack-mode, drafts
vercel firewall overview --json
vercel firewall diff # show unpublished draft changes
vercel firewall diff --json

rules, managed-rulesets and ip-blocks changes are staged as drafts. vercel firewall publish makes them live (see Publishing). system-bypass, attack-mode and system-mitigations take effect immediately.

Custom rules

Custom rules define traffic policies based on request attributes. Block abuse, rate limit APIs, challenge suspicious requests, redirect legacy paths, or log traffic. Rules can also be defined declaratively in vercel.json via the routes property with a mitigate action, but only challenge and deny are supported that way — use the CLI or dashboard for log, bypass, rate_limit, or redirect.

View
bash
vercel firewall rules list # table of all rules
vercel firewall rules list --expand # show conditions + actions
vercel firewall rules list --json
vercel firewall rules inspect "My Rule" # full detail of one rule
vercel firewall rules inspect "My Rule" --json
Create — four modes
bash
# AI — TTY only, BLOCKED FOR AGENTS/SCRIPTS
vercel firewall rules add --ai "Rate limit /api to 100 requests per minute by IP"
# Interactive wizard — TTY only, BLOCKED FOR AGENTS/SCRIPTS
vercel firewall rules add
# Flags — works in scripts and agents
vercel firewall rules add "Block crawlers" \
--condition '{"type":"user_agent","op":"sub","value":"crawler"}' \
--action deny --yes
# JSON payload — works in scripts and agents (`--data` needs CLI 64.2+; older CLIs use `--json <payload>`)
vercel firewall rules add --data '{"name":"Block crawlers","conditionGroup":[{"conditions":[{"type":"user_agent","op":"sub","value":"crawler"}]}],"action":{"mitigate":{"action":"deny"}}}' --yes
Multiple conditions (AND) and OR groups
bash
# AND — multiple --condition flags in the same group
vercel firewall rules add "Secure admin" \
--condition '{"type":"path","op":"pre","value":"/admin"}' \
--condition '{"type":"geo_country","op":"eq","neg":true,"value":"US"}' \
--action deny --yes
# OR — use --or to start a new group
vercel firewall rules add "Block dangerous methods" \
--condition '{"type":"method","op":"eq","value":"DELETE"}' \
--or \
--condition '{"type":"method","op":"eq","value":"PATCH"}' \
--action challenge --yes
Update and manage

rules update needs CLI 64.4+; older CLIs use rules edit, which still works as a deprecated alias.

bash
vercel firewall rules update "My Rule" --action challenge --yes # change action
vercel firewall rules update "My Rule" --name "New Name" --yes # rename
vercel firewall rules update "My Rule" \
--condition '{"type":"path","op":"pre","value":"/new"}' --yes # replace conditions
vercel firewall rules enable "My Rule"
vercel firewall rules disable "My Rule"
vercel firewall rules remove "My Rule" --yes # aliases: rm, delete
vercel firewall rules move "My Rule" --first --yes # move to highest priority; alias: reorder (deprecated)
vercel firewall rules move "My Rule" --last --yes
vercel firewall rules move "My Rule" --position 3 --yes # 1-based

Rules are evaluated in priority order (top to bottom). Reorder to control which rule matches first.

NOTE: When using update with --condition, it will overwrite all conditions listed in the rule. Make sure to specify all conditions when editing a rule.

Condition format

Each --condition is a JSON object:

json
{
"type": "path", // condition type (required)
"op": "pre", // operator (required)
"value": "/api", // value (required for most operators; omit for ex/nex)
"key": "Authorization", // required for header / cookie / query types
"neg": true // negate the condition (optional, default false)
}

Conditions within a group are AND'd. Multiple groups (separated by --or) are OR'd.

Operators

eq/neq (equals), sub (contains), pre (starts-with), suf (ends-with), re (regex), ex/nex (exists; omit value), inc/ninc (in set; value is array or comma-separated), gt/gte/lt/lte (numeric). Set neg: true to negate any operator.

Condition types
  • Request shape: path, raw_path (pre-rewrite), target_path (post-rewrite), route (e.g., /blog/[slug]), server_action, method, host, protocol, scheme, environment (preview|production), region
  • Client: ip_address (IP or CIDR), user_agent, geo_country, geo_continent, geo_country_region, geo_city, geo_as_number
  • Headers / cookies / queries — require key: header, cookie, query
  • TLS fingerprints: ja4_digest (all plans), ja3_digest (Enterprise only)
  • Bots: bot_name, bot_category (priority projects only; see Bot management)
  • Rate limit grouping: rate_limit_api_id
Actions
  • deny — block (403)
  • challenge — show verification page
  • log — log without blocking (use to tune before enforcing)
  • bypass — skip remaining WAF custom rules and managed rulesets (does not bypass system-level mitigations — use System bypass for that)
  • rate_limit — throttle by counting key (see Rate limit example for flags)
  • redirect — redirect to a URL or path; use --redirect-url <URL> and optionally --redirect-permanent (301; default is a temporary 307 redirect)

deny, challenge, and rate_limit accept --duration (Pro/Enterprise): 1m, 5m, 15m, 30m, 1h. Persistent — deny --duration 30m blocks the client for 30 min after first match. Without a duration the action evaluates per-request. Be careful if using persistent actions because they will be blocked for that duration even if the Firewall rule is removed.

Rate limit example
bash
vercel firewall rules add "Rate limit API" \
--condition '{"type":"path","op":"pre","value":"/api"}' \
--action rate_limit \
--rate-limit-window 60 \
--rate-limit-requests 100 \
--rate-limit-keys ip \
--rate-limit-action deny \
--yes
  • --rate-limit-window — seconds, 10–3600 (over 600 Enterprise only)
  • --rate-limit-requests — max per window, 1–10,000,000
  • --rate-limit-keys — count by ip (default) or ja4. header:<name> needs Enterprise, or a priority project on Pro. Repeatable.
  • --rate-limit-algo — fixed_window (default), token_bucket (Enterprise only)
  • --rate-limit-action — when limit exceeded: rate_limit returns 429 (default), deny 403, challenge, log
  • Counters are per region — N regions can collectively exceed your configured limit by ~N×.

When the user asks for firewall help on a project — or asks "what rate limits should I add?" — proactively scan the repo for API endpoints and suggest concrete rate_limit rules. Most projects ship with no rate limiting and a single abusive client can run up the bill or knock the app over. A small, well-targeted set of rules catches the worst offenders without touching legitimate traffic.

Method scoping matters — GET /api/foo and POST /api/foo will likely need different rate limits. Always stage with --rate-limit-action log and a generous limit (5–10× the expected legitimate rate), then walk through the staged rollout in Best practices before tightening.

For more sophisticated counting (custom buckets, hashing identifiers from headers/cookies, sliding windows from your own code) point the user at the Rate Limiting SDK: https://vercel.com/docs/vercel-firewall/vercel-waf/rate-limiting-sdk.

Bot management

GoalUse
Scripts and non-browser clients site-wideBot Protection managed rule (off/log/challenge, all plans)
AI crawlers and assistantsAI Bots managed rule, per category: managed-rulesets update ai-bots --group ai-crawlers --action deny
A bot category or named botCustom rule on bot_category / bot_name (priority projects)
Signup, checkout, AI routes called by the app's frontendBotID in code — see the botid skill
Active floodAttack Mode (user enables it)
  • Verified bots (confirmed by IP, reverse DNS or Web Bot Auth) skip Bot Protection and Attack Mode. AI Bots and custom rules still apply. A UA that only claims to be a bot isn't verified
  • `bypass` custom rules also skip the managed bot rules — keep them narrow
  • Challenge is a JS check, not a CAPTCHA; for server or mobile API callers it acts like deny
bash
vercel firewall bot-management # managed bot rule actions + unknown bot traffic
vercel firewall traffic list --dimension bot --since 24h # top verified bots
vercel firewall managed-rulesets update bot-protection --action log --yes # off | log | challenge
vercel firewall rules update bot-id --action deep-analysis --yes # basic | deep-analysis (billed, Pro+)

bot-protection, ai-bots and bot-id are reserved project-level slugs: rules add, remove, enable, disable and move refuse them. Change Bot Protection and AI Bots with managed-rulesets update (see Managed rulesets). BotID stays on rules update bot-id. Start Bot Protection on log and review before challenge.

Bot name and category rules

Priority projects only. The CLI refuses them elsewhere. They match Vercel's verified identity, not the UA. Verified categories include search_engine_crawler, ai_crawler, ai_assistant, monitor, webhook, preview, advertising, search_engine_optimization, feed_fetcher, verification; copy exact values from traffic list --dimension bot.

bash
vercel firewall rules add "Throttle feed fetchers" \
--condition '{"type":"bot_category","op":"eq","value":"feed_fetcher"}' \
--action rate_limit --rate-limit-window 60 --rate-limit-requests 30 \
--rate-limit-action log --yes

Blocking search_engine_crawler removes the site from search; call that out before staging.

Managed rulesets

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files. Certified 16 Mar 2026.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
9
Repository forks
1
7-day trend score
12

Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 16 Mar 2026, 8 months ago.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill CERTIFIED badge
[![vskill CERTIFIED](https://verified-skill.com/api/v1/skills/vercel/vercel-plugin/vercel-firewall/badge)](https://verified-skill.com/skills/vercel/vercel-plugin/vercel-firewall)

Something wrong with this skill or its page? Tell us.