Skip to content
Back to skills

Cloudflare

ASecurity

The Cloudflare API manages DNS, CDN caching, Workers, and WAF rules. This skill covers the Node.js SDK and REST patterns.

  • 13 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 5, 2026
ai-agentsbashnodeapisecurityperformance

Works with

  • cli
  • api

Security analysis

A92/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 8 files and shows the line behind each finding

Scanned September 5, 2026

npx -y skills add ashish7802/awesome-api-skills --skill cloudflare --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Cloudflare?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Cloudflare
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ashish7802-cloudflare/badge)](https://www.skillsdirectory.com/skills/ashish7802-cloudflare)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
# Cloudflare API Skill

## Overview
The Cloudflare API manages DNS, CDN caching, Workers, and WAF rules. This skill covers the Node.js SDK and REST patterns.

## Installation
```bash
npm install cloudflare
pip install cloudflare
```

## Authentication
Use API Tokens (recommended) instead of the Global API Key. Tokens can be scoped to specific zones and permissions.

## Core Concepts
- **Zone**: Represents a domain name.
- **Workers**: Serverless execution environments at the edge.
- **Cache Purge**: Invalidating stored assets.

## Common Workflows
1. Instantiate client with API token.
2. Fetch Zone ID using domain name.
3. Execute action (e.g., `client.zones.purgeCache`).

## Error Handling
Errors are returned in the `errors` array of the JSON response payload. Watch for code `10000` (Authentication error).

## Security
Scope API Tokens tightly (e.g., 'Zone.DNS.Edit' for a single domain). Never use the Global API key in automated scripts.

## Rate Limits
The API allows 1200 requests per 5 minutes per IP address.

## Best Practices
When purging cache, try to purge by URL, Tag, or Prefix rather than 'Purge Everything' to maintain CDN performance.

## Troubleshooting
If DNS records aren't updating, verify the 'proxied' (orange cloud) status, which alters how Cloudflare serves the record.

## References
- [API Reference](https://developers.cloudflare.com/api/)

## Why use this skill
Use this when your agent works with **cloudflare** — structured patterns beat pasted docs and prevent common hallucinations.

## AI pitfalls
- Using outdated SDK or API versions from training data
- Inventing environment variable names
- Omitting error handling and retry logic

## Production checklist
- [ ] Secrets in environment variables, not source code
- [ ] Error handling and logging in place
- [ ] Rate limits and timeouts configured

## Related skills
- No graph relationships yet — see the knowledge graph in the docs site.

---
> **Last Verified:** 2026-07-02

Files in this skill

  • SKILL.md1.9 KB
  • examples/basic.ts43 B
  • examples/example.py68 B
  • examples/example.ts86 B
  • prompts/purge-cache.md100 B
  • prompts/system.md45 B
  • tests/skill.test.ts33 B
  • tests/validation.test.ts108 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.