cf-cli Skill: Use Cloudflare's cf Command Line Tool Safely From Your Agent
Teaches your agent to use Cloudflare's official cf command line tool, to look up commands instead of guessing, and to preview before it changes anything.
- Installs
- 16.6K
- on skills.sh
- Stars
- 3.2K
- on GitHub
- Files
- 1
- besides SKILL.md
- Updated
- Oct 2026
- last repo commit
The agent finds the right command by describing the task to cf cli search, reads its request shape with cf schema or --help, and previews with --dry-run before it runs something it has not checked. The skill covers sign-in, DNS, zones, D1, KV, R2 and Workers deploys.
It also decides between cf and Wrangler: with a cloudflare.config.ts it uses cf, with a Wrangler config it keeps Wrangler for dev, build and deploy. The skill needs the cf CLI installed (Node.js 22.18 or later), and cf is in beta, so commands can change.
Good for
- Developers who manage Cloudflare DNS, D1, KV, R2 or Workers from the terminal
- Teams moving a Wrangler project to cf
- Anyone letting an agent run Cloudflare commands who wants guardrails
Install cf-cli
Claude Code
- 1
Copy this prompt.
Install the cf-cli skill in Claude Code. Run this command: npm install --global cf Then check that it loaded and tell me how to use it.
- 2
Paste it into Claude Code. It shows the change and asks before running it.
Requires Node.js 22.18 or later.
You need the cf CLI plus one skill route. The plugin installs all 19 Cloudflare skills and the Cloudflare MCP server, not just cf-cli.
From the vendor's docs. Source.
What's in the skill
When it loads
Cloudflare's official cf CLI (beta) for the public Cloudflare API and Workers projects. Use for finding and running Cloudflare commands from the terminal — sign-in and profiles, cf cli search, cf schema, cf deploy/dev/build, resource commands for DNS, zones, D1, KV, and R2 — and for choosing between cf and Wrangler in a project.
Sections in SKILL.md
- Documentation
- FIRST: check installation and sign in
- Find commands
- Read output
- Run commands safely
- Choose the CLI for this project
- Commands cf does not support yet
- Skill feedback
Key facts
- Author
- Cloudflare
- License
- Apache-2.0 (plugin.json)
- Installs on skills.sh
- 16,642 (Nov 2, 2026)
- GitHub stars
- 3,244 (Nov 2, 2026), whole repo
- Last commit
- Oct 31, 2026 (repo)
- Skills in the repo
- 19 skill folders; this is one of them
What it includes
cf --version and cf auth whoami
Installs the package globally if missing, which gives the commands cf and cloudflare. cf auth login opens a browser sign-in; unattended agents use CLOUDFLARE_API_TOKEN.
Runs code ·
Install and sign in checkcf cli search, cf schema, --help
Search is local and needs no credentials; it returns up to 5 JSON matches for a quoted task.
Runs code ·
Find commands--dry-run first, review --force
Dry run prints the request without sending it. A destructive command without --force in a non-interactive session prints Aborted and still exits 0.
Runs code ·
Safe runningReads cloudflare.config.ts or wrangler config
Keeps Wrangler where a Wrangler config exists, and runs cf migrate only if you ask.
Files ·
Choose cf or WranglerDNS, zones, D1, KV, R2, Workers
Generated API commands (2,900+, per the skill). Some can delete things, such as cf workers delete.
Delete ·
Resource commandscf init, cf dev, cf build, cf deploy
Build and deploy Workers projects using cloudflare.config.ts.
Runs code ·
Deploy and devFalls back to npx wrangler for tail and single secrets
Names wrangler tail and wrangler secret put as the two gaps.
Runs code ·
Commands cf lacksCan file a public GitHub issue about the skill
Only after you approve the exact title and body; the issue goes to cloudflare/skills.
Write ·
Skill feedback
From the official docs
Permissions
High risk
What it can do
- Read your data
- Create and change things
- Delete things
- Read-only modeHow to turn it on
Watch out for
It can change and delete live Cloudflare resources
DNS, zones, D1, KV, R2 and Workers commands run against your account. Use a scoped token and ask the agent to show a dry run first. github.com
A zero exit code does not mean a delete happened
In a non-interactive session an aborted delete exits 0. Check the resource afterward instead of trusting the exit code. github.com
--force can widen a delete
The skill notes that cf workers delete --force also deletes a Worker that other Workers reference. Review any command with --force. github.com
It can post a public GitHub issue after approval
The bundled skill-feedback guide drafts a public issue on cloudflare/skills. It says never to include secrets and to post only after you approve the exact text. github.com
The Cloudflare plugin bundles an MCP server
If you install the plugin route, it also registers the Cloudflare MCP server at mcp.cloudflare.com. Skip the plugin if you only want the skill. github.com
It installs a global npm package and runs npx wrangler
SKILL.md has the agent run `npm install --global cf` if cf is missing, and `npx wrangler tail` or `npx wrangler secret put` for the two commands cf lacks. Both download and run third-party packages from npm. github.com
Technical details
| Turning on read-only | Use --dry-run, which prints the request as JSON without sending it, or give the agent a read-only API token. |
|---|---|
| Talks to | Cloudflare API. GitHub (only if you approve a feedback issue) |
| Sign-in and keys | cf keeps its own credentials and does not reuse a Wrangler login. |
| Scopes |
|
Questions
What does the cf-cli skill do?
It teaches your agent how to use Cloudflare's cf command line tool. The agent searches for commands, previews with dry run, and picks cf or Wrangler per project.
How do I install it?
Use the install box above. You need the cf CLI as well as the skill, and the box lists both. The Cloudflare plugin for Claude Code and Codex installs all 19 Cloudflare skills plus the Cloudflare MCP server.
Does it need an API key?
Not for local lookup. Running real commands needs a Cloudflare sign-in through cf auth login, which opens a browser. Agents that cannot do that set CLOUDFLARE_API_TOKEN.
Can it delete my Cloudflare resources?
The cf CLI can, and the skill allows it, so approve each delete. It tells the agent to preview with --dry-run and to review --force before running it. On some commands --force also changes what is deleted.
Is it safe?
It runs commands against your Cloudflare account with whatever access your sign-in or token has. Use a token limited to the zones and products you need, and read each command before you approve it.
cf or Wrangler?
The skill says: use cf if cloudflare.config.ts exists, keep Wrangler if a Wrangler config exists, and use cf for new projects. cf is in beta and does not support every Wrangler command yet.
Why does cf say command not found?
Another tool named cf may be on your PATH. The package also installs a command named cloudflare, which the skill tells the agent to use in that case.
Information
updated Nov 2, 2026
- Repository
- cloudflare/skills
- Folder
skills/cf-cli
Sources
Docs, issue trackers and discussions this page is built from.
Show all 3Hide
- cloudflare/skills README · github.com
- cf-cli SKILL.md · github.com
- cf-cli skill-feedback.md · github.com