Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .changeset/skills-update-prompt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
"wrangler": minor
---

Add automatic update prompts for out-of-date Cloudflare agent skills

When Cloudflare skills were previously installed by Wrangler and the upstream `cloudflare/skills` repository has newer content, Wrangler now offers to update them after eligible commands complete.

To reduce prompt fatigue, the update check only runs when at least 7 days have elapsed since the last install or update, and only when the upstream changes are significant enough (5+ files changed or 10KB+ size delta). Declining suppresses the prompt until the next upstream change.

To opt out of update prompts entirely, set `"no_skills_update_prompts": true` in your `wrangler.jsonc` or set the `WRANGLER_NO_SKILLS_UPDATE_PROMPTS=true` environment variable. The `--install-skills` flag remains available regardless of this setting.
16 changes: 16 additions & 0 deletions packages/workers-utils/src/config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,21 @@ export interface ConfigFields<Dev extends RawDevConfig> {
*/
send_metrics: boolean | undefined;

/**
* Whether to suppress the prompt that offers to update Cloudflare agent
* skills when they are out of date.
*
* When `true`, Wrangler will not prompt the user to update skills even if
* newer versions are available upstream. The `--install-skills` flag still
* works regardless of this setting.
*
* Can also be controlled via the `WRANGLER_NO_SKILLS_UPDATE_PROMPTS`
* environment variable.
*
* @default false
*/
no_skills_update_prompts: boolean | undefined;

/**
* Configuration for npm package dependency instrumentation.
*
Expand Down Expand Up @@ -338,6 +353,7 @@ export const defaultWranglerConfig: Config = {
/* TOP-LEVEL ONLY FIELDS */
pages_build_output_dir: undefined,
send_metrics: undefined,
no_skills_update_prompts: undefined,
dependencies_instrumentation: undefined,
dev: {
ip: process.platform === "win32" ? "127.0.0.1" : "localhost",
Expand Down
9 changes: 9 additions & 0 deletions packages/workers-utils/src/config/validation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,14 @@ export function normalizeAndValidateConfig(
"boolean"
);

validateOptionalProperty(
diagnostics,
"",
"no_skills_update_prompts",
rawConfig.no_skills_update_prompts,
"boolean"
);

if (
validateOptionalProperty(
diagnostics,
Expand Down Expand Up @@ -526,6 +534,7 @@ export function normalizeAndValidateConfig(
rawConfig.pages_build_output_dir
),
send_metrics: rawConfig.send_metrics,
no_skills_update_prompts: rawConfig.no_skills_update_prompts,
dependencies_instrumentation: rawConfig.dependencies_instrumentation,
keep_vars: rawConfig.keep_vars,
addresses: rawConfig.addresses,
Expand Down
2 changes: 2 additions & 0 deletions packages/workers-utils/src/environment-variables/factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ type VariableNames =
| "WRANGLER_SEND_METRICS"
/** Enable/disable error reporting to Sentry. */
| "WRANGLER_SEND_ERROR_REPORTS"
/** Suppress the prompt that offers to update Cloudflare agent skills. */
| "WRANGLER_NO_SKILLS_UPDATE_PROMPTS"
/** CI branch name (internal use). */
| "WORKERS_CI_BRANCH"
/** CI tag matching configuration (internal use). */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,17 @@ export const getWranglerSendMetricsFromEnv =
variableName: "WRANGLER_SEND_METRICS",
});

/**
* `WRANGLER_NO_SKILLS_UPDATE_PROMPTS` suppresses the prompt that offers to
* update Cloudflare agent skills when they are out of date.
*
* Set to `"true"` to never be prompted for skills updates.
*/
export const getNoSkillsUpdatePromptsFromEnv =
getBooleanEnvironmentVariableFactory({
variableName: "WRANGLER_NO_SKILLS_UPDATE_PROMPTS",
});

/**
* `WRANGLER_SEND_ERROR_REPORTS` controls whether we attempt to send error reports to Sentry.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ describe("normalizeAndValidateConfig()", () => {
bindings: [],
},
send_metrics: undefined,
no_skills_update_prompts: undefined,
dependencies_instrumentation: undefined,
main: undefined,
migrations: [],
Expand Down
Loading
Loading