Agent skill

Cloudflare Troubleshooting

by daymade in daymade/claude-code-skills

Investigate and resolve Cloudflare configuration issues using API-driven evidence gathering.

MITAuto-check passed

Install Cloudflare Troubleshooting

skills CLI
$ npx skills add daymade/claude-code-skills --skill cloudflare-troubleshooting -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install daymade/claude-code-skills cloudflare-troubleshooting --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/daymade/claude-code-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/cloudflare-troubleshooting .claude/skills/cloudflare-troubleshooting && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
cloudflare-troubleshooting
GitHub stars
1.4k
Token cost
~2.7k tokens
SKILL.md length
797 words
Files
7 (incl. scripts, references)
Skills in repo
103
Repo updated
First seen
Licence
MIT

At a glance

Investigate and resolve Cloudflare configuration issues using API-driven evidence gathering.

  • Works in 3 steps: Gather Credentials → Get Zone Information → Investigate Systematically
  • Troubleshooting ERRTOOMANYREDIRECTS
  • SKILL.md covers Core Principle, Investigation Methodology, Common Investigation Patterns and Learning New APIs, plus 5 more sections
  • Runs Python scripts from its folder; calls curl, jq and openssl; reaches api.cloudflare.com

What it does

Cloudflare Troubleshooting is an agent skill from daymade/claude-code-skills. Investigate and resolve Cloudflare configuration issues using API-driven evidence gathering. Use when troubleshooting ERRTOOMANYREDIRECTS, SSL errors, DNS issues, or any Cloudflare-related problems. Focus on systematic investigation using Cloudflare API to examine actual configuration rather than making assumptions.

Its SKILL.md is about 2.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 8 other files, including scripts and reference files (for example `references/api_overview.md`, `references/common_issues.md` and `references/email-routing.md`).

It works with Cloudflare. The repository describes itself as: Professional Claude Code skills marketplace featuring production-ready skills for enhanced development workflows. The licence is MIT.

When your agent uses it

  • Troubleshooting ERRTOOMANYREDIRECTS
  • Any Cloudflare-related problems

Example prompts

  • “/cloudflare-troubleshooting”

Requirements

  • Python 3

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. Gather Credentials
  2. Get Zone Information
  3. Investigate Systematically

What it can do on your machine

Read from SKILL.md and the folder at commit 91bed2b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 2 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • curl
    • jq
    • openssl

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • api.cloudflare.com

    Also links to:

    • developers.cloudflare.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Cloudflare Troubleshooting loads about 2.7k tokens when it runs, and up to ~10k if it reads all its reference files. Until then it costs about 87 tokens; SKILL.md has 797 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~87
When it runs · the whole SKILL.md, loaded when a task matches
~2.7k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~10k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from daymade/claude-code-skills at commit 91bed2b, republished under its MIT licence (© daymade). 797 words, ~2,726 tokens.

