Commit Graph

156 Commits

Author SHA1 Message Date
Brendan Irvine-Broque e16d698f6b Merge pull request #65 from grstnhbr/abe/cf1-zpa-migration-feedback
docs: ZPA migration field feedback for cloudflare-one-migrations skill
2026-06-14 15:44:48 -07:00
aj e638d8c1be docs: expand cloudflare-one skills with field feedback and missing coverage
cloudflare-one-migrations skill:
- Incorporate 7 items from SE field testing of ZPA migration workflow
- Tunnel creation for all connector groups regardless of runtime status
- Connector instance to cloudflared replica mapping guidance
- CIDR/hostname route derivation from app segments via server groups
- Access app hostname limit and account team escalation path
- Reusable Access policies and Gateway Network ordering rule
- IP anchoring egress decision gate and bypass-to-split-tunnel mapping
- Terminology updates (WARP -> device client, add Mesh)

cloudflare-one skill:
- Add Device Client Deployment section: enrollment architecture, profile
  targeting, split tunnel mode decision table by deployment goal, include
  vs exclude per-profile constraint, bidirectional route alignment, MDM
  override behavior, VPN coexistence, captive portal behavior
- Add Infrastructure Access section: ZTIA for SSH with device client,
  clientless Browser Rendering for SSH/RDP/VNC, Audit SSH, short-lived
  certificates
- Add Logs, Analytics, and DEX section: Gateway/Access logs, Shadow IT
  discovery, DEX tests and fleet status, Logpush, troubleshooting workflow
