iamantoniodinuzzo/claude-flutter/force-update-init

Claude Code and agent skill by iamantoniodinuzzo/claude-flutter

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Bootstrap force update in a Flutter app using force_update_helper — installs deps, patches AndroidManifest.xml for url_launcher, wires ForceUpdateWidget into MaterialApp.builder (or GoRouter), sets up a remote required_version source (GitHub Gist, Firebase Remote Config, or a scaffolded Dart Shelf backend), handles non-store distribution (Firebase App Distribution, TestFlight, enterprise, POC), and audits an existing setup for the two silent failure modes — missing APP_STORE_ID and a missing Android <queries> intent. Use when the user says \"aggiungi force update\", \"add force update\", \"blocca le vecchie versioni\", \"force gli utenti ad aggiornare\", \"require a minimum app version\", \"block outdated app versions\", or asks to set up a mandatory update prompt.

Install

npx vskill@latest install iamantoniodinuzzo/claude-flutter/force-update-init

SKILL.md

The same SKILL.md was published earlier as iamantoniodinuzzo/claude-flutter/force-update-init.

force-update-init

Runtime and resources

Use the current agent's native file, search, shell, and question tools; plain-text questions and direct sequential scans are valid fallbacks. Subagents are optional and require host permission. Bundled paths below are relative to this installed skill directory; application paths are relative to the target Flutter project. Resolve sibling skills through the installed skill registry (or sibling directories), never by assuming a skills/ folder in the application. If a required dependency is absent, name it and report the affected step as unavailable; never invent its rules or claim complete coverage.

Bootstraps force update in an existing Flutter project using the force_update_helper package (course shape: Andrea Bizzotto, Flutter in Production). Run phases in order; the skill first classifies the project as INIT (nothing wired yet) or AUDIT (partial/complete setup already present) and follows the matching branch below.

Force update must ship in the very first version of an app or it can never reach users already on an older one — there is no way to retroactively add the check to installs that predate it.

Before coding anything, load the bundled references in parallel:

  • references/remote-sources.md
  • references/store-urls-and-env.md
  • references/release-playbook.md

Version baseline cited below (force_update_helper: 0.3.0) is the latest published on pub.dev at the time this skill was written (2025-11-04) — verify current latest before pinning. The package itself has been dormant since that release; state this plainly to the user rather than implying active maintenance. It supports Android and iOS only — isAppUpdateRequired() and storeUrl() hard-return false/null on every other platform, so force update simply does not apply to a web or desktop target.

If the target already has upgrader installed instead, do not run this skill alongside it — upgrader shows an alert on every new store version with no remote control; state the tradeoff (see references/remote-sources.md "upgrader vs force_update_helper") and let the user choose whether to migrate. The AUDIT branch below detects this case.


Phase 0 — Intake & detection

Goal: know the project's actual state before asking a single question or touching a file.

0.1 Melos workspace detection

Grep root pubspec.yaml for workspace: (pub workspaces) or check for melos.yaml.

  • Monorepo detected: parse melos.yaml packages: globs to find candidate app packages. If more than

one plausible target exists, ask which package. Resolve every subsequent path (pubspec.yaml, lib/main.dart, android/app/src/main/AndroidManifest.xml, dart_defines.json) relative to that package, not the repo root. This mirrors sentry-init 0.1 — detect and adapt, never block.

  • Single-app: target root is the project root.
0.2 INIT vs AUDIT classification

Grep the target for, recording found/missing:

