Skip to content

Instantly share code, notes, and snippets.

@juliooa
Created March 9, 2026 16:35
Show Gist options
  • Select an option

  • Save juliooa/bd7781561a02ebc04f9229ec20f4e1f1 to your computer and use it in GitHub Desktop.

Select an option

Save juliooa/bd7781561a02ebc04f9229ec20f4e1f1 to your computer and use it in GitHub Desktop.
Claude Code skill: Always check pub.dev for latest version before adding Flutter/Dart packages
name description user-invocable
flutter-package
Use this skill whenever adding, installing, or updating a Flutter/Dart package in pubspec.yaml. Always check pub.dev for the latest version before adding any package.
false

Adding Flutter/Dart Packages

IMPORTANT: Before adding ANY Flutter or Dart package to pubspec.yaml, you MUST:

  1. Look up the latest version on pub.dev by fetching: https://pub.dev/packages/{package_name}
  2. Extract the latest stable version from the page
  3. Use that exact version with a caret constraint (e.g., ^1.2.3) in pubspec.yaml

Never guess or use an outdated version. Always verify on pub.dev first.

Example

If adding the package in_app_review:

  1. Fetch https://pub.dev/packages/in_app_review
  2. Find the latest version (e.g., 2.0.9)
  3. Add to pubspec.yaml: in_app_review: ^2.0.9

Rules

  • Always use WebFetch to check https://pub.dev/packages/{package_name} before adding a dependency
  • Use caret syntax (^) unless the user specifies otherwise
  • If the package does not exist on pub.dev, inform the user before proceeding
  • When adding multiple packages, check all of them on pub.dev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment