OpenParable
Skip to content
← Back to skills

Update Packages

Development
update-packages

Update Packages is an Agent Skill for development published in the dart-lang/dart-pad repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Updates pinned package dependencies for Dart and Flutter project templates. Use when adding/removing packages from the allowlist or updating dependency versions across Flutter channels (main/beta/stable).

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/dart-lang/dart-pad/blob/HEAD/pkgs/dart_services/.agent/skills/update-packages/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/update-packages, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

Update Packages

Step 1: Update allowlist (if needed)

If adding or removing packages, edit lib/src/project_templates.dart first. This file contains the allowlist of supported packages. Skip this step if only updating versions.

Step 2: Update dependencies for each channel

Run the following for each channel (stable, beta, main):

flutter channel <CHANNEL>
flutter upgrade
dart tool/grind.dart update-pub-dependencies

Step 3: Switch back to stable

flutter channel stable

Step 4: Verify changes

Check git status and git diff to confirm the expected changes to tool/dependencies/pub_dependencies_stable.json, pub_dependencies_beta.json, and pub_dependencies_main.json.