cf-diagnostician

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

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.

agentmods
npx agentmods add agents/thrownlemon/claude-code-plugins/cf-diagnostician
Clone the repo
git clone --depth 1 https://github.com/ThrownLemon/claude-code-plugins
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. Scan, not verified.
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 $0.00034 $0.01021
Opus 5 $0.00017 $0.00511
Sonnet 5 $0.00007 $0.00204
Haiku 4.5 $0.00003 $0.00102

Measured 2d ago against content hash 52f3663a0a56, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 2d 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. 2d 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 2mo ago), licensed MIT. It adds 34 tokens to every session and 1,021 once invoked, about $0.0002 per session on Opus 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

Other agents, from other repositories

Cloud Security Architect

Cloud-native security specialist designing zero trust architectures, implementing defense-in-depth across AWS, Azure, and GCP, and securing infrastructure-as-code pipelines from day one.

SHAdd0WTAka/Zen-Ai-Pentest · 36 tokens

Backend Architect

Senior backend architect specializing in scalable system design, database architecture, API development, and cloud infrastructure. Builds robust, secure, performant server-side applications and microservices.

SHAdd0WTAka/Zen-Ai-Pentest · 34 tokens

gcp

Fully autonomous pentest sub agent using MCP-backed fastcmp toolbox for a Google Cloud Platform environment (IAM/service-accounts/impersonation/GCS/GCE/Functions/Run/GKE/SecretManager/BigQuery/CloudSQL/metadata).

ASCIT31/Dark-Moon · 52 tokens

deploy-ops

Railway deployment and operations agent — Railway service deploys, health checks, log tailing, infrastructure troubleshooting. Use for deployment and ops tasks.

0xSoftBoi/suwappubot · 33 tokens

deployment-expert

Specializes in Vercel deployment strategies, CI/CD pipelines, preview URLs, production promotions, rollbacks, environment variables, and domain configuration. Use when troubleshooting deployments, setting up CI/CD, or optimizing the deploy pipeline.

build-with-dhiraj/ai-workflow-framework-portability-kit · 49 tokens

azure-architect

Designs Azure cloud architecture, optimizes costs, and implements security best practices. Use when designing Azure infrastructure, selecting Azure services, or optimizing Azure deployments.

armanzeroeight/fastagent-plugins · 35 tokens