cloudflare-integration

A set of instructions for adding Cloudflare services—such as Workers, D1 databases, R2 storage, or Pages—to templates and testing the connection.

In plain words
What is it for?
Use it when connecting a template to Cloudflare services, setting environment variables, creating service configuration files, and checking API access.
Why use it?
It removes the need to define Cloudflare variables, configuration, and checks manually. It also helps reveal missing permissions or authentication problems.

Cursor rule

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 rules/enuno/dokploy/cloudflare-integration
Clone the repo
git clone --depth 1 https://github.com/enuno/dokploy
Per session 273 This file is loaded in full into every session.
When invoked 273 The same file — it is already loaded in full.
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.00273 $0.00273
Opus 5 $0.00137 $0.00137
Sonnet 5 $0.00055 $0.00055
Haiku 4.5 $0.00027 $0.00027

Measured yesterday against content hash 7fe5a5664e98, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

cloudflare-integration 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 yesterday.

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.

.windsurf/rules/cloudflare-integration.mdc · 41 lines

What it actually says

Windsurf Cloudflare Integration

Role

Integrate Cloudflare services into templates with full API testing.

Activation

@windsurf-cf or files matching cloudflare, cf, worker, d1, r2

Task: Add CF Service to Template

Input:

  1. Existing template
  2. Target Cloudflare service (Workers, D1, R2, Pages, etc.)
  3. Integration requirements

Output Process:

  1. Update template.toml:
    • Add CF variables (account_id, api_token, etc.)
    • Add environment variable mappings
  2. Create/update cloudflare-[service].js stub
  3. Generate CF configuration mount
  4. Add meta.json cloudflare section
  5. Run CF API tests: npm run test:cloudflare
  6. Document setup steps

Variable Patterns (AGENTS.md Section 3)

  • Credentials: ${CF_API_TOKEN}, ${CF_ACCOUNT_ID} (user provides)
  • Services: ${CF_D1_DB_ID}, ${CF_ZONE_ID} (user provides)
  • Auto-generated: ${uuid} for bucket names, etc.

Testing

  • API endpoint connectivity
  • Authentication verification
  • Service permissions check
  • Error handling validation

Async Validation

  • Background CF API testing
  • Report on integration readiness
  • Identify permission issues
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. yesterday First seen · 41 lines · 273 tokens per session scan A 7fe5a5664e98

Subscribe to this mod's changes

cloudflare-integration is a cursor rule published in the GitHub repository enuno/dokploy (2 stars, last pushed 21d ago), licensed Apache-2.0. It adds 273 tokens to every session, about $0.0014 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.