SignalWhere
force_update_helperpubspec.yaml
upgraderpubspec.yaml
ForceUpdateWidget(lib/
ForceUpdateClient(lib/
<queries> intent blockandroid/app/src/main/AndroidManifest.xml
  • No `force_update_helper` and no `upgrader` signal → INIT branch (Phase 1 onward).
  • Any signal found → AUDIT branch — jump to AUDIT branch

below.

Print the detection matrix either way before proceeding.

0.3 Distribution channel (INIT branch)

Ask, with the agent's question tool, or a plain-text question if available:

How is this app distributed?
1. App Store + Play Store (default) — both platforms go through their public stores.
2. One store only — e.g. Android via Play Store, iOS side-loaded/enterprise, or vice versa.
3. Non-store — Firebase App Distribution, TestFlight-only, enterprise/internal distribution, or a POC
with no public store listing yet.

Record as DISTRIBUTION (both | android-only | ios-only | non-store). This gates Phase 6 — the non-store branch only runs when DISTRIBUTION=non-store. android-only/ios-only still run the normal store path for the covered platform; force_update_helper already no-ops the uncovered one.

0.4 Remote source — detect and propose

Grep pubspec.yaml and lib/ for signals, then propose (don't just ask blind):

SignalProposed sourceRationale
firebase_core in pubspecFirebase Remote ConfigApp already pays the Firebase SDK cost; centralized console control
dio in pubspec + an existing API client pattern in lib/Custom backend (Dart Shelf)App already has backend infrastructure to extend
NeitherGitHub GistNo backend, no Firebase SDK — fastest path to something working

Print the proposal and rationale, ask for confirmation or an override. Record as REMOTE_SOURCE (gist | remote_config | backend). See references/remote-sources.md for the full tradeoffs (rate limits, throttling, deployment) to cite if the user asks why.

0.5 Flavor detection

Grep for lib/env/flavor.dart (or equivalent) and parse the actual enum Flavor { ... } arms found — do not assume dev/stg/prod exist; read what's really there. A project may have no flavors, one, or a custom set.

  • No `Flavor` enum found → single unflavored app. Skip the rest of this section; REMOTE_SOURCE

resolves to one value, no switch.

  • `Flavor` enum found → list the actual arms, then ask which of them should get a live

required_version (i.e. actually enforce updates) versus a harmless floor value (e.g. 0.0.1, which can never trigger an update — needed so the generated switch compiles for every arm without forcing updates on flavors that don't want them).

Default proposal, stated explicitly rather than silently applied: only the arm that looks like production gets a live value; every other arm gets the floor. This matches the course's own position — "force update only really applies to the production environment" — for REMOTE_SOURCE=remote_config specifically, and generalizes cleanly to the other two sources.

Record FLAVOR_ARMS (full list) and LIVE_FLAVORS (subset getting a real value).

0.6 APP_STORE_ID delivery — ADR 0001 convention

Only relevant when DISTRIBUTION includes iOS (both or ios-only) — for android-only or non-store, skip to 0.7.

Per docs/adr/0001-sentry-init-dsn-source-convention.md, this toolkit's convention for a compile-time constant is dart_defines.json + --dart-define-from-file, read as const String.fromEnvironment(...). force-update-init is a consumer of that convention, not an owner — sentry-init remains the skill that scaffolds dart_defines.json when nothing exists yet.

Detect, in the same priority order sentry-init uses for SENTRY_DSN (SKILL.md 0.5):

  1. dart_defines.json / dart_defines.json.example already present → propose key APP_STORE_ID in the

same file.

  1. --dart-define=APP_STORE_ID=... (or a project-specific key) already embedded in .vscode/launch.json

or a Makefile → detect and adapt: propose adding APP_STORE_ID alongside the existing defines in that same file, not a competing mechanism.

  1. .env / .env.<flavor> + an Env class already present (the course's own shape) → detect and adapt:

propose Env.appStoreId reading String.fromEnvironment('APP_STORE_ID'), added to the existing class and files.

  1. None of the above present → default to dart_defines.json (same default sentry-init uses),

scaffolding it only if this skill is the first to need it in this project. If sentry-init has already scaffolded it (grep for the file), add the key to it rather than creating a second file.

Confirm the mechanism and record as APP_STORE_ID_DART_EXPR (mirrors sentry-init's DSN_DART_EXPR). State plainly: `APP_STORE_ID` is not sensitive (the course notes this — it's fine to see in a diff), but it is per-project and must never be copy-pasted from another app's config.

0.7 allowCancel

Ask: should the update prompt be dismissible ("Later" button) or fully blocking? Default false (hard block) — state the tradeoff: true is friendlier but the course's production use case (security fixes, retired endpoints) usually wants false. Record as ALLOW_CANCEL.

0.8 Router shape

Grep for MaterialApp.router( vs MaterialApp( with onGenerateRoute/routes, and for GoRouter(. Record ROUTER_SHAPE (material_app | gorouter) — determines which navigatorKey wiring Phase 4 uses.

0.9 Existing plumbing

Grep for:

  • class ErrorLogger / errorLoggerProvider / class LoggerService (from a prior sentry-init run) →

record HAS_ERROR_LOGGER and the matching provider name.

  • A dialog helper matching the shape `showAlertDialog({required BuildContext context, required String

title, ...}) → record DIALOG_HELPER (found path, or none`).

Phase 0 summary

Print before proceeding:

✓ Target: <package>
✓ Branch: INIT
✓ Distribution: <both|android-only|ios-only|non-store>
✓ Remote source: <gist|remote_config|backend> (<detected reason>)
✓ Flavors: <list, or "none"> — live: <subset>
✓ APP_STORE_ID via: <dart_defines.json|.env+Env>
✓ allowCancel: <true|false>
✓ Router: <MaterialApp.builder|GoRouter>
✓ Existing error sink: <found <name>|not found — will scaffold minimal>
✓ Dialog helper: <found <path>|not found — will scaffold>

Ask the user to confirm before proceeding.


Phase 1 — Safety gate

Run git status --porcelain in the target project. If not empty, stop:

✗ Working tree is not clean.
force-update-init patches AndroidManifest.xml, main.dart (or the router file), and pubspec.yaml.
Without a clean commit, a bad run cannot be safely rolled back with:
git reset --hard HEAD && git clean -fd
Commit or stash your changes, then re-run this skill.

If clean, print the rollback command anyway, then proceed.


Phase 2 — Dependencies

2.1 package_info_plus conflict pre-check (blocking)

Published force_update_helper: 0.3.0 constrains package_info_plus: ^9.0.0. Grep the target's pubspec.yaml/pubspec.lock for an existing package_info_plus constraint.

  • None, or compatible with `^9.0.0` → proceed normally.
  • Already on `package_info_plus: ^10.x` or higher → stop and present the conflict, do not silently

pick a resolution:

``` ✗ package_info_plus conflict: this project already depends on ^10.x, but force_update_helper 0.3.0 constrains package_info_plus: ^9.0.0. Options:

  1. Pin this project's package_info_plus back to ^9.0.0 (may affect other code using 10.x-only APIs)
  2. Add a dependency_override for package_info_plus
  3. Depend on force_update_helper via git (main branch has moved to ^10.1.0, unreleased)

```

Ask which option, apply only that one.

2.2 Install
bash
flutter pub add force_update_helper
flutter pub add url_launcher
flutter pub add package_info_plus # only if not already present

For monorepo: prefix with melos exec --scope=<pkg> -- .

Conditional, per REMOTE_SOURCE:

REMOTE_SOURCEAdditional command
gistflutter pub add dio (if not already present)
remote_configflutter pub add firebase_remote_config
backendflutter pub add dio (if not already present)

Phase 3 — Platform config

3.1 Android <queries> intent

Required for url_launcher to open the store URL. Check android/app/src/main/AndroidManifest.xml for an existing <queries> block; if present with a matching VIEW/BROWSABLE/https intent, skip. Otherwise add, inside <manifest>, as a sibling of <application>:

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
5

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/iamantoniodinuzzo/claude-flutter/force-update-init/badge)](https://verified-skill.com/skills/iamantoniodinuzzo/claude-flutter/force-update-init)

Something wrong with this skill or its page? Tell us.