cloudflare-cli
Skill2 starsChanged 4 months agoMITView on GitHub
Use when operating Cloudflare through the technical-preview `cf` CLI, including authentication, account or zone context, API resources, local resources, command discovery, and JSON output.
- Installs packages
2 other projects use a version of this.
Adopted by
Most recently taken up by
- Firzus/agent-skillstheir own version, first seen Nov 1, 2026
- genlayerlabs/genlayer-studiotheir own version, first seen Oct 8, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- genlayerlabs/genlayer-studio★ 180same name
- Firzus/agent-skills★ 4same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository7 other files it gives its agents.
- apple-calendar-jxaSkill
- apple-mail-jxaSkill
- apple-safari-jxaSkill
- camofox-browserSkill
- hass-cliSkill
- memorySkill
- sshSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
27 rules. About 0 are common, 6 are distinctive, and 21 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
21
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 13
Use this skill when the user explicitly requests the cf command or wants to manage Cloudflare resources with Cloudflare's unified CLI.
- Very specific: line 19
Use cf for Cloudflare-wide API resource management, authentication profiles, account and zone context, local resource access, and tasks …
- Very specific: line 20
Use Wrangler guidance when the user explicitly requests wrangler or needs its established Workers development and configuration workflows.
- Very specific: line 21
Do not silently translate between cf and wrangler.
- Very specific: line 22
Do not confuse Cloudflare's cf with the Cloud Foundry CLI, which uses the same executable name.
- Very specific: line 26
Never print, log, or expose CLOUDFLARE_API_TOKEN, OAuth credentials, token values, or other secrets.
- Very specific: line 27
Do not inspect environment variable values.
- Distinctive: line 28
Prefer read-only discovery before making changes.
- Very specific: line 29
Before a write, retrieve the exact command help and schema.
- Distinctive: line 30
Ask for confirmation before destructive, irreversible, security-sensitive, billing-related, token-management, or production-impacting …
- Distinctive: line 31
Prefer least-privilege API tokens and the intended named profile.
- Very specific: line 32
Verify account and zone context before writes.
- Very specific: line 33
After a write, verify the result with an appropriate read-only get, list, or status command.
- Very specific: line 37
Run cf --version. The npm package requires Node.js 22 or newer.
- Very specific: line 38
If cf is unavailable, ask before installing it.
- Very specific: line 39
Run cf --help because top-level commands and global flags may have changed.
- Very specific: line 40
Check authentication with cf auth whoami.
- Distinctive: line 45
Use these sources in order:
- Very specific: line 58
Run cf agent-context --list if the product name is uncertain.
- Very specific: line 59
Run cf agent-context <product> and select the exact command path from its output.
- Very specific: line 60
Run cf <command-path> --help before supplying flags.
- Distinctive: line 63
Run read-only discovery needed to obtain exact resource IDs rather than guessing.
- Very specific: line 74
Do not treat examples from another product as proof that a flag is accepted.
- Very specific: line 89
Use --profile <name> when the user identifies a profile explicitly.
- Distinctive: line 91
Do not display stored configuration files or credential material to diagnose authentication.
- Very specific: line 112
Prefer an explicit --zone <zone-id-or-domain> for a one-off command instead of changing persistent context.
- Very specific: line 120
Use --quiet only when suppressed context and status information is safe for the task.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Cloudflare CLI
Use this skill when the user explicitly requests the cf command or wants to manage Cloudflare resources with Cloudflare's unified CLI.
cf is a technical preview and its command surface changes quickly. Retrieve syntax from the installed CLI before composing commands. Do not rely on a memorized command catalog.
Scope
- Use
cffor Cloudflare-wide API resource management, authentication profiles, account and zone context, local resource access, and tasks that explicitly name thecfCLI. - Use Wrangler guidance when the user explicitly requests
wrangleror needs its established Workers development and configuration workflows. - Do not silently translate between
cfandwrangler; their command names and behavior can differ. - Do not confuse Cloudflare's
cfwith the Cloud Foundry CLI, which uses the same executable name.
Safety
- Never print, log, or expose
CLOUDFLARE_API_TOKEN, OAuth credentials, token values, or other secrets. - Do not inspect environment variable values. Check authentication with
cf auth whoamiand report sanitized errors. - Prefer read-only discovery before making changes.
- Before a write, retrieve the exact command help and schema. Use
--dry-runfirst when the command supports it. - Ask for confirmation before destructive, irreversible, security-sensitive, billing-related, token-management, or production-impacting commands unless the user already explicitly requested that exact action.
- Prefer least-privilege API tokens and the intended named profile. Never create, rotate, or delete credentials as an incidental setup step.
- Verify account and zone context before writes. Keep
--quietdisabled when context resolution matters. - After a write, verify the result with an appropriate read-only
get,list, or status command.
Setup
- Run
cf --version. The npm package requires Node.js 22 or newer. - If
cfis unavailable, ask before installing it. Upstream supportsnpm install -g cf;npx cfcan run the preview without a global install. - Run
cf --helpbecause top-level commands and global flags may have changed. - Check authentication with
cf auth whoami. If authentication is missing, usecf auth loginfor OAuth or ask the user to configureCLOUDFLARE_API_TOKENwithout revealing its value. - Inspect active defaults with
cf context showbefore account- or zone-scoped work.
Source Of Truth
Use these sources in order:
cf agent-context --listto discover current product names.cf agent-context <product>for the product's current command inventory and operational notes.cf <command-path> --helpfor exact arguments, options, defaults, and enum values.cf schema <command-path>for API path, request fields, and parameter requirements.- Cloudflare's API and product documentation at
https://developers.cloudflare.com/for product semantics, permissions, limits, and behavior not explained by the CLI.
The npm package also bundles generated command and schema metadata, but use the public introspection commands instead of reading package internals. The announcement blog post explains preview status and design intent; it is not a command reference.
Discovery Workflow
- Identify the Cloudflare product and whether the operation is local or remote.
- Run
cf agent-context --listif the product name is uncertain. - Run
cf agent-context <product>and select the exact command path from its output. - Run
cf <command-path> --helpbefore supplying flags. - For request bodies or ambiguous fields, run
cf schema <command-path>. - Resolve the intended profile, account, and zone.
- Run read-only discovery needed to obtain exact resource IDs rather than guessing.
- For writes, dry-run when supported, execute the approved command, then verify with a read-only command.
Example discovery sequence:
cf agent-context dns
cf dns records create --help
cf schema dns records createDo not treat examples from another product as proof that a flag is accepted. Confirm every final command with its own --help output.
Authentication And Profiles
Credential resolution prefers CLOUDFLARE_API_TOKEN, then the OAuth profile selected by --profile, a directory profile binding, or the default profile.
cf auth whoami
cf auth list
cf auth login
cf auth create work
cf auth activate work
cf auth deactivate- Use
--profile <name>when the user identifies a profile explicitly. cf auth activate <name> [dir]binds a profile to a directory; this changes local configuration, so do it only when requested.- Do not display stored configuration files or credential material to diagnose authentication.
Account And Zone Context
Inspect context with:
cf context showAccount resolution prioritizes CLOUDFLARE_ACCOUNT_ID, project .cfrc, user configuration, then interactive or single-account selection. Zone resolution prioritizes --zone, CLOUDFLARE_ZONE_ID, project .cfrc, then user configuration.
Set persistent defaults only when requested:
cf context set account-id <account-id>
cf context set zone example.com --project
cf context clear zone --project--projectwrites to the project's.cfrc; without it, context is stored in user configuration.- Prefer an explicit
--zone <zone-id-or-domain>for a one-off command instead of changing persistent context. - Re-run
cf context showafter changing defaults.
Output And Errors
- Resource command output is JSON on stdout. Parse it directly or use
jqfor filtering. - Status messages and errors are written to stderr.
- A non-zero exit status indicates failure; do not infer success from partial output.
- Use
--quietonly when suppressed context and status information is safe for the task. - On HTTP 401 errors, check
cf auth whoami, profile selection, and required token permissions without exposing credentials.
Local Resources
--local routes supported commands to the Local Explorer API exposed by a running wrangler dev or cf dev Miniflare session.
cf <command-path> --local --local-endpoint http://localhost:8787- Confirm support using the command's current help and product context.
- Supply
--local-endpointwhen required by the installed version; do not assume auto-discovery is available. - Make the local-versus-remote target explicit before every write. Never remove
--localor substitute a remote operation silently.
Troubleshooting
- Unknown command: refresh with
cf --help,cf agent-context --list, and the relevant product context. - Unknown option: use the exact command's
--help; preview flags may have changed. - Missing request field: inspect
cf schema <command-path>and use--body '<json>'when the command supports a complex raw JSON body. - Wrong account or zone: run
cf context showand inspect explicit profile or zone overrides. - Local connection failure: confirm the development server is running and verify
--local-endpoint. - Product behavior or permission uncertainty: consult the corresponding Cloudflare developer and API documentation before executing.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