- Terminology and accuracy updates throughout
2026-06-14 14:33:46 -05:00
Sunil Pai 12520fd63a Merge pull request #59 from akshitsinha/asinha/flagship-abn-testing-docs
docs(flagship): update API envelope docs and add A/B/n rollout pattern
2026-06-11 17:14:19 +01:00
Akshit Sinha d02289b28a fix: remove app-scoped token reference 2026-06-11 12:08:57 +05:30
Rohan Mukherjee cd5fc33689 docs(flagship): address review follow-ups 2026-06-11 10:41:46 +05:30
Rohan Mukherjee 0064cc99ec docs(flagship): address rollout review feedback 2026-06-11 01:03:52 +05:30
Akshit Sinha faad285794 feat: migrate to new CF style API envelope 2026-06-09 13:24:25 +05:30
Sunil Pai c5b7b06b07 Merge pull request #60 from MohamedH1998/fix/remove-colon-from-frontmatter
fix: remove colon from frontmatter
2026-06-05 12:19:50 +01:00
mohamedh 1d0f727f7a fix: remove colon from frontmatter 2026-06-05 12:14:13 +01:00
Jules 7548066a64 Add Turnstile Spin skill (#58)
* Add Turnstile Spin skill

Adds an agent skill at skills/turnstile-spin/ that scaffolds Cloudflare Turnstile end-to-end: scan the codebase, create the widget via the Cloudflare API, deploy the managed siteverify Worker (template bundled at skills/turnstile-spin/templates/worker/), write the frontend snippets, and validate the integration.

Every emitted widget carries action='turnstile-spin-v1' for analytics segmentation.

Mirrors developers.cloudflare.com/turnstile/spin/.

* Refactor turnstile-spin skill: extract deterministic logic to scripts/

Per maintainer feedback (cf https://github.com/cloudflare/skills/pull/58),
SKILL.md is now a thin orchestration layer (~160 LoC, down from ~500)
and the deterministic API calls + retry logic live in 6 helper scripts:

- scripts/auth-probe.sh: token + scope + account-mismatch detection
- scripts/widget-create.sh: Cloudflare API widget creation
- scripts/worker-deploy.sh: degit + wrangler deploy + secret put + retry on name conflict
- scripts/validate.sh: health + dummy-siteverify + hostname-domains end-to-end checks
- scripts/persist-skill.sh: fetch canonical SKILL.md with HTTP 200 + frontmatter validation
- scripts/fetch-secret.sh: recovery-flow secret retrieval via API

Each script outputs structured JSON; the agent branches on the status field
instead of parsing prose. The conversational flow, hard scope boundaries,
recovery decision tree, and CAPTCHA-migration logic remain in SKILL.md
since those are agent-behavior policy, not API mechanics.

* fix(turnstile-spin): multi-account auth probe, Workers scope check, set_secret failure handling

- auth-probe.sh now handles multi-account tokens: emits multiple_accounts
  when >1 accounts and CLOUDFLARE_ACCOUNT_ID is unset, checks membership
  (not [0] equality) when the env var is set
- auth-probe.sh probes GET /workers/scripts after GET /challenges/widgets
  so a token missing Account.Workers Scripts:Edit fails before the agent
  creates a widget (irreversible) and then tries to deploy
- worker-deploy.sh makes set_secret failure fatal: previously the script
  could emit status:ok with the Worker deployed but TURNSTILE_SECRET_KEY
  unset
- SKILL.md Step 3 documents the new statuses (multiple_accounts,
  missing_workers_scope) and the re-run loop after the user picks an
  account
- SKILL.md Step 9 documents the set_secret_failed recovery path

* fix(turnstile-spin): capture both stdout and stderr in worker-deploy

Wrangler emits the deployed Worker URL on stdout (progress indicators on
stderr). The script captured only stderr and then grepped that file for
the URL, so successful deploys could still emit url_parse_failed.
Capture both streams.

* fix(turnstile-spin): comprehensive sweep before reviewer round 3

Addresses 14 issues found in an internal adversarial review:

Scripts:
- auth-probe.sh: reword Workers scope comment (best-effort proxy,
  not a guarantee that Read implies Edit).
- worker-deploy.sh: URL parser falls back from workers.dev regex
  to a broader match for custom domains and Workers for Platforms.
  set_secret failure now captures wrangler stderr into a temp file
  and includes a detail field in the error JSON instead of
  swallowing the diagnostic.
- fetch-secret.sh: emit clearance_level and domains so the recovery
  flow's pre-clearance check is implementable. Without these the
  contract was documentation theatre.
- validate.sh: hit /health (not /); the diagnostic was lying about
  the path. Also assert _worker metadata is present in the dummy
  siteverify response (Step 7b promised this; the script never
  checked).
- persist-skill.sh: install canonical bundle (SKILL.md + scripts/ +
  references/ + templates/) via degit from cloudflare/skills
  instead of writing the inlined bootstrap index.md. Persisted
  skills now re-run without the /tmp/ bootstrap path.

SKILL.md:
- Recovery flow uses fetch-secret.sh's new clearance_level and
  domains fields. Drops the ?widget=<id> URL trigger (nothing
  parsed it; it was documentation theatre). Recovery is now
  invoked verbally.
- Edge case table replaces $WORKER_NAME env var references with
  the worker_name field returned by worker-deploy.sh.
- Adds explicit set_secret_failed recovery row.

Worker template:
- parseBody accepts the reCAPTCHA-style `response` field name
  alongside `token` and `cf-turnstile-response`, so backends
  migrated from reCAPTCHA/hCaptcha work without backend code
  changes (drop the secret field, keep the rest).

* fix(turnstile-spin): match docs on suffix entropy + scope parallel-work hint

- worker-deploy.sh now uses openssl rand -hex 3 for the
  name-conflict retry suffix, falling back to the previous date
  tail if openssl is absent. The docs prose already called this a
  hash; the script body now matches.
- SKILL.md Step 3's parallel-work hint is conditional on option 3
  (paste in chat). Options 1 and 2 restart the session and lose any
  pre-fetched scan state, so the agent no longer pre-fetches in
  those cases.

---------

Co-authored-by: jules lemee <jules@cloudflare.com>
2026-06-04 16:07:07 -04:00
Akshit Sinha 3f87f2cf28 docs(flagship): add A/B/n multi-variant testing pattern with cumulative rollout example 2026-06-04 14:57:04 +05:30
Brendan Irvine-Broque 3e79cd0f3e Apply suggestion from @irvinebroque 2026-06-01 09:46:05 -04:00
Brendan Irvine-Broque 93e37d5fb9 docs: inline Cloudflare One source links 2026-06-01 09:43:49 -04:00
Brendan Irvine-Broque cbce9de368 docs: link Cloudflare One source docs 2026-06-01 09:40:11 -04:00
Brendan Irvine-Broque 8a0e1a979c docs: add Cloudflare One assessment prompts 2026-06-01 09:32:32 -04:00
Brendan Irvine-Broque 8726ac1270 Apply suggestions from code review
Co-authored-by: Brendan Irvine-Broque <brendanib@gmail.com>
2026-06-01 09:26:43 -04:00
Brendan Irvine-Broque 0591a93179 Apply suggestion from @irvinebroque 2026-06-01 09:24:48 -04:00
Brendan Irvine-Broque 3ec8616c15 refactor: consolidate Cloudflare One skills 2026-06-01 09:19:43 -04:00
abelinkinbio ff2a3aa852 feat: add CF1 Stack skills for Cloudflare One (21 skills)
Add 21 Cloudflare One deployment, migration, and operations skills
covering Gateway (SWG), Access (ZTNA), Tunnels, WAN, Device Posture,
CASB, DLP, Risk Scoring, Architecture Design, and vendor migration
(Zscaler ZIA/ZPA, Palo Alto).

Each skill follows the CF1 Lifecycle (Assess → Design → Implement →
Validate → Operate) and includes both MCP-automated and manual
(Dashboard/API) implementation paths.

Source: https://gitlab.cfdata.org/fmeszaro/cf1stack
2026-06-01 13:40:43 +01:00
Hrushikesh Deshpande 60147cbb77 ci: add Semgrep OSS scanning workflow (#46) 2026-05-04 06:50:16 -04:00
Rohan Mukherjee 7c449def4e Add Flagship (feature flags) skill reference (#47)
* Add Flagship feature flags skill to cloudflare mega-skill

Add reference files for Cloudflare Flagship (feature flag service) under
skills/cloudflare/references/flagship/ following the standard 5-file
structure (README, api, configuration, patterns, gotchas).

Covers:
- Binding API for Workers (env.FLAGS)
- OpenFeature SDK (server + client providers)
- REST API for flag management (CRUD, toggle, targeting rules, rollouts)
- FlagDefinition schema, operators, conditions, rate limits
- Progressive rollout workflows and safe deletion patterns

Also updates the cloudflare mega-skill SKILL.md with a feature flags
decision tree and product index entry.

* fix(cloudflare): remove overly specific Flagship details from skill description
2026-04-27 12:22:43 -04:00
Olga Silva 0438a075b4 [workflows] Update Workflows information (#45)
* [workflows] Update Workflows information

* Make skill retrieval biased
2026-04-23 08:58:42 -04:00
Brendan Irvine-Broque 8c01b03b0a More explicitly instruct agents to install and use Wrangler (#40)
Even when using the Wrangler Skill — I'm seeing that agents (Ex: Codex, via the Cloudflare Plugin) will first go off and call the MCP server to understand the shape of the REST API for Workers — and even attempt to deploy code by manually constructing API requests.

It eventually figures out it needs Wrangler — but it should _start_ here and just always use Wrangler.

This change more explicitly guides the agent to use Wrangler.
2026-04-22 14:05:21 -04:00
Matt Silverlock 0397d7d88f fix: fixup cloudflare skill gaps (#43)
* add artifacts cloudflare skill reference

* update artifacts skill for latest docs
2026-04-16 08:56:33 -04:00
Thomas Gauvin 70c9cb7a21 Add cloudflare-email-service skill (#41)
* Update cloudflare-email-service skill to match latest docs

Sync skill with updated Cloudflare Email Service documentation:
- Fix REST API endpoint from /email-service/send to /email/sending/send
- Update REST API field names (address vs email, reply_to vs replyTo)
- Update REST API response format (delivered/permanent_bounces/queued)
- Add public beta notice and known limitations
- Add Legacy EmailMessage API section
- Add ForwardableEmailMessage interface with canBeForwarded
- Add suppression lists documentation (global + account)
- Add platform limits table
- Update error codes (add E_RECIPIENT_NOT_ALLOWED, E_HEADER_VALUE_INVALID)
- Add env.EMAIL.send() as recommended reply method for routing

* Trim skill from 2,739 to ~1,000 lines

- Remove Python, Go, Node.js SDK examples (SDKs not ready), keep curl only
- Cut overlapping examples (invoice processing, D1 tracking, magic link, AI agent)
- Reduce wrangler CLI examples, point to docs and --help
- Condense routing, deliverability, and cli-and-mcp references
- Keep all essential API details, error codes, and gotchas

* Add deliverability monitoring, MCP usage, and inline attachments; consolidate reference files
- Add monitoring section to deliverability.md: dashboard, sending limits,
  suppression list API, zone-level GraphQL analytics (emailSendingAdaptiveGroups,
  emailSendingAdaptive) verified against production schema
- Update cli-and-mcp.md with Cloudflare MCP server search/execute examples
  for email endpoints
- Add inline attachment docs (content_id, disposition: "inline") to rest-api.md
- Fix attachment content handling in sending.md (raw string/ArrayBuffer for
  Workers binding vs base64 for REST API)
- Move error codes table from SKILL.md to sending.md where it belongs
- Add "Store and Reply Later" pattern to routing.md
- Remove examples.md (consolidated into other references)
- Trim SKILL.md: remove duplicated limits, prerequisites, error codes
2026-04-15 15:04:01 -04:00
Sunil Pai 97ce887820 Merge pull request #44 from cloudflare/update-agent-skills
Update Agents SDK skill: full coverage, correct APIs, consolidated commands
2026-04-15 14:13:41 +01:00
Sunil Pai e96fbc77bc Revamp Agents SDK docs and command guidance
Replace legacy building-* guides with a consolidated agents-sdk skill: update SKILL.md to expand capabilities and retrieval links, add multiple new reference pages (client-sdk, configuration, durable-execution, browse-the-web, human-in-the-loop, observability, queue-retries, routing, server-driven-messages, and others), and update command docs (build-agent.md, build-mcp.md) to point to the agents-sdk pages and include scaffold examples. Remove deprecated building-ai-agent-on-cloudflare and building-mcp-server-on-cloudflare content. These changes centralize documentation around the Agents SDK, add scaffold/snippet guidance, and refresh links to the live Cloudflare developer docs.
2026-04-15 08:46:50 +01:00
Dillon Mulroy 54ca4fd800 fix: remove insecure credential handling from wrangler skill (#42)
Address Snyk W007 (HIGH) finding for insecure credential handling.

- Remove `echo "secret-value" | wrangler secret put` pattern; use interactive
  prompt as primary method and file redirect for CI
- Replace hardcoded connection string `postgres://user:pass@...` with env var
  reference `$HYPERDRIVE_CONNECTION_STRING` and individual params
- Replace `--origin-password "new-password"` with `$DB_PASSWORD` env var
- Fix incorrect `--public-credential` flag to actual wrangler flags
  (`--aws-access-key-id`, `--dockerhub-username`) with env var references
- Add security callout blocks in Secrets and Container Registries sections
- Add best practice #9: never embed secrets in commands
2026-04-14 06:49:15 -04:00
Ade Oshineye 5ec03da67e fix: standardize AIChatAgent and useAgentChat import paths (#38)
Fix inconsistent import paths across skills documentation:

- AIChatAgent: 'agents' or 'agents/ai-chat-agent' -> '@cloudflare/ai-chat'

- useAgentChat: 'agents/ai-react' -> '@cloudflare/ai-chat/react'

Aligns with official Cloudflare Agents SDK documentation and resolves

import path inconsistency noted in TODO.md
2026-04-06 10:17:13 -04:00
Ade Oshineye 22a32f5f10 Fix 18 factual errors: pricing, CPU limits, API names, sandbox docs, CLI syntax (#35)
Verified each correction against official Cloudflare documentation.

- KV pricing wrong by 10x, D1 pricing wrong by 1000x
- CPU time limits showed ms instead of seconds across 16 files
- routeAgent misspelled (missing 'Request'), nodejs_compat_v2 standalone usage
- wrangler check described as config validation (actually startup profiling)
- Vectorize batch limit 500 -> 1000, wrangler version v3.91 -> v4
- Sandbox: runCode() API, return types, Docker tags, exec() timeout
- Agent binding name mismatch, multi-agent fetch() -> RPC
- Secrets Store CLI syntax, README missing cloudflare-api MCP server
- web-perf description missing INP, KV reads label misleading
2026-04-01 11:54:14 -04:00
Ade Oshineye ed57ea9dcb Fix factual errors in Workers limits, D1 pricing, Agent wrangler config, and troubleshooting (#34)
A systematic audit found 11 factual errors across 4 files that contradict
live Cloudflare documentation. Every correction is cited to a specific URL.

- gotchas.md: Fix CPU time limits (was 10ms/30ms, now Free:10ms/Paid:30s-5min),
  subrequests (add Free:50 vs Paid:10,000), KV size (25 MB -> 25 MiB),
  env var size (5 MB -> 5 KB per variable)
- building-ai-agent SKILL.md: TOML -> JSONC, new_classes -> new_sqlite_classes
- d1/README.md: Remove fabricated $5/db fee, fix read rate denominator
  ($0.001/1K -> $0.001/1M rows)
- troubleshooting.md: Fix 3 wrangler snippets (TOML+new_classes -> JSONC+new_sqlite_classes)
- examples.md: wrangler.toml -> wrangler.jsonc in directory tree
2026-03-27 09:45:34 -04:00
Matt Silverlock d311303979 add uniform retrieval-bias directives to all skills (#30) 2026-03-03 10:30:51 -05:00
Rian van der Merwe 00eec280fa Add GraphQL Analytics API reference skill (#25)
* Add GraphQL Analytics API reference skill

New reference covering Cloudflare's GraphQL Analytics API — the single
endpoint for querying analytics across all Cloudflare products (HTTP,
Workers, DNS, Firewall, R2, KV, D1, AI, and 70+ other datasets).

New files:
- references/graphql-api/README.md — Overview, decision tree, dataset
  index, naming conventions, reading order
- references/graphql-api/api.md — Query structure, aggregation fields
  (sum/avg/quantiles/count/ratio/uniq/confidence), dimensions, filtering
  operators, pagination, sorting, introspection, settings node
- references/graphql-api/configuration.md — Auth (API tokens), client
  setup (curl, TypeScript, Python, Workers), GraphQL Explorer, schema
  introspection, finding zone/account IDs
- references/graphql-api/patterns.md — 15+ ready-to-use query patterns:
  time-series, top-N, Workers performance, firewall events, DNS, cache
  analytics, R2/KV/D1 storage, AI inference, multi-dataset dashboards
- references/graphql-api/gotchas.md — Rate limits, ABR sampling caveats,
  common errors (with solutions), plan-based availability, datetime
  handling, performance tips

Modified files:
- SKILL.md — Added analytics/metrics decision tree, added GraphQL API
  entry to Developer Tools product index
- analytics-engine/README.md — Added See Also cross-links to graphql-api
  and observability references
- api/README.md — Added See Also cross-link to graphql-api reference
- observability/README.md — Added See Also cross-link to graphql-api
- web-analytics/README.md — Added reciprocal cross-link to graphql-api

Testing:
- Thorough human review (read-through of each file)
- Two comprehensive AI reviews using parallel subagents for factual
  accuracy, completeness, and style — followed by a validation pass that
  filtered false positives. Caught and fixed 8 issues:
  - Settings node query was structurally invalid (missing dataset nesting)
  - R2 query pattern used nonexistent count field (only sum/dimensions/
    confidence exist on r2OperationsAdaptiveGroups)
  - Worker example in configuration.md was missing datetime_lt upper
    bound, contradicting the skill's own best practice
  - Confidence interval example included undocumented isValid field
  - Rate limit described as flat 300/5min; corrected to cost-based
    default 300, max 320
  - Separator convention (-- vs -) mismatched peer references; fixed
    across all 5 files
  - web-analytics/ was missing reciprocal cross-link
  - _notin/_notlike operators initially removed as undocumented, then
    re-added after schema introspection confirmed they exist (with note)
- 20 GraphQL queries executed against a live Cloudflare account covering:
  zone-scoped (HTTP time-series, top-N countries/paths/errors, firewall
  events/blocks, DNS volume, cache breakdown, multi-dataset dashboard,
  confidence intervals, daily rollups with uniq, _like filter, _notin
  filter, aliases) and account-scoped (Workers overview/error-rate with
  quantiles, KV operations, R2 operations, settings node, cost/budget).
  19/20 passed on first attempt; the 1 failure (R2 count) was fixed.

* Trim graphql-api reference files to ~200 lines each per review feedback
2026-02-26 09:30:24 -05:00
Matt Silverlock 6bd8243a7e fix incorrect workflows reference docs (#29)
* fix incorrect workflows reference docs (subrequest limits, event.payload)

* fix stale 1,000 subrequest limit across all reference docs

* add retrieval-over-pretraining guidance to cloudflare skill
2026-02-24 07:42:02 -05:00
Surya ef66413aad Update plugin installation instructions for claude in README.md (#20) 2026-02-24 07:30:42 -05:00
Hiển Đào Vinh bd1838e6d9 chore: Replace unsupported PRAGMA user_version with _sql_schema_migrations table per the official Cloudflare docs (cloudflare/cloudflare-docs#28233) (#27) 2026-02-24 07:29:20 -05:00
Matt 57301e49eb Add cloudflare-api MCP server (#24) 2026-02-20 09:20:21 -05:00
Jason fe4f2e9999 Remove mcp.json (#21) 2026-02-17 09:45:52 -05:00
Matt Silverlock 426c3b406b add workers-best-practices skill (#19)
* add workers-best-practices skill

* address self-review findings

- fix floating promise in streaming concatenation example (contradicted own rules)
- add base URL note for relative Retrieve paths in rules.md
- generalize implements-vs-extends anti-pattern to all platform base classes
- deduplicate review.md anti-pattern table (points to SKILL.md instead)
- expand code categorization step with per-category check guidance
- add CPU time limit awareness rule
- fix vague ~6 months threshold in compat date rule
2026-02-12 15:50:56 -05:00
Sam Sokolin 486fb92891 Fixing up folder structure for cursor plugins (#17)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-11 09:55:31 -05:00
Felipe Ryan 95ef856f13 Minor typo (#18)
In case people copy and paste
2026-02-11 09:55:12 -05:00
Austin Nick Piel de290a47c9 Remove npx & mcp-remote (#16)
* Change MCP structure

* add type
2026-02-08 07:40:35 -05:00
Matt Silverlock 50c7477e4c add sandbox-sdk skill with retrieval-first approach (#14)
Add new sandbox-sdk skill for building secure code execution environments on Cloudflare. The skill follows the retrieval-led reasoning approach from the Vercel agents.md research, biasing agents towards fetching official docs and examples rather than relying on potentially outdated training data.

- Add sandbox-sdk skill with core patterns, wrangler config, and API guidance
- Include references for detailed API signatures and example mappings
- Add retrieval-first section to durable-objects skill with doc URLs
- Update README with sandbox-sdk in skills table

The sandbox-sdk skill covers getSandbox lifecycle, exec vs runCode decisions, file operations, Dockerfile extensions, preview URLs, and anti-patterns.
2026-02-05 09:25:20 -05:00
Matt Silverlock 9858cfae3c Merge branch 'extra-plugin-config' 2026-02-05 08:49:35 -05:00
Matt Silverlock 50ecfd8ebf fix cursor plugin spec compliance
- add required alwaysApply field to workers rule
- change logo to github raw url per spec examples
2026-02-05 08:49:31 -05:00
Matt Silverlock d141c2f9a1 update agents-sdk skill for 0.3.7 (#13)
* update agents-sdk skill for 0.3.7 with retrieval-first guidance

* add installation verification step
2026-02-03 09:38:10 -05:00
Matt Silverlock 05f1367d65 add Cursor plugin manifest and rules 2026-01-31 11:17:26 -05:00
Matt Silverlock 75a603ba75 fix: change owner to author in plugin.json
The "owner" key is not valid in the Claude Code plugin schema.
The correct key for attribution is "author".

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 12:52:58 -05:00
Matt Silverlock 3f725897fc adopt Claude Code plugin structure (#10)
- Move skills to skills/ subdirectory (auto-discovered)
- Remove explicit skills array from plugin.json
- Add .mcp.json with Cloudflare remote MCP servers (docs, observability, builds)
- Update README to document commands, skills, and MCP servers

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 12:13:50 -05:00
Matt Silverlock 1d85de1d97 add marketplace.json and update plugin.json with all skills (#9) 2026-01-28 09:30:00 -05:00