denizbarish/claudeflare/cf-devices
Claude Code and agent skill by denizbarish/claudeflare
- community
Checking that the SKILL.md file is still in the repository.
Cloudflare WARP device settings checklist for one account. The default and custom device profiles, split tunnel include and exclude lists, local domain fallback, device posture rules, and how to roll WARP out with an MDM file. Load it when changing split tunnels or a device profile, locking the WARP switch, adding or deleting a posture rule, auditing WARP, diagnosing WARP clients that cannot reach private routes, or deploying WARP. Load cf-core first.
Install
npx vskill@latest install denizbarish/claudeflare/cf-devicesSKILL.md
The same SKILL.md was published earlier as denizbarish/claudeflare/cf-devices.
cf-devices: device profiles, split tunnels, posture
Load cf-core first. Findings use the cf-audit finding format and severity scale. Device settings live on the account: plans use "scope": "account", hold only REST ops (no project_dir needed) and use /accounts/{account_id}/devices/.... In the MCP examples below, replace ACCOUNT_ID (32 hex characters) and PROFILE_ID and POSTURE_ID (UUIDs) with real values from cf-core discovery and the reads; the guard needs literal paths.
WARP settings need a Zero Trust organization. The API cannot create one: if GET /accounts/{account_id}/access/organizations fails, preflight reports not_entitled and the user creates the organization in the Zero Trust dashboard (the Free plan is enough).
claudeflare never touches devices: it changes the account's device settings, and the WARP clients pick them up. Installing and enrolling WARP is a step outside the API (Deploying WARP to devices).
Read current state
| What | Source | |
|---|---|---|
Default profile (switch_locked, allowed_to_leave, allow_mode_switch, auto_connect, service_mode_v2, include or exclude, fallback_domains) | GET /accounts/{account_id}/devices/policy | |
Custom profiles (policy_id, name, match, precedence, enabled, the same settings) | GET /accounts/{account_id}/devices/policies | |
| Split tunnel and fallback lists of one profile | GET /accounts/{account_id}/devices/policy/{policy_id}/include, .../exclude, .../fallback_domains (the default profile: /devices/policy/include and so on) | |
Posture rules (id, name, type, match, input) | GET /accounts/{account_id}/devices/posture | |
Global device settings (disable_for_time: admin override codes are on when it is above 0) | GET /accounts/{account_id}/devices/settings | |
Access policies that require posture (device_posture.integration_uid in include, require or exclude) | GET /accounts/{account_id}/access/policies and the policies of each app in GET /accounts/{account_id}/access/apps | |
Team domain (auth_domain) and identity providers (their login hosts) | GET /accounts/{account_id}/access/organizations, GET /accounts/{account_id}/access/identity_providers |
Split tunnel mode: a profile in exclude mode (the default) sends everything through WARP except its exclude entries; a profile in include mode sends only its include entries. Each entry is { "address": "<cidr>" } or { "host": "<domain>" } with an optional description. Custom profiles apply to devices whose user or device matches match, lowest precedence first; every other device uses the default profile.
MCP execute:
Fallback: claudeflare get /accounts/ACCOUNT_ID/devices/policies. Collections page with page and per_page; read every page of Access policies before concluding that a posture rule is unused.
Checks
| finding id | condition | severity | recommended | plan tier | |
|---|---|---|---|---|---|
devices.switch.unlocked_with_posture | A profile has switch_locked: false while Access policies require device posture: users can turn WARP off and then fail the posture check, or reach apps that only Gateway filtering protects. | medium | Lock the switch, with admin override codes on (disable_for_time above 0) | free | |
devices.exclude.no_local_networks | A profile in exclude mode whose exclude list lacks the private ranges 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16: local printers, NAS and the home router become unreachable while WARP is on. | low | Add the private ranges back (keep any that hold private routes behind a tunnel out) | free | |
devices.profile.unused | A custom profile with enabled: false, or whose match equals the match of a profile with a lower precedence, so it never applies. | low | Delete it, or fix its match | free | |
devices.posture.unused | A posture rule whose id no Access policy (device_posture.integration_uid) and no Gateway rule (device_posture) mentions. | low | Delete it, or use it in a policy | free |
Notes for findings:
devices.switch.unlocked_with_posture:fixis a PATCH of the profile with{ "switch_locked": true }. Without admin override codes the plan gets aLockout risk:line; tell the user to turn the codes on first (dashboard: Settings, WARP Client, Admin override).devices.exclude.no_local_networks:fixis a PUT of the wholeexcludelist: the current entries plus the missing ranges. Do not add a range that a private route (cf-tunnel) uses.devices.profile.unused:fixis a DELETE of the profile withconfirm_name=name.devices.posture.unused:fixis a DELETE withconfirm_name=name. Gateway rules are not scanned by preflight; read them (cf-gateway) before proposing the delete.
Applying changes
Use the change protocol from cf-core: draft, claudeflare preflight --file draft.json, claudeflare plan new --file draft.json, user approval, claudeflare apply <id>. Show the plan's Lockout risk: lines and notes to the user before approval; they are part of what the user approves. Lists are written whole with PUT: read the list first and send every entry that should stay.
| Op | Path (under /accounts/ACCOUNT_ID) | Rollback | |
|---|---|---|---|
| Default profile | PATCH /devices/policy | PATCHes back the keys the op set; a mode change switches back with the saved list | |
| Custom profile create, update, delete | POST /devices/policy, PATCH or DELETE /devices/policy/PROFILE_ID (delete takes confirm_name = name) | Delete by policy_id; PATCH back; re-create with a new id, then PUT its saved include, exclude and fallback lists to the new id | |
| Split tunnel include or exclude | PUT /devices/policy/include or /devices/policy/exclude (default profile), /devices/policy/PROFILE_ID/include or .../exclude | PUT of the saved list | |
| Local domain fallback | PUT /devices/policy/fallback_domains or /devices/policy/PROFILE_ID/fallback_domains, entries { "suffix": "corp.example.com", "dns_server": ["192.0.2.53"] } | PUT of the saved list | |
| Posture rule create, update, delete | POST /devices/posture, PUT or DELETE /devices/posture/POSTURE_ID (confirm_name = name) | Delete; PUT the old rule; re-create with a new id |
The split tunnel mode changes with a profile PATCH whose body holds include (switch to include mode) or exclude (switch to exclude mode) with the full list. The profile delete rollback runs as one group (profile:<old id>): its list PUTs name the new profile as {created_id} and get the id from the re-create at apply time; if the profile changed after apply, the whole group is skipped with rollback_drift.
Refused at plan new (invalid_op): a profile body with both include and exclude, split tunnel entries without exactly one of address or host, fallback entries without suffix, fallback_domains inside a profile body (use the PUT), Cloudflare-set fields (policy_id, default, gateway_unique_id), a non-boolean switch_locked, a profile create without name, match or an integer precedence, a list PUT whose body is not an array, a posture rule without name or type. Refused at plan new (plan_conflict): a mode change after a PUT of the same profile's include or exclude list (the switch resets the lists, so put the mode change first), and a profile delete together with any write to that profile's lists. Refused at preflight (resource_in_use): a posture rule delete while an Access policy references it; preflight checks this itself and does not rely on the API. Not available as ops: device unenroll and revoke, registration deletes, and devices/settings writes.
Add a private network to split tunnels (the usual request)
In exclude mode a private range reaches WARP by leaving it out of exclude: read the current list and send it back without the range (here 198.51.100.0/24 was removed). In include mode, PUT include with the range added.
Lockout risk lines
These never refuse a plan; they are shown at plan new and checked again at apply (a new line stops apply with risk_changed):
- A split tunnel mode switch. Switching resets the old mode's list to its defaults, and devices route by the new list at once. The line suggests adding the list PUT after the mode change when the PATCH does not hold every entry.
- Include mode whose include list lacks the Zero Trust hosts: the team domain (
<team>.cloudflareaccess.com) and the identity provider login hosts. A PUT of the include list of a profile in exclude mode is checked too, because the API may switch the mode with it. switch_locked: truewhile admin override codes are off (disable_for_timeis 0 indevices/settings): users cannot turn WARP off when it breaks their connection.- An exclude list that takes the team domain,
cloudflareaccess.comor an identity provider host out of WARP while Access policies require device posture: logins bypass WARP, the posture check fails and users are denied.
When a line appears, run the rollback from a machine that does not use the changed profile, so a broken WARP connection cannot keep you from the API.
Verification
After apply claudeflare reads each changed profile, list and posture rule back and compares it with the sent body; profile lists are compared against the profile field or the list endpoints. The read-back detail ends with check on one enrolled device of this profile with warp-cli settings and the note that device behavior is only verified on a device: the API accepting a setting does not prove that a client has picked it up. A failed check sets applied_verify_failed and drafts a rollback plan that still needs approval.
Deploying WARP to devices
Explain the steps by default. Write a file into the user's project only when the user asks; that is a normal file edit outside claudeflare apply, since it changes no Cloudflare state.
Steps:
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/cf-devices/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/denizbarish/claudeflare/cf-devices)