dart-resolve-package-conflicts
Skill4 starsChanged 4 months agoMITView on GitHub
Workflow for fixing package version conflicts. Use this when `pub get` fails due to incompatible package versions.
5 other projects use a version of this.
Adopted by
Most recently taken up by
- dart-lang/skillsword for word, first seen Oct 16, 2026
- zhouycheng/skillsword for word, first seen Oct 13, 2026
- enrique-lozano/Monekinword for word, first seen Oct 9, 2026
- flutter/skillsword for word, first seen Oct 8, 2026
- RodotDev/arb_aiword for word, first seen May 30, 2026
Used with
Projects with it also use dart-use-doc-examples and dart-write-documentation.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
flutterSkilldart-use-doc-examples
How to inject external code examples into Dartdoc using the {@example} directive, and how to filter those files using #hide, #region, and #endregion tags.
Also in 3 projects that use this
flutterSkilldart-write-documentation
Rules and formatting guidelines for writing Dart /// API documentation and doc comments. Use when documenting Dart code, writing doc comments for any Dart declaration (libraries, classes, methods, variables, etc.), or when instructed to follow the Effective Dart documentation guidelines.
Also in 3 projects that use this
Other versions5 projects use a version of this.
Word for word · 5
- flutter/skills★ 3.2k100% same
- dart-lang/skills★ 548100% same
- enrique-lozano/Monekin★ 268100% same
- RodotDev/arb_ai★ 1100% same
- zhouycheng/skills★ 1100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository70 other files it gives its agents.
- AGENTS.mdAGENTS.md
- engine/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- engine/CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- brandkitSkill
- code-reviewSkill
- dart-add-unit-testSkill
- dart-build-cli-appSkill
- dart-collect-coverageSkill
- dart-fix-runtime-errorsSkill
- dart-generate-test-mocksSkill
- dart-migrate-to-checks-packageSkill
- dart-resolve-package-conflictsSkill
- dart-run-static-analysisSkill
- dart-setup-ffi-assetsSkill
- dart-use-ffigenSkill
- dart-use-pattern-matchingSkill
- dart-use-primary-constructorsSkill
- design-taste-frontendSkill
- flutter-add-integration-testSkill
- flutter-add-widget-previewSkill
- flutter-add-widget-testSkill
- flutter-apply-architecture-best-practicesSkill
- flutter-build-responsive-layoutSkill
- flutter-fix-layout-issuesSkill
- flutter-implement-json-serializationSkill
- flutter-setup-declarative-routingSkill
- flutter-setup-localizationSkill
- flutter-use-http-packageSkill
- frontend-code-reviewSkill
- full-output-enforcementSkill
- github-releaseSkill
- grill-with-docsSkill
- high-end-visual-designSkill
- imagegen-frontend-webSkill
- image-to-codeSkill
- improve-codebase-architectureSkill
- industrial-brutalist-uiSkill
- minimalist-uiSkill
- redesign-existing-projectsSkill
- source-command-frontend-code-review-skillSkill
- source-command-impeccable-skillSkill
- stitch-design-tasteSkill
- tddSkill
- to-prdSkill
- frontend-code-reviewSkill
- impeccableSkill
- dart-add-unit-testSkill
- dart-build-cli-appSkill
- dart-collect-coverageSkill
- dart-fix-runtime-errorsSkill
- dart-generate-test-mocksSkill
- dart-migrate-to-checks-packageSkill
- dart-run-static-analysisSkill
- dart-setup-ffi-assetsSkill
- dart-use-ffigenSkill
- dart-use-pattern-matchingSkill
- dart-use-primary-constructorsSkill
- flutter-add-integration-testSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 2 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 32
Use Caret Syntax: Always use caret syntax (e.g., ^1.2.3) for dependencies in pubspec.yaml.
- Very specific: line 34
Enforce Lockfiles in CI: Use dart pub get --enforce-lockfile in CI/CD pipelines to ensure the exact versions tested locally are used in …
- Distinctive: line 38
Run this workflow periodically to identify stale packages that may impact stability or performance.
- Distinctive: line 48
Use conditional logic based on the audit results to upgrade dependencies.
- Very specific: line 63
When pub cannot find a set of concrete versions that satisfy all constraints, or when dealing with a retracted package version, manipulate …
- Very specific: line 65
NEVER: delete the entire pubspec.lock file and run dart pub get.
- Very specific: line 79
When dart pub outdated shows a package is resolvable to a higher minor/patch version, use the --tighten flag to update the pubspec.yaml …
- Very specific: line 99
If package_a is retracted or locked in a conflict, remove only its block from pubspec.lock.
- Very specific: line 116
Action: Delete the package_a block entirely.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Managing Dart Dependencies
Contents
- Core Concepts
- Version Constraints
- Workflow: Auditing Dependencies
- Workflow: Upgrading Dependencies
- Workflow: Resolving Version Conflicts
- Examples
Core Concepts
Dart enforces a strict single-version rule for dependencies: a project and all its transitive dependencies must resolve to a single, shared version of any given package. This prevents runtime type mismatches but introduces the risk of "version lock."
To mitigate version lock, Dart relies on version constraints rather than pinned versions in the pubspec.yaml. The pubspec.lock file maintains the exact resolved versions for reproducible builds.
Understand the output columns of dart pub outdated:
- Current: The version currently recorded in
pubspec.lock. - Upgradable: The latest version allowed by the constraints in
pubspec.yaml.dart pub upgraderesolves to this. - Resolvable: The absolute latest version that can be resolved when factoring in all other dependencies in the project.
- Latest: The latest published version of the package (excluding prereleases).
Version Constraints
- Use Caret Syntax: Always use caret syntax (e.g.,
^1.2.3) for dependencies inpubspec.yaml. This allowspubto select newer, non-breaking versions (up to, but not including, the next major version) during resolution. - Tighten Dev Dependencies: Set the lower bound of
dev_dependenciesto the exact version currently used. This reduces resolution complexity and prevents older, incompatible dev tools from being selected. - Enforce Lockfiles in CI: Use
dart pub get --enforce-lockfilein CI/CD pipelines to ensure the exact versions tested locally are used in production.
Workflow: Auditing Dependencies
Run this workflow periodically to identify stale packages that may impact stability or performance.
Task Progress:
- Run
dart pub outdated. - Review the Upgradable column to identify packages that can be updated without modifying
pubspec.yaml. - Review the Resolvable column to identify packages that require constraint modifications in
pubspec.yamlto update. - Identify any packages marked as retracted or discontinued.
Workflow: Upgrading Dependencies
Use conditional logic based on the audit results to upgrade dependencies.
Task Progress:
- If updating to "Upgradable" versions:
- Run
dart pub upgrade. - Run
dart pub upgrade --tightento automatically update the lower bounds inpubspec.yamlto match the newly resolved versions.
- Run
- If updating to "Resolvable" versions (Major updates):
- Manually edit
pubspec.yamlto bump the version constraint to match the "Resolvable" column (e.g., change^0.11.0to^0.12.1). - Run
dart pub upgradeto resolve the new constraints and updatepubspec.lock.
- Manually edit
- Feedback Loop:
- Run
dart analyze-> review errors -> fix breaking API changes. - Run
dart test-> review failures -> fix regressions.
- Run
Workflow: Resolving Version Conflicts
When pub cannot find a set of concrete versions that satisfy all constraints, or when dealing with a retracted package version, manipulate the lockfile surgically.
NEVER delete the entire pubspec.lock file and run dart pub get. This causes uncontrolled upgrades across the entire dependency graph.
Task Progress:
- Open
pubspec.lock. - Locate the specific YAML block for the conflicting or retracted package.
- Delete ONLY that package's entry from the lockfile.
- Run
dart pub getto fetch the newest compatible, non-retracted version for that specific package. - Feedback Loop:
- Run
dart pub deps-> verify the dependency graph resolves correctly. - If resolution fails, identify the transitive dependency causing the lock, update its constraint in
pubspec.yaml, and retry.
- Run
Examples
Tightening Constraints
When dart pub outdated shows a package is resolvable to a higher minor/patch version, use the --tighten flag to update the pubspec.yaml automatically.
Input (pubspec.yaml):
dependencies:
http: ^0.13.0Command:
dart pub upgrade --tighten httpOutput (pubspec.yaml):
dependencies:
http: ^0.13.5Surgical Lockfile Removal
If package_a is retracted or locked in a conflict, remove only its block from pubspec.lock.
Before (pubspec.lock):
packages:
package_a:
dependency: "direct main"
description:
name: package_a
url: "https://pub.dev"
source: hosted
version: "1.0.0" # Retracted version
package_b:
dependency: "direct main"
# ...Action: Delete the package_a block entirely. Leave package_b untouched. Run dart pub get.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

