Command Palette

Search for a command to run...

Назад к скиллам
скилл № 93558

cdn-edge

Use when the user asks about CDNs, CloudFront, Fastly, Akamai, Cloudflare caching, cache invalidation, Cache-Control headers, origin shield, signed URLs, CDN…

БесплатноБез исполняемых скриптов
j4flmaoот j4flmao★ 47 звёзд на GitHub

Установить cdn-edge в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

CDN and Edge Computing

Purpose

Design and implement content delivery networks with caching strategies, edge computing, WAF, DDoS mitigation, and performance optimization across major CDN providers.

Agent Protocol

Trigger

"CDN", "edge", "content delivery", "CloudFront", "Cloud CDN", "Azure CDN", "Akamai", "Fastly", "Cloudflare", "edge functions", "WAF", "DDoS protection", "cache invalidation", "signed URL".

Input Context

Content type (static, API, video, dynamic), user geography, CDN provider, origin config, caching TTL requirements, security needs (WAF, DDoS, bot management), compliance (GDPR data residency).

Output Artifact

Terraform HCL for CDN resources, provider config (CloudFront, Fastly VCL, Cloudflare Workers), WAF rules, edge function code.

Response Format

Provider: {CloudFront|Cloudflare|Fastly|Akamai|Cloud CDN|Azure Front Door}
Cache rules: {path pattern -> TTL, cache key}
Security: {WAF managed rules, rate limits, DDoS tier}
Edge logic: {none|CloudFront Functions|Lambda@Edge|Workers}
Config: {Terraform/IaC snippet}

Completion Criteria

  • CDN distribution with proper origins and cache behaviors.
  • Cache rules per content type.
  • WAF rules configured (OWASP top 10, rate limiting).
  • SSL/TLS with proper certificate.
  • Signed URLs/cookies for private content.
  • Monitoring for origin errors and cache hit ratio.

Architecture Decision Trees

CDN Provider Comparison

Provider POPs Edge Compute WAF Best For
CloudFront 450+ Functions + Lambda@Edge AWS WAF AWS-native stacks
Azure Front Door 150+ Front Door Rules Azure WAF Azure-native stacks
Google Cloud CDN 150+ Cloud Functions Cloud Armor GCP-native stacks
Cloudflare 310+ Workers, Pages, R2 Built-in WAF Performance + DDoS
Fastly 100+ Compute@Edge (Wasm) Next-Gen WAF Customizable, high-perf
Akamai 4100+ EdgeWorkers Kona Site Defender Enterprise, global

Caching Strategy by Content Type

Content Default TTL Query String Best Practice
Static assets (JS/CSS/img) 1 year Ignore Content hash in URL
HTML pages 0-5 min Key params ETag/Last-Modified
API responses 0-60 sec Respect Cache-Control headers
Video (HLS/DASH) 10-30 min Ignore Segment-level caching
User-specific content No cache N/A Signed URLs

Edge Compute: CloudFront Functions vs Lambda@Edge vs Workers

Feature CloudFront Functions Lambda@Edge Cloudflare Workers
Max execution 50μs 5s 50ms
Runtime JS Node.js, Python JS, Wasm
Network access None Full (VPC, DB) Fetch API
Cold start No Yes No
Use case Header rewrite, URL redirect Auth, A/B test Full edge apps

DDoS Mitigation Decision Tree

Is traffic above baseline?
├── Yes → Is it application layer (L7)?
│   ├── Yes → WAF rate limiting + bot management + challenge
│   └── No → Is it network layer (L3/4)?
│       ├── Yes → DDoS scrubber (AWS Shield, Cloud Armor, Cloudflare magic transit)
│       └── No → Volume-based (amplification, reflection)?
│           ├── Yes → Null route / blackhole + upstream filtering
│           └── No → Monitor and investigate
└── No → Normal traffic, allow through

CDN Origin Selection

Origin Type Latency Cost Scaling Best For
S3/Cloud Storage Low Low Automatic Static assets
ALB/GLB Medium Medium Auto-scaling Dynamic APIs
Custom (EC2/VM) Variable Varies Manual Legacy apps
Multi-region origin Low (geo-routed) High Complex Global apps

Quick Start

CDN distribution → Cache behaviors (static:1y, API:60s) → WAF (OWASP, rate limit) → SSL cert → Edge function for A/B testing → Signed URLs for private content.

Core Workflow

Step 1: CloudFront with Terraform

resource "aws_cloudfront_distribution" "main" {
  enabled         = true
  is_ipv6_enabled = true
  price_class     = "PriceClass_100"

  origin {
    domain_name = aws_s3_bucket.assets.bucket_regional_domain_name
    origin_id   = "S3Origin"
    origin_access_control_id = aws_cloudfront_origin_access_control.s3.id
    origin_shield {
      enabled              = true
      origin_shield_region = var.region
    }
  }

  origin {
    domain_name = aws_lb.api.dns_name
    origin_id   = "APIOrigin"
    custom_origin_config {
      http_port              = 80
      https_port             = 443
      origin_protocol_policy = "https-only"
      origin_ssl_protocols   = ["TLSv1.2"]
    }
    custom_header {
      name  = "X-Origin-Verify"
      value = random_password.origin_verify.result
    }
  }

  default_cache_behavior {
    target_origin_id = "S3Origin"
    viewer_protocol_policy = "redirect-to-https"
    allowed_methods  = ["GET", "HEAD", "OPTIONS"]
    cached_methods   = ["GET", "HEAD"]
    compress         = true
    forwarded_values
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

  • references/caching-performance.md
  • references/cdn-edge-advanced.md
  • references/cdn-edge-fundamentals.md
  • references/cdn-providers.md
  • references/ddos-mitigation.md
  • references/edge-functions.md
  • references/waf-rules.md

FAQ

Что делает скилл cdn-edge?

Use when the user asks about CDNs, CloudFront, Fastly, Akamai, Cloudflare caching, cache invalidation, Cache-Control headers, origin shield, signed URLs, CDN WAF rules or DDoS protection. Produces CDN cache, origin and security configuration. Not for writing Workers apps (use cloud-native-cloudflare-workers).

Как установить скилл cdn-edge?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл cdn-edge запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить cdn-edge с