PlugWiki

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. 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. 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

  1. Documentation
  2. FIRST: check installation and sign in
  3. Find commands
  4. Read output
  5. Run commands safely
  6. Choose the CLI for this project
  7. Commands cf does not support yet
  8. Skill feedback

Key facts

Installs on skills.sh
16,642 (Nov 2, 2026)

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 check

  • cf 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 running

  • Reads 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 Wrangler

  • DNS, zones, D1, KV, R2, Workers

    Generated API commands (2,900+, per the skill). Some can delete things, such as cf workers delete.

    Delete · Resource commands

  • cf init, cf dev, cf build, cf deploy

    Build and deploy Workers projects using cloudflare.config.ts.

    Runs code · Deploy and dev

  • Falls back to npx wrangler for tail and single secrets

    Names wrangler tail and wrangler secret put as the two gaps.

    Runs code · Commands cf lacks

  • Can 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

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-onlyUse --dry-run, which prints the request as JSON without sending it, or give the agent a read-only API token.
Talks toCloudflare API. GitHub (only if you approve a feedback issue)
Sign-in and keyscf keeps its own credentials and does not reuse a Wrangler login.
Scopes
  • Cloudflare account access from cf auth login or CLOUDFLARE_API_TOKEN

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

Folder
skills/cf-cli

cloudflare/skillsskills.sh

Sources

Docs, issue trackers and discussions this page is built from.

Show all 3
  1. cloudflare/skills README · github.com
  2. cf-cli SKILL.md · github.com
  3. cf-cli skill-feedback.md · github.com

Updated Nov 2, 2026.