# cloudflare cli

> Operate the Cloudflare unified CLI with automated schema discovery, context management, and security-first execution.

cloudflare cli is a subscription AI agent skill on Agensi by Roman Pinchuk, in APIs & Backend. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $5/mo (subscription, cancel anytime)
- Creator: [Roman Pinchuk](https://www.agensi.io/creators/roman-pinchuk)
- Category: [APIs & Backend](https://www.agensi.io/skills/apis-backend)
- Version: 1.0
- Last updated: 2026-10-13
- Security: scan passed (2026-10-13); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/cloudflare-cli
- Tags: api, cloudflare, devops, automation, cli

## About this skill

Managing Cloudflare infrastructure often involves navigating fragmented documentation or juggling specific CLI tools like Wrangler and the technical preview `cf` utility. This skill provides a structured interface for operating the unified Cloudflare CLI while maintaining strict security and context awareness.

### What it does
- **Resource Management** executes Cloudflare-wide API operations across DNS, Workers, and account resources.
- **Context Handling** resolves and manages account and zone IDs using `.cfrc` files or environment variables.
- **Authentication Management** handles OAuth profiles and API tokens via `cf auth` without exposing secrets.
- **Schema Discovery** retrieves real-time command syntax and API request bodies from the installed binary.
- **Local Development** bridges commands to local Miniflare or `wrangler dev` sessions using the `--local` flag.

### How it works
1. **Introspection** runs `cf agent-context` to map available product commands and operational notes.
2. **Verification** checks active authentication and zone context via `cf auth whoami` and `cf context show`.
3. **Validation** pulls the current `--help` and `cf schema` to ensure command flags match the technical preview version.
4. **Execution** runs the command, preferring `--dry-run` for writes, and parses the resulting JSON output.

### Frameworks & tools
This tool targets the `cf` technical preview CLI. It requires Node.js 22 or newer and works alongside Wrangler for Workers development and Miniflare for local emulation.

### Why this beats prompting it yourself
The `cf` CLI is in technical preview with a rapidly changing command surface that standard LLM training data cannot track. This skill forces real-time introspection of the installed binary to prevent syntax errors and ensures destructive actions are preceded by context verification.

### Use cases
- Automate DNS record updates and zone configurations across multiple accounts.
- Debug local Workers environments by routing CLI commands to a running dev server.
- Manage complex OAuth profiles and directory-bound authentication settings.
- Discover and execute new Cloudflare API features via the unified command schema.

### Known limitations
Requires manual installation of the `cf` CLI if not present. It is designed for the technical preview `cf` tool and does not replace the specialized configuration workflows of Wrangler.

## Requires

- Node.js
- cf

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the cloudflare cli skill from Agensi" and describe your task.
3. Subscribe on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### How does this skill handle the frequently changing command syntax of the Cloudflare technical preview CLI?

Unlike static prompts, this skill performs real-time introspection of your installed 'cf' binary to discover the latest command schemas, preventing syntax errors caused by the tool's rapid development cycle.

### Can I use this skill for local development and testing before deploying to production?

Yes, the skill is designed to work alongside Wrangler and can route commands to local Miniflare or 'wrangler dev' sessions using the --local flag for safer testing.

### What are the core technical requirements to run the Cloudflare CLI skill?

The skill requires Node.js 22 or newer and a manual installation of the Cloudflare unified CLI (cf) on your local machine or server environment.

### How does the skill ensure that destructive actions aren't executed by mistake?

Security is prioritized through automated context verification via 'cf auth whoami' and a preference for --dry-run execution on write commands to prevent accidental infrastructure changes.

### Does this skill replace the need for Wrangler when managing Cloudflare Workers?

This skill is a specialized interface for the unified 'cf' CLI; while it can interact with Workers via the unified API, it does not replace the deep configuration workflows found in Wrangler.

### What exactly is included in the purchase of this skill?

The skill acts as a bridge between your AI agent and the CLI, providing the logic for schema discovery, authentication management, and secure command execution.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