Download SKILL.mdSave it as .claude/skills/cloudflare-troubleshooting/SKILL.md (or your agent's skills folder). This skill also uses 6 other files; get the full folder from GitHub.
name
cloudflare-troubleshooting
description
Investigate and resolve Cloudflare configuration issues using API-driven evidence gathering. Use when troubleshooting ERR_TOO_MANY_REDIRECTS, SSL errors, DNS issues, or any Cloudflare-related problems. Focus on systematic investigation using Cloudflare API to examine actual configuration rather than making assumptions.

Cloudflare Troubleshooting

Methodology base: the general evidence-driven network-diagnosis discipline (falsification, layered isolation, counter-review) lives in the debugging-network-issues skill. This skill is the Cloudflare domain layer on top of it.

Core Principle

Investigate with evidence, not assumptions. Always query Cloudflare API to examine actual configuration before diagnosing issues. The skill's value is the systematic investigation methodology, not predetermined solutions.

Investigation Methodology

1. Gather Credentials

Reuse the domain and authorized Cloudflare connection already supplied by the user or project configuration. Ask only for missing connection information: domain, account email plus Global API Key, or API Token. Keep the working authentication method; troubleshooting does not require replacing it.

Global API Key location: Cloudflare Dashboard → My Profile → API Tokens → View Global API Key

2. Get Zone Information

First step for any Cloudflare troubleshooting - obtain the zone ID:

bash
curl -s -X GET "https://api.cloudflare.com/client/v4/zones?name=<domain>" \
  -H "X-Auth-Email: <email>" \
  -H "X-Auth-Key: <api_key>" | jq '.'

Select the exact matching zone and account before extracting its id; do not blindly select the first result when account or domain identity is ambiguous. Use that zone’s account.id for account-scoped calls.

3. Investigate Systematically

For each issue, gather evidence before making conclusions. Use Cloudflare API to inspect:

  • Current configuration state
  • Recent changes (if audit log available)
  • Related settings that might interact

Common Investigation Patterns

Redirect Loops (ERR_TOO_MANY_REDIRECTS)

Evidence gathering sequence:

  1. Check SSL/TLS mode:

    bash
    curl -X GET "https://api.cloudflare.com/client/v4/zones/{zone_id}/settings/ssl" \
      -H "X-Auth-Email: email" \
      -H "X-Auth-Key: key"

    Look for: result.value - tells current SSL mode

  2. Check Always Use HTTPS setting:

    bash
    curl -X GET "https://api.cloudflare.com/client/v4/zones/{zone_id}/settings/always_use_https" \
      -H "X-Auth-Email: email" \
      -H "X-Auth-Key: key"
  3. Check Page Rules for redirects:

    bash
    curl -X GET "https://api.cloudflare.com/client/v4/zones/{zone_id}/pagerules" \
      -H "X-Auth-Email: email" \
      -H "X-Auth-Key: key"

    Look for: forwarding_url or always_use_https actions

  4. Test origin server directly (if possible):

    bash
    curl -I -H "Host: <domain>" https://<origin_ip>

Diagnosis logic:

  • SSL mode "flexible" + origin enforces HTTPS = redirect loop
  • Multiple redirect rules can conflict
  • Check browser vs curl behavior differences

Fix:

bash
curl -X PATCH "https://api.cloudflare.com/client/v4/zones/{zone_id}/settings/ssl" \
  -H "X-Auth-Email: email" \
  -H "X-Auth-Key: key" \
  -H "Content-Type: application/json" \
  --data '{"value":"full"}'

Purge cache after fix:

bash
curl -X POST "https://api.cloudflare.com/client/v4/zones/{zone_id}/purge_cache" \
  -H "X-Auth-Email: email" \
  -H "X-Auth-Key: key" \
  -d '{"purge_everything":true}'
Email Routing and Forwarding

For alias delivery, destination verification, catch-all behavior or forwarding MX issues, follow Email Routing. It supplies the account/zone API read sequence and separates saved configuration from actual Inbox arrival.

DNS Issues

Evidence gathering:

  1. List DNS records:

    bash
    curl -X GET "https://api.cloudflare.com/client/v4/zones/{zone_id}/dns_records" \
      -H "X-Auth-Email: email" \
      -H "X-Auth-Key: key"
  2. Check external DNS resolution:

    bash
    dig <domain>
    dig @8.8.8.8 <domain>
  3. Check DNSSEC status:

    bash
    curl -X GET "https://api.cloudflare.com/client/v4/zones/{zone_id}/dnssec" \
      -H "X-Auth-Email: email" \
      -H "X-Auth-Key: key"

Look for:

  • Missing A/AAAA/CNAME records
  • Incorrect proxy status (proxied vs DNS-only)
  • TTL values
  • Conflicting records
SSL Certificate Errors

Evidence gathering:

  1. Check SSL certificate status:

    bash
    curl -X GET "https://api.cloudflare.com/client/v4/zones/{zone_id}/ssl/certificate_packs" \
      -H "X-Auth-Email: email" \
      -H "X-Auth-Key: key"
  2. Check origin certificate (if using Full Strict):

    bash
    openssl s_client -connect <origin_ip>:443 -servername <domain>
  3. Check SSL settings:

    • Minimum TLS version
    • TLS 1.3 status
    • Opportunistic Encryption

Common issues:

  • Error 526: SSL mode is "strict" but origin cert invalid
  • Error 525: SSL handshake failure at origin
  • Provisioning delay: Wait 15-30 minutes for Universal SSL
Origin Server Errors (502/503/504)

Evidence gathering:

  1. Check if origin is reachable:

    bash
    curl -I -H "Host: <domain>" https://<origin_ip>
  2. Check DNS records point to correct origin:

    bash
    curl -X GET "https://api.cloudflare.com/client/v4/zones/{zone_id}/dns_records" \
      -H "X-Auth-Email: email" \
      -H "X-Auth-Key: key"
  3. Review load balancer config (if applicable):

    bash
    curl -X GET "https://api.cloudflare.com/client/v4/zones/{zone_id}/load_balancers" \
      -H "X-Auth-Email: email" \
      -H "X-Auth-Key: key"
  4. Check firewall rules:

    bash
    curl -X GET "https://api.cloudflare.com/client/v4/zones/{zone_id}/firewall/rules" \
      -H "X-Auth-Email: email" \
      -H "X-Auth-Key: key"
Show full SKILL.md (378 more words)Show less

Learning New APIs

When encountering issues not covered above, consult Cloudflare API documentation:

  1. Browse API reference: https://developers.cloudflare.com/api/
  2. Search for relevant endpoints using issue keywords
  3. Check API schema to understand available operations
  4. Test with GET requests first to understand data structure
  5. Make changes with PATCH/POST after confirming approach

Pattern for exploring new APIs:

bash
# List available settings for a zone
curl -X GET "https://api.cloudflare.com/client/v4/zones/{zone_id}/settings" \
  -H "X-Auth-Email: email" \
  -H "X-Auth-Key: key"

API Reference Overview

Consult references/api_overview.md for:

  • Common endpoints organized by category
  • Request/response schemas
  • Authentication patterns
  • Rate limits and error handling

Consult references/ssl_modes.md for:

  • Detailed SSL/TLS mode explanations
  • Platform compatibility
  • Security implications

Consult references/common_issues.md for:

  • Issue patterns and symptoms
  • Investigation checklists
  • Platform-specific notes

Best Practices

Evidence-Based Investigation
  1. Query before assuming - Use API to check actual state
  2. Gather multiple data points - Cross-reference settings
  3. Check related configurations - Settings often interact
  4. Verify externally - Use dig/curl to confirm
  5. Test incrementally - One change at a time
API Usage
  1. Parse JSON responses - Use jq or python for readability
  2. Check success field - "success": true/false in responses
  3. Handle errors gracefully - Read errors array in responses
  4. Respect rate limits - Cloudflare API has limits
  5. Use appropriate methods:
    • GET: Retrieve information
    • PATCH: Update settings
    • POST: Create resources / trigger actions
    • DELETE: Remove resources
Making Changes
  1. Gather evidence first - Understand current state
  2. Identify root cause - Don't guess
  3. Apply targeted fix - Change only what's needed
  4. Purge cache if needed - Especially for SSL/redirect changes
  5. Verify fix - Re-query API to confirm
  6. Inform user of wait times:
    • Edge server propagation: 30-60 seconds
    • DNS propagation: Up to 48 hours
    • Browser cache: Requires manual clear
Security
  • Never log API keys in output
  • Warn if user shares credentials in public context
  • Recommend API Tokens with scoped permissions over Global API Key
  • Use read-only operations for investigation

Workflow Template

1. Reuse the configured domain and authorized API connection; obtain only missing values
2. Get zone_id via zones API
3. Investigate:
   - Query relevant APIs for evidence
   - Check multiple related settings
   - Verify with external tools (dig, curl)
4. Analyze evidence to determine root cause
5. Apply fix via appropriate API endpoint
6. Purge cache if configuration change affects delivery
7. Verify fix via API query and external testing
8. Inform user of resolution and any required actions

Example: Complete Investigation

When user reports "site shows ERR_TOO_MANY_REDIRECTS":

bash
# 1. Get zone ID
curl -s -X GET "https://api.cloudflare.com/client/v4/zones?name=example.com" \
  -H "X-Auth-Email: user@example.com" \
  -H "X-Auth-Key: abc123" | jq '.result[] | select(.name == "example.com") | {id, account}'

# Select the intended account from the exact-domain result before using its id.
# 2. Check SSL mode (primary suspect for redirect loops)
curl -s -X GET "https://api.cloudflare.com/client/v4/zones/ZONE_ID/settings/ssl" \
  -H "X-Auth-Email: user@example.com" \
  -H "X-Auth-Key: abc123" | jq '.result.value'

# If returns "flexible" and origin is GitHub Pages/Netlify/Vercel:

# 3. Fix by changing to "full"
curl -X PATCH "https://api.cloudflare.com/client/v4/zones/ZONE_ID/settings/ssl" \
  -H "X-Auth-Email: user@example.com" \
  -H "X-Auth-Key: abc123" \
  -H "Content-Type: application/json" \
  --data '{"value":"full"}'

# 4. Purge cache
curl -X POST "https://api.cloudflare.com/client/v4/zones/ZONE_ID/purge_cache" \
  -H "X-Auth-Email: user@example.com" \
  -H "X-Auth-Key: abc123" \
  -d '{"purge_everything":true}'

# 5. Inform user: Wait 60 seconds, clear browser cache, retry

When Scripts Are Useful

The bundled scripts (scripts/check_cloudflare_config.py, scripts/fix_ssl_mode.py) serve as:

  • Reference implementations of investigation patterns
  • Quick diagnostic tools when Python is available
  • Examples of programmatic API usage

However, prefer direct API calls via Bash/curl for flexibility and transparency. Scripts should not limit capability - use them when convenient, but use raw API calls when needed for:

  • Unfamiliar scenarios
  • Edge cases
  • Learning/debugging
  • Operations not covered by scripts

The investigation methodology and API knowledge is the core skill, not the scripts.

© daymade, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 6 other files (scripts, references) in cloudflare-troubleshooting of daymade/claude-code-skills.

  • SKILL.md
  • references/api_overview.md
  • references/common_issues.md
  • references/email-routing.md
  • references/ssl_modes.md
  • scripts/check_cloudflare_config.py
  • scripts/fix_ssl_mode.py

Open the folder on GitHubat commit 91bed2b

Compare with similar skills

Cloudflare Troubleshooting next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Cloudflare Troubleshooting compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Cloudflare Troubleshooting this skilldaymade/claude-code-skills1.4k—~2.7kAutomated safety check: PassMIT
Cloudflare Browser Renderingcloudflare/moltworker9.9k—~742Automated safety check: PassApache-2.0
Turnstile Spincloudflare/skills3k4 repos~7.2kAutomated safety check: NotesApache-2.0
Star Office UI Setupringhyacinth/Star-Office-UI7.5k—~1.3kAutomated safety check: PassMIT
Cloudflarehodgef/apiker1277 repos~2.2kAutomated safety check: PassMIT
Webhome Extension Builderwebhtv/webhtv1.7k—~2.8kAutomated safety check: PassGPL-3.0

Similar skills

  • Cloudflare Browser Rendering

    cloudflare/moltworker

    Official

    Drives headless Chrome through Cloudflare Browser Rendering over a CDP WebSocket to take screenshots, navigate and scrape pages, and record multi-page videos.

    9.9k GitHub stars~742 tokensUpdated 5 mo ago
    Productivity & AutomationAuto-check passed
  • Turnstile Spin

    cloudflare/skills

    Official

    Set up, repair, or migrate to Cloudflare Turnstile bot verification in an existing frontend and backend, including server-side Siteverify.

    3k GitHub starsUsed in 4 repos~7.2k tokens
    Frontend & DesignAuto-check: notes
  • Star Office UI Setup

    ringhyacinth/Star-Office-UI

    Sets up Star Office UI, a pixel-art office dashboard that shows AI agent states, lets other agents join and can be opened from a phone or a public link.

    7.5k GitHub stars~1.3k tokensUpdated 7 mo ago
    Agent WorkflowsAuto-check passed
  • Cloudflare

    hodgef/apiker

    Comprehensive Cloudflare platform skill covering Workers, Pages, storage (KV, D1, R2), AI (Workers AI, Vectorize, Agents SDK), feature flags (Flagship), networking (Tunnel, Spectrum), security (WAF…

    127 GitHub starsUsed in 7 repos~2.2k tokens
    DevOps & CloudAuto-check passed
  • Build, review, debug, reverse-engineer, and package WebHome injected extension scripts for FongMi/WebHome App WebView pages.

    1.7k GitHub stars~2.8k tokensUpdated today
    SecurityAuto-check passed
  • Nextjs On Cloudflare

    cloudflare/skills

    Official

    Build, migrate, and deploy Next.js apps on Cloudflare Workers with vinext.

    3k GitHub starsUsed in 2 repos~678 tokens
    DevOps & CloudAuto-check passed

More from daymade/claude-code-skills

All 103 skills in this repo
  • Video Comparer

    daymade/claude-code-skills

    This skill should be used when comparing two videos to analyze compression results or quality differences.

    1.4k GitHub starsUsed in 1 repo~1.4k tokens
    Auto-check: notes
  • CLI Demo Generator

    daymade/claude-code-skills

    Generates professional animated CLI demos as GIFs using VHS terminal recordings.

    1.4k GitHub stars~1.7k tokensUpdated today
    Auto-check passed
  • Doc To Markdown

    daymade/claude-code-skills

    Converts DOCX/PDF/PPTX and saved HTML/HTM to high-quality Markdown with automatic post-processing.

    1.4k GitHub stars~2.5k tokensUpdated today
    Auto-check passed
  • Interaction Design Board

    daymade/claude-code-skills

    Generates several distinct, clickable HTML interaction prototypes for one product surface into a Design Board and collects selection/remix feedback before implementation.

    1.4k GitHub stars~2.7k tokensUpdated today
    Auto-check passed
  • Auto Repo Setup

    daymade/claude-code-skills

    Diagnoses and repairs repository setup and guarded Git workflows for Claude Code or Codex — environment repair, startup sync, hook auditing, collaborator handoff.

    1.4k GitHub stars~2.6k tokensUpdated today
    Auto-check: notes
  • Bigdata Skill

    daymade/claude-code-skills

    Pulls Bigdata.com (RavenPack) financial and news data via the official bigdata-client SDK and /v1/ REST endpoints — structured financials, prices, analyst estimates, entity-sentiment series…

    1.4k GitHub stars~3.7k tokensUpdated today
    Auto-check passed

Works with

Questions about Cloudflare Troubleshooting

What does Cloudflare Troubleshooting do?

Investigate and resolve Cloudflare configuration issues using API-driven evidence gathering. Cloudflare Troubleshooting is an agent skill from daymade/claude-code-skills. Investigate and resolve Cloudflare configuration issues using API-driven evidence gathering.

When should I use Cloudflare Troubleshooting?

Cloudflare Troubleshooting fits situations like: troubleshooting ERRTOOMANYREDIRECTS; any Cloudflare-related problems.

How do I install Cloudflare Troubleshooting in Claude Code?

Run `npx skills add daymade/claude-code-skills --skill cloudflare-troubleshooting -a claude-code`. Or copy the skill folder (cloudflare-troubleshooting in daymade/claude-code-skills) into .claude/skills/cloudflare-troubleshooting in your project. Claude Code loads it when a task matches its description.

How do I install Cloudflare Troubleshooting in Codex?

Run `npx skills add daymade/claude-code-skills --skill cloudflare-troubleshooting -a codex`. Or copy the skill folder (cloudflare-troubleshooting in daymade/claude-code-skills) into .agents/skills/cloudflare-troubleshooting in your project. Codex loads it when a task matches its description.

Can I use Cloudflare Troubleshooting in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add daymade/claude-code-skills --skill cloudflare-troubleshooting -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/cloudflare-troubleshooting, .gemini/skills/cloudflare-troubleshooting, .github/skills/cloudflare-troubleshooting and .opencode/skills/cloudflare-troubleshooting in your project.

What does Cloudflare Troubleshooting need to run?

Going by SKILL.md and its folder, Cloudflare Troubleshooting needs Python for the scripts in its folder and the command-line tools its instructions call (curl, jq and openssl). Our summary lists: Python 3.

Does Cloudflare Troubleshooting access the network?

SKILL.md names 2 domains. In commands or code: api.cloudflare.com; the agent is likely to contact it when it follows the instructions. As links in the text: developers.cloudflare.com. This is read from the text; nothing was executed.

Is Cloudflare Troubleshooting safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Cloudflare Troubleshooting use?

Cloudflare Troubleshooting is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Cloudflare Troubleshooting use?

About 2.7k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 7.3k tokens, read only when the agent opens those files.

What are the alternatives to Cloudflare Troubleshooting?

Skills that share tags, products or a category with Cloudflare Troubleshooting: Cloudflare Browser Rendering (cloudflare/moltworker, 9.9k stars), Turnstile Spin (cloudflare/skills, 3k stars), Star Office UI Setup (ringhyacinth/Star-Office-UI, 7.5k stars) and Cloudflare (hodgef/apiker, 127 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Cloudflare Troubleshooting?

daymade (a GitHub user) maintains it in daymade/claude-code-skills, which has 1,444 GitHub stars. The repository holds 103 skills in this directory. The repository was last updated on October 8, 2026.

Source: daymade/claude-code-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.