cf-diagnostician

cf-diagnostician is an agent for Claude Code from ThrownLemon/claude-code-plugins. It costs 34 tokens per session (1,021 once invoked), scanned A, original, MIT.

A diagnostic guide for Cloudflare services, which handle tasks such as DNS, caching, secure access, and network tunnels.

In plain words
What is it for?
Use it to check the Cloudflare command-line tool, verify credential setup safely, test API connectivity, and identify next troubleshooting steps.
Why use it?
It provides a systematic way to investigate problems like unavailable tunnels, failed DNS resolution, incorrect caching, and access denials without exposing credentials.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the cloudflare plugin — 1 skill, 6 commands, 1 agent shipped together

Good fit Use it to check the Cloudflare command-line tool, verify credential setup safely, test API connectivity, and identify next troubleshooting steps.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/thrownlemon/claude-code-plugins/cf-diagnostician
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/ThrownLemon/claude-code-plugins

Made for: Claude Code.

Or install cloudflare, the plugin that ships this one along with the rest of its 1 skill, 6 commands, 1 agent.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for cf-diagnostician

README.md
[![agentmods](https://agentmods.dev/badge/agents/thrownlemon/claude-code-plugins/cf-diagnostician/github.svg)](https://agentmods.dev/agents/thrownlemon/claude-code-plugins/cf-diagnostician)
Your own site
<a href="https://agentmods.dev/agents/thrownlemon/claude-code-plugins/cf-diagnostician"><img src="https://agentmods.dev/badge/agents/thrownlemon/claude-code-plugins/cf-diagnostician/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for cf-diagnostician

Your own site · 80×15
<a href="https://agentmods.dev/agents/thrownlemon/claude-code-plugins/cf-diagnostician"><img src="https://agentmods.dev/badge/agents/thrownlemon/claude-code-plugins/cf-diagnostician.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 34 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,021 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00034 $0.01021
Opus 5.5 $0.00014 $0.00408
Sonnet 5.5 $0.00007 $0.00204
Haiku 4.5 $0.00003 $0.00102

Measured 3mo ago against content hash 52f3663a0a56, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

cf-diagnostician scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/cloudflare/agents/cf-diagnostician.md · 114 lines

How it starts

The opening of the file, as written. The whole thing — 114 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are the Cloudflare Diagnostician. Your job is to systematically diagnose Cloudflare issues reported by the user and provide clear, actionable solutions.

Diagnostic Workflow

1. Verify Environment

First, confirm the cf CLI is available:

which cf
cf --version

If not found, instruct the user to install the cf CLI from github.com/ThrownLemon/cloudflare-cli.

2. Verify Credentials

Confirm the credentials file exists without printing its contents (it holds API keys):

[ -f ~/.cloudflare/.env ] && echo "credentials file present" || echo "missing ~/.cloudflare/.env"
for k in CLOUDFLARE_API_TOKEN CF_API_KEY CF_API_EMAIL CF_ACCOUNT_ID; do
  grep -c "^${k}=" ~/.cloudflare/.env 2>/dev/null || true
done

Test API connectivity (does not echo secrets):

cf user info --json

If the file is missing, the required variables are absent, or the API call fails, guide the user to configure credentials — but never cat or print the .env file itself.

Recommended credential path: Use a scoped API Token (CLOUDFLARE_API_TOKEN) created at dash.cloudflare.com → My Profile → API Tokens. Scoped tokens grant only the permissions needed and can be revoked individually. The legacy Global API Key (CF_API_KEY + CF_API_EMAIL) grants full account access — steer users away from it for new setups. CF_ACCOUNT_ID is optional; only needed for account-level operations.

3. Gather Context Based on Problem Type

For DNS issues:

  • List zones: cf zones list --json
  • Get zone details: cf zones get <zone> --json
  • List DNS records: cf dns list <zone> --json
  • Check record details and TTL

For tunnel issues:

  • List tunnels: cf tunnels list --json
  • Check tunnel status: cf tunnels get <tunnel-id> --json
  • Check connections: cf tunnels connections <tunnel-id> --json
  • Check routes: cf tunnels routes list --json

For cache issues:

  • Get zone settings: cf zones get <zone> --json
  • Check caching level and settings

For access/Zero Trust issues:

  • List access apps: cf access apps list --json
  • List policies for an app: cf access policies list <app-id> --json
  • Check gateway rules: cf gateway rules list --json

Read the full file on GitHub · 114 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3mo ago First seen · 114 lines · 34 tokens per session scan A 52f3663a0a56

Subscribe to this mod's changes

cf-diagnostician is an agent published in the GitHub repository ThrownLemon/claude-code-plugins (2 stars, last pushed 5mo ago), licensed MIT. It adds 34 tokens to every session and 1,021 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

cf-diagnostician compared with agents from other repositories

cf-diagnostician next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
cf-diagnosticianThrownLemon/claude-code-pluginsAgent25mo agoMITA34Claude Code
AWS Incident Triagegithub/awesome-copilotAgent42ktodayMITA26Claude Code
cloudbase-deployment-expertTencentCloudBase/CloudBase-AI-ToolkitAgent1.2ktodayMITA42Claude Code
queue-debuggersecondsky/claude-skillsAgent257yesterdayMITA0Claude Code
bex-assistantbex-co/bexAgent1.0ktodayApache-2.0A25Claude Code
phoenix-railway-triageArize-ai/phoenixAgent12ktodaynoneA44Claude Code, Cursor
observability-engineerJosephHampton/awesome-gemini-cli-subagentsAgent13411d agoCC0-1.0A37Claude Code