Skip to content

Add automatic Cloudflare skills installation for AI coding agents#13897

Draft
dario-piotrowicz wants to merge 2 commits into
mainfrom
dario/DEVX-2607/wrangler-install-cloudflare-skills-rosie
Draft

Add automatic Cloudflare skills installation for AI coding agents#13897
dario-piotrowicz wants to merge 2 commits into
mainfrom
dario/DEVX-2607/wrangler-install-cloudflare-skills-rosie

Conversation

@dario-piotrowicz
Copy link
Copy Markdown
Member

Fixes https://jira.cfdata.org/browse/DEVX-2607

Wrangler now detects AI coding agent configuration directories (e.g. Claude Code, Cursor, Cline, Gemini CLI, OpenCode) and offers to install Cloudflare skill files from the cloudflare/skills GitHub repository. Users are prompted once interactively; subsequent runs skip the prompt. Use --experimental-force-skills-install (alias --x-force-skills-install) to install without prompting.


  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
    • Additional testing not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: self-explanatory UX improvement

A picture of a cute animal (not mandatory, but encouraged)

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 12, 2026

🦋 Changeset detected

Latest commit: 4fe5db0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
wrangler Minor
@cloudflare/vite-plugin Major
@cloudflare/vitest-pool-workers Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 12, 2026

✅ All changesets look good

Copy link
Copy Markdown
Contributor

@ask-bonk ask-bonk Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm Bonk, and I've done a quick review of your PR.

This PR adds automatic detection of AI coding agents and offers to install Cloudflare skill files via the rosie-skills library. The logic is integrated into every command's handler in register-yargs-command.ts.

Issues

1. CI check happens after getDetectedAgents() — wasted WASM/IO in CI

The ci.isCI guard at line 52 runs after getDetectedAgents() at line 46, which does await import("rosie-skills") (WASM load) and await rosie.agents() (filesystem scans). In CI environments this work is thrown away. The CI check should be moved before agent detection to avoid adding latency to every CI run.

2. --experimental-force-skills-install doesn't bypass the CI check

The force flag bypasses the metadata-file check (line 42) and the isInteractive() check (line 58), but the ci.isCI check at line 52 has no force bypass. So --experimental-force-skills-install silently does nothing in CI. If a user is explicitly requesting forced install, this should work in CI too — that's the expected semantic of a --force flag.

Comment thread packages/wrangler/src/agents-skills-install.ts Outdated
@ask-bonk
Copy link
Copy Markdown
Contributor

ask-bonk Bot commented May 12, 2026

Review posted successfully. Here's a summary of what I found:

Two issues identified on PR #13897:

  1. CI check ordering (performance): ci.isCI is checked at line 52 of agents-skills-install.ts, but getDetectedAgents() (which loads rosie WASM and scans the filesystem) runs at line 46 — before the CI check. This adds unnecessary latency to every CI invocation. The CI check should be moved before agent detection.

  2. --experimental-force-skills-install silently fails in CI (logic bug): The force flag bypasses the metadata-file check and the isInteractive() check, but the ci.isCI check at line 52 has no force bypass. So explicitly requesting --experimental-force-skills-install in CI does nothing — which contradicts the semantic of a force flag.

I posted a concrete suggestion that fixes both issues by reordering the checks and adding && !force to the CI guard.

github run

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 12, 2026

create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@13897

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@13897

miniflare

npm i https://pkg.pr.new/miniflare@13897

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@13897

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@13897

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@13897

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@13897

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@13897

@cloudflare/workers-utils

npm i https://pkg.pr.new/@cloudflare/workers-utils@13897

wrangler

npm i https://pkg.pr.new/wrangler@13897

commit: 4fe5db0

@dario-piotrowicz dario-piotrowicz force-pushed the dario/DEVX-2607/wrangler-install-cloudflare-skills-rosie branch 5 times, most recently from c4570f1 to a8d3501 Compare May 13, 2026 10:57
@dario-piotrowicz dario-piotrowicz force-pushed the dario/DEVX-2607/wrangler-install-cloudflare-skills-rosie branch from a8d3501 to c0619ec Compare May 13, 2026 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Untriaged

Development

Successfully merging this pull request may close these issues.

2 participants