All skills
openai avatar

/cloudflare-deploy

@bf9e226 official
by openaiopenai/skills28k stars
1,891

Deploy applications and infrastructure to Cloudflare using Workers, Pages, and related platform services. Use when the user asks to deploy, host, publish, or set up a project on Cloudflare.

Use this Skill: https://skilld.dev/gh/openai/skills/cloudflare-deploy

This session only. Nothing lands on disk.

referencesstreamgotchas.md

≈1.1k tokens on demand. Your agent reads this file only when SKILL.md points to it.

Stream Gotchas

Common Errors

"ERR_NON_VIDEO"

Cause: Uploaded file is not a valid video format Solution: Ensure file is in supported format (MP4, MKV, MOV, AVI, FLV, MPEG-2 TS/PS, MXF, LXF, GXF, 3GP, WebM, MPG, QuickTime)

"ERR_DURATION_EXCEED_CONSTRAINT"

Cause: Video duration exceeds maxDurationSeconds constraint Solution: Increase maxDurationSeconds in direct upload config or trim video before upload

"ERR_FETCH_ORIGIN_ERROR"

Cause: Failed to download video from URL (upload from URL) Solution: Ensure URL is publicly accessible, uses HTTPS, and video file is available

"ERR_MALFORMED_VIDEO"

Cause: Video file is corrupted or improperly encoded Solution: Re-encode video using FFmpeg or check source file integrity

"ERR_DURATION_TOO_SHORT"

Cause: Video must be at least 0.1 seconds long Solution: Ensure video has valid duration (not a single frame)

Troubleshooting

Video stuck in "inprogress" state

  • Cause: Processing large/complex video
  • Solution: Wait up to 5 minutes for processing; use webhooks instead of polling

Signed URL returns 403

  • Cause: Token expired or invalid signature
  • Solution: Check expiration timestamp, verify JWK is correct, ensure clock sync

Live stream not connecting

  • Cause: Invalid RTMPS URL or stream key
  • Solution: Use exact URL/key from API, ensure firewall allows outbound 443

Webhook signature verification fails

  • Cause: Incorrect secret or timestamp window
  • Solution: Use exact secret from webhook setup, allow 5-minute timestamp drift

Video uploads but isn't visible

  • Cause: requireSignedURLs enabled without providing token
  • Solution: Generate signed token or set requireSignedURLs: false for public videos

Player shows infinite loading

  • Cause: CORS issue with allowedOrigins
  • Solution: Add your domain to allowedOrigins array

Limits

Resource Limit
Max file size 30 GB
Max frame rate 60 fps (recommended)
Max duration per direct upload Configurable via maxDurationSeconds
Token generation (API endpoint) 1,000/day recommended (use signing keys for higher)
Live input outputs (simulcast) 5 per live input
Webhook retry attempts 5 (exponential backoff)
Webhook timeout 30 seconds
Caption file size 5 MB
Watermark image size 2 MB
Metadata keys per video Unlimited
Search results per page Max 1,000

Performance Issues

Upload is slow

  • Cause: Large file size or network constraints
  • Solution: Use TUS resumable upload, compress video before upload, check bandwidth

Playback buffering

  • Cause: Network congestion or low bandwidth
  • Solution: Use ABR (adaptive bitrate) with HLS/DASH, reduce max bitrate

High processing time

  • Cause: Complex video codec, high resolution
  • Solution: Pre-encode with H.264 (most efficient), reduce resolution

Type Safety

// Error response type
interface StreamError {
  success: false;
  errors: Array<{
    code: number;
    message: string;
  }>;
}

// Handle errors
async function uploadWithErrorHandling(url: string, file: File) {
  const formData = new FormData();
  formData.append('file', file);
  const response = await fetch(url, { method: 'POST', body: formData });
  const result = await response.json();
  
  if (!result.success) {
    throw new Error(result.errors[0]?.message || 'Upload failed');
  }
  return result;
}

Security Gotchas

  1. Never expose API token in frontend - Use direct creator uploads
  2. Always verify webhook signatures - Prevent spoofed notifications
  3. Set appropriate token expiration - Short-lived for security
  4. Use requireSignedURLs for private content - Prevent unauthorized access
  5. Whitelist allowedOrigins - Prevent hotlinking/embedding on unauthorized sites

In This Reference

See Also

  • workers - Deploy Stream APIs securely

Source: SKILL.md on GitHub

2 warnings17d5 checks · Risk SAFE
  • Gen Agent Trust Hub17d

    This skill provides comprehensive guidance for deploying and managing infrastructure on the Cloudflare platform. It includes extensive educational material on secure development practices, such as preventing SQL injection and managing secrets effectively. No malicious patterns or security risks were identified.

  • Socket17d

    2 alerts: gptAnomaly

  • Snyk17d

    Risk: LOW · No issues

  • Runlayer7mo

    310/310 files flagged

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at bf9e226. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 months ago.

Activeupdated 8 months ago

README badge

README badge for openai/skills/cloudflare-deploy

Deploys applications and infrastructure to Cloudflare's platform, including Workers, Pages, D1, R2, Durable Objects, KV, and other services. Use decision trees to route to the right Cloudflare product based on compute, storage, AI, networking, security, or media needs.

Generated from the current SKILL.md.

Does this skill cover all Cloudflare products?
The skill is a consolidated index covering compute, storage, AI, networking, security, media, and developer tools on Cloudflare. It uses decision trees to route you to the right product reference, then loads detailed guidance for that product.
What authentication is required before deploying?
Run `npx wrangler whoami` to check if authenticated. For local deployment, use `wrangler login` (one-time OAuth). For CI/CD, set the `CLOUDFLARE_API_TOKEN` environment variable.
What should I do if deployment fails due to network issues?
Rerun the deploy with `sandbox_permissions=require_escalated` to grant elevated network access, which is required for outbound requests to Cloudflare during deployment.
How long does a Cloudflare deployment typically take?
Deployments may take several minutes. Use appropriate timeout values in your configuration or CI/CD environment.

Generated from the current SKILL.md. These answers refresh after source changes.