cloudflare

civitai/civitai

Запрашивает HTTP-аналитику Cloudflare и управляет правилами безопасности по зонам: анализ трафика (IP, пути, user agents, bot scores, таймлайны), экспорт и перенос Custom Rules и Rate Limit Rules между зонами.

Звёзды7 324
Авторcivitai
Установок16

Установка

SKILL.md

Cloudflare Analytics + Rule Management

Query Cloudflare HTTP traffic analytics and manage security rules (Custom Rules, Rate Limit Rules) across zones. The CF_API_TOKEN in .env needs Zone Analytics: Read for analytics, and Zone WAF: Edit for rule management.

Running Commands

node .claude/skills/cloudflare/query.mjs <command> [options]

Commands

CommandDescription
top-clientsTop IPs by request count
top-pathsTop request paths
top-agentsTop user agents
timelineRequests per minute timeline (bar chart)
ip <addr>Full breakdown for a specific IP (paths, UAs, statuses, geo)
scrapeFull scrape analysis — top IPs, paths, UAs + detail on high-volume IPs
bot-scoresBot score distribution
bot-clientsTop clients with low bot scores (likely bots)
firewallRecent firewall/WAF events
rate-limitsCurrent rate limit rules
waf-rulesCurrent WAF custom rules
list-zonesList all accessible zones (id, name, plan)
export-rules <zone>Dump Custom Rules + Rate Limit Rules from a zone
port-rulesCopy rules between zones (dry-run by default)

Flags

FlagDescription
--start, --fromStart time: relative (-1h, -2d, -30m), time (16:41), or ISO datetime
--end, --toEnd time (default: now)
--limitMax results (default: 20)
--pathFilter by path pattern using SQL LIKE (/api/%, /api/trpc/%)
--ipFilter by client IP
--scoreMax bot score for bot-clients (default: 10)
--source, --targetZone name or id (used by port-rules)
--phasecustom, ratelimit, or all (default) for rule commands
--outWrite export-rules output to a JSON file
--skip-disabledWhen porting, skip rules with enabled: false
--skip-hostsComma-separated list of hosts; rules referencing them are skipped
--rewrite-host FROM:TOReplace "FROM" with "TO" in rule expressions during port
--onlyComma-separated substrings; only port rules whose description matches
--pro-compatStrip Enterprise-only syntax to fit Pro/Free target zones (see below)
--applyActually write. Without this, port-rules is a dry run

Examples

# Full scrape analysis for a time window
node .claude/skills/cloudflare/query.mjs scrape --start "2026-03-24 16:41" --end "2026-03-24 19:08"

# Top IPs hitting API endpoints in the last 2 hours
node .claude/skills/cloudflare/query.mjs top-clients --start -2h --path "/api/%"

# What paths is a specific IP hitting?
node .claude/skills/cloudflare/query.mjs ip 1.2.3.4 --start -6h

# Traffic timeline for API/trpc routes
node .claude/skills/cloudflare/query.mjs timeline --start -1h --path "/api/trpc/%"

# Find likely bots (low bot score) hitting API
node .claude/skills/cloudflare/query.mjs bot-clients --start -3h --score 5 --path "/api/%"

# Top user agents on search-related paths
node .claude/skills/cloudflare/query.mjs top-agents --start -2h --path "/api/trpc/image%"

# Check current rate limit rules
node .claude/skills/cloudflare/query.mjs rate-limits

# List all zones (id, name, plan)
node .claude/skills/cloudflare/query.mjs list-zones

# Export civitai.com rules (custom + rate limit) to a file
node .claude/skills/cloudflare/query.mjs export-rules civitai.com --out com-rules.json

# Dry-run a port from civitai.com to civitai.red — preview only
node .claude/skills/cloudflare/query.mjs port-rules \
  --source civitai.com --target civitai.red \
  --skip-disabled \
  --skip-hosts api.civitai.com,metrics.civitai.com,education.civitai.com,image.civitai.com,meilisearch-v1-9.civitai.com,meilisearch-v1-6.civitai.com,meilisearch-metrics.civitai.com \
  --rewrite-host civitai.com:civitai.red \
  --pro-compat

# Same thing, but actually write it (REPLACES target rulesets wholesale)
node .claude/skills/cloudflare/query.mjs port-rules \
  --source civitai.com --target civitai.red \
  --skip-disabled \
  --skip-hosts api.civitai.com,metrics.civitai.com,education.civitai.com,image.civitai.com,meilisearch-v1-9.civitai.com,meilisearch-v1-6.civitai.com,meilisearch-metrics.civitai.com \
  --rewrite-host civitai.com:civitai.red \
  --pro-compat \
  --apply

# Port only specific rules (match by description substring)
node .claude/skills/cloudflare/query.mjs port-rules \
  --source civitai.com --target civitai.red --phase ratelimit \
  --only "Global Limit,Rate limit trpc (No Regex)" \
  --rewrite-host civitai.com:civitai.red \
  --pro-compat --apply

Porting Security Rules Between Zones

port-rules replaces the target zone's Custom Rules ruleset and/or Rate Limit Rules entrypoint with a filtered + transformed copy of the source zone's rules. It overwrites the target ruleset — existing rules on the target are wiped.

What gets ported

The Cloudflare "Security Rules" surface maps to two phase entrypoints:

PhaseUI nameFlag value
http_request_firewall_customCustom Rules--phase custom
http_ratelimitRate Limit Rules--phase ratelimit

Managed Rules, IP Access Rules, Zone Lockdown, and User Agent Blocking are not ported.

Filters

Without filters, every rule from the source is copied as-is.

  • --skip-disabled drops rules where enabled: false.
  • --skip-hosts host1,host2 drops any rule whose expression literal-matches one of the listed hosts (useful for source-only subdomains that don't exist on the target zone).
  • --only pat1,pat2 keeps only rules whose description contains one of the given substrings.
  • --rewrite-host FROM:TO rewrites "FROM" → "TO" inside rule expressions after the skip filter runs. Use this to point apex-host rules at the new zone (civitai.com:civitai.red).

Pro-plan / Free-plan compatibility (--pro-compat)

Cloudflare Pro zones reject several Enterprise-only rule features that are commonly used on Business/Enterprise source zones. When the target zone plan is pro or free, --pro-compat is applied automatically; otherwise pass it explicitly. Transforms:

  • IP list exclusions: and not ip.src in {…} / and ip.src in {…} clauses are stripped. Pro zones don't support ip.src in expressions in rate-limit rules.
  • Bot management checks: and not cf.bot_management.verified_bot / and cf.bot_management.verified_bot clauses are stripped (Bot Management is an Enterprise feature).
  • Rate-limit period: Pro only allows periods in [10, 15, 20, 30, 40, 45, 60] seconds. Rules with longer periods (e.g. 300s) are scaled to 60s and the requests_per_period is scaled proportionally to preserve the same req/s rate.
  • requests_to_origin: stripped (Enterprise-only).

Each transform is reported in the dry-run output as a ~ line so you can review them before applying.

Rule-count limits

Target zone plans cap the number of rules per phase. If the port exceeds the cap, Cloudflare returns exceeded the maximum number of rules in the phase X: N out of M. Common caps:

PlanCustom RulesRate Limit Rules
Free51
Pro202
Business10015
Enterprise1000+1000+

Use --only or manually trim the source rule list if you hit the cap.

Known constraints

  • ref is stripped on write so rules are re-id'd on the target. This means subsequent ports between the same two zones replace wholesale, not diff-and-merge.
  • Managed Rules, IP Access Rules, Zone Lockdown, User Agent Blocking, and legacy Firewall Rules are not ported.
  • Account-scoped custom lists (e.g. $attackers, $bandwidth_theft) work across zones in the same account with no change.

Investigation Workflow

For scraping investigations:

  1. Start broad: scrape --start ... --end ... to see top IPs, paths, and UAs
  2. Identify suspects: Look for IPs with disproportionate request counts
  3. Deep dive: ip <addr> to see what specific IP is doing
  4. Check bots: bot-clients --score 5 to find CF-detected bots
  5. Timeline: timeline --ip <addr> to see traffic pattern over time
  6. Review defenses: rate-limits and firewall to see what's in place

Вставить в README

Ссылка на карточку для вашего README — без картинок и счётчиков.

[DarkPlay: cloudflare](https://darkplay.ru/ai/skills/civitai-civitai-cloudflare)

Похожие скиллы и другие разделы каталога

Популярное в разделе «Скиллы»

Самые востребованные скиллов раздела по установкам и звёздам.

find-skillsvercel-labs · Помогает находить и устанавливать навыки агентов по запросам вроде «как сделать X»…
4 400 000 устан.
grill-memattpocock · Настойчивое интервью для доработки плана или дизайна.
1 600 000 устан.
hyperframesheygen-com · Обязательная точка входа для любых задач по видео, анимации и motion-графике в…
1 600 000 устан.
hyperframes-cliheygen-com · Цикл разработки HyperFrames CLI: init, add, render, preview, publish и другие команды.
1 600 000 устан.
agent-browservercel-labs · CLI для автоматизации браузера для ИИ-агентов: навигация по страницам, заполнение форм…
1 600 000 устан.
media-useheygen-com · Agent Media OS: единый навык для медиа в HyperFrames — BGM, SFX, изображения, голос, LUT.
1 500 000 устан.
hyperframes-registryheygen-com · Установка и подключение блоков реестра в композиции HyperFrames через add и catalog.
1 400 000 устан.
grill-with-docsmattpocock · Настойчивое интервью для доработки плана или дизайна, попутно создающее документацию (ADR…
1 300 000 устан.
improve-codebase-architecturemattpocock · Поиск в кодовой базе возможностей для углубления, визуальный HTML-отчёт о них и детальный…
1 300 000 устан.
tddmattpocock · Разработка через тестирование (TDD): red-green-refactor и интеграционные тесты.
1 300 000 устан.
Похожее в других разделах каталога

Соседние разделы каталога: возможно, нужный инструмент живёт там.

cloudflareanthropics · Навыки для платформы разработки Cloudflare: Workers, Durable Objects, Agents SDK…
100 комп.
logfireanthropics · Добавляет наблюдаемость Logfire в Python-приложения с автоинструментацией для FastAPI…
100 комп.
mcp-server-devanthropics · Навыки проектирования и создания MCP-серверов, бесшовно работающих с Claude. Проводит по…
100 комп.
mcp-tunnelsanthropics · Подключение Claude к приватному MCP-серверу через туннель Anthropic MCP. Команда…
100 комп.
preset-cli-skillsanthropics · Готовые CLI-навыки для явных сценариев работы с shell, скриптами и CI/CD через CLI `sup`…
100 комп.
valtownanthropics · Создание и развёртывание на Val Town. Включает MCP-сервер Val Town и навыки платформы…
100 комп.
valtownanthropics · Создание и развёртывание на Val Town. Включает MCP-сервер Val Town и навыки платформы…
233 комп.
vscode-extensions-toolkitlibukai · Набор инструментов для расширений VSCode: тестирование API через httpYac, мониторинг…
7 комп.
aightanthropics · Плагин-канал, связывающий Claude Code с iOS-приложением через Cloudflare Workers с…
38 комп.
aomi-buildanthropics · Для сборки агентов, размещаемых в Aomi Labs. Приложение Aomi — это Rust API-клиент под…
4 915 ★

Лучшие ИИ-инструменты для автоматизации и ассистентов

Ассистенты и автоматизация

Подборка ИИ-ассистентов для автоматизации рутины и ускорения рабочих процессов. Сервисы, которые берут на себя переписку, анализ данных, ведение базы знаний и подготовку продаж, эк

Give Me Public
Есть бесплатный тариф
5.0
AITunnelAitunnel
По запросу
5.0
STIVAStiva
По запросу
5.0
Wikibot (Викибот)Wikibot
По запросу
4.9
mymeet.aiMymeet
По запросу
4.9
InsighterInsighter
По запросу
4.9
TGHuntTghunt
Есть бесплатный тариф
4.9
LegiscanLegiscan
По запросу
4.9
RouterAIRouterai
По запросу
4.9
Wikibot 1.0 (Викибот)Wikibot
По запросу
4.9

Лучшие ИИ-инструменты для генерации видео

Генерация видео

Подборка нейросетей для генерации и монтажа видео. Инструменты, которые превращают текст в готовые ролики, экономят часы на съемках и постпродакшне. Подходит для SMM-специалистов,

VEED.IOVeed
По запросу
5.0
MootionMootion
По запросу
5.0
FlyviFlyvi
Есть бесплатный тариф
4.9
Google Veo 3.1Google
Платно
4.9
Sora (OpenAI)OpenAI
Платно
4.9
PikaPika
Платно
4.9
captions space
Есть бесплатный тариф
4.8
Клайп
Есть бесплатный тариф
4.8
viralpulse.appViralpulse
По запросу
4.8
Viral Maker AIViral-maker
Есть бесплатный тариф
4.8

Лучшие ИИ-инструменты для генерации текста и копирайтинга

Генерация текста и копирайтинг

Подборка нейросетей для генерации текстов и копирайтинга. Сервисы, которые помогают создавать статьи, посты и рекламные объявления с нуля или по черновику, экономя часы рутинной ра

NeuroscribeNeuroscribe
Есть бесплатный тариф
5.0
GoGPTGogpt
По запросу
5.0
ChatsonicChatsonic
По запросу
4.9
НейроТекстерNeuro-texter
По запросу
4.9
ChatGPTOpenAI
По подписке
4.9
Редактум
Есть бесплатный тариф
4.8
ChadGPTChadgpt
По запросу
4.8
Cosmo ScribeCosmoscribe
Есть бесплатный тариф
4.8
Memo HelperCopilot33
По запросу
4.8
LibraChatLibrachat
Есть бесплатный тариф
4.8