# Cloudflare

> A Claude skill from ashish7802/awesome-api-skills.

- **Type:** Skill
- **Install:** `agentstack add skill-ashish7802-awesome-api-skills-cloudflare`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [ashish7802](https://agentstack.voostack.com/s/ashish7802)
- **Installs:** 0
- **Category:** [Cloud & Infrastructure](https://agentstack.voostack.com/c/cloud-infrastructure)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [ashish7802](https://github.com/ashish7802)
- **Source:** https://github.com/ashish7802/awesome-api-skills/tree/master/skills/cloudflare

## Install

```sh
agentstack add skill-ashish7802-awesome-api-skills-cloudflare
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# 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

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [ashish7802](https://github.com/ashish7802)
- **Source:** [ashish7802/awesome-api-skills](https://github.com/ashish7802/awesome-api-skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-ashish7802-awesome-api-skills-cloudflare
- Seller: https://agentstack.voostack.com/s/ashish7802
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
