dart-resolve-package-conflicts
Workflow for fixing package version conflicts.
Skill by maranix
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/maranix-dart-resolve-package-conflicts
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: productivity
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/dart-resolve-package-conflicts
What's inside
- Skill name
dart-resolve-package-conflicts- Description
- Workflow for fixing package version conflicts. Use this when `pub get` fails due to incompatible package versions.
- License
- MIT
- Metadata
- model: models/gemini-3.1-pro-preview · last_modified: Fri, 24 Apr 2026 15:11:14 GMT
- Instructions
- 110 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Managing Dart Dependencies
## Contents
- [Core Concepts](#core-concepts)
- [Version Constraints](#version-constraints)
- [Workflow: Auditing Dependencies](#workflow-auditing-dependencies)
- [Workflow: Upgrading Dependencies](#workflow-upgrading-dependencies)
- [Workflow: Resolving Version Conflicts](#workflow-resolving-version-conflicts)
- [Examples](#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 upgrade` resolves 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 in `pubspec.yaml`. This allows `pub` to 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_dependencies` to 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-lockfile` in 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.yaml` to 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 --tighten` to automatically update the lower bounds in `pubspec.yaml` to match the newly resolved versions.
- [ ] **If updating to "Resolvable" versions (Major updates):**
- [ ] Manually edit `pubspec.yaml` to bump the version constraint to match the "Resolvable" column (e.g., change `^0.11.0` to `^0.12.1`).
- [ ] Run `dart pub upgrade` to resolve the new constraints and update `pubspec.lock`.
- [ ] **Feedback Loop:**
- [ ] Run `dart analyze` -> review errors -> fix breaking API changes.
- [ ] Run `dart test` -> review failures -> fix regressions.
## 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 get` to 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.
## 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`):**
```yaml
dependencies:
http: ^0.13.0
```
**Command:**
```bash
dart pub upgrade --tighten http
```
**Output (`pubspec.yaml`):**
```yaml
dependencies:
http: ^0.13.5
```
### Surgical Lockfile Removal
If `package_a` is retracted or locked in a conflict, remove only its block from `pubspec.lock`.
**Before (`pubspec.lock`):**
```yaml
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`.From maranix/skills, MIT.
More from maranix/skills
- 0.524score
dart-add-unit-test
maranix
Write and organize unit tests for functions, methods, and classes using `package:test`.
SkillBFreshness: BClaude Code +9 - 0.524score
dart-generate-test-mocks
maranix
Define and generate mock objects for external dependencies using `package:mockito` and `build_runner`.
SkillBFreshness: BClaude Code +9 - 0.524score
dart-build-cli-app
maranix
Entrypoint structure, exit codes, cross-platform scripts.
SkillBFreshness: BClaude Code +9 - 0.524score
flutter-add-integration-test
maranix
Configures Flutter Driver for app interaction and converts MCP actions into permanent integration tests.
SkillBFreshness: BClaude Code +9 - 0.524score
flutter-add-widget-test
maranix
Implement a component-level test using `WidgetTester` to verify UI rendering and user interactions (tapping, scrolling, entering text).
SkillBFreshness: BClaude Code +9 - 0.524score
dart-setup-ffi-assets
maranix
Guides agents in compiling and packaging C/C++ source code into dynamic or static libraries (Code Assets) using Dart's Native Assets hook system (via…
SkillBFreshness: BClaude Code +9 - 0.524score
dart-use-ffigen
maranix
Guide agents to use `package:ffigen` to automatically generate FFI bindings instead of writing them manually.
SkillBFreshness: BClaude Code +9 - 0.524score
flutter-apply-architecture-best-practices
maranix
Architects a Flutter application using the recommended layered approach (UI, Logic, Data).
SkillBFreshness: BClaude Code +9 - 0.524score
flutter-build-responsive-layout
maranix
Use `LayoutBuilder`, `MediaQuery`, or `Expanded/Flexible` to create a layout that adapts to different screen sizes.
SkillBFreshness: BClaude Code +9 - 0.521score
dart-fix-runtime-errors
maranix
Uses get_runtime_errors and lsp to fetch an active stack trace, locate the failing line, apply a fix, and verify resolution via hot_reload.
SkillBFreshness: BClaude Code +9 - 0.521score
dart-run-static-analysis
maranix
Execute `dart analyze` to identify warnings and errors, and use `dart fix --apply` to automatically resolve mechanical lint issues.
SkillBFreshness: BClaude Code +9 - 0.521score
dart-use-primary-constructors
maranix
Help users write syntactically and semantically correct primary constructors in Dart, and migrate/use the new constructor syntax, empty-body semicolon syntax…
SkillBFreshness: BClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Aug 13, 2026 (2 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/maranix/skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from maranix
- 0.524score
dart-generate-test-mocks
maranix
Define and generate mock objects for external dependencies using `package:mockito` and `build_runner`.
SkillBFreshness: BClaude Code +9 - 0.524score
dart-add-unit-test
maranix
Write and organize unit tests for functions, methods, and classes using `package:test`.
SkillBFreshness: BClaude Code +9 - 0.524score
flutter-add-integration-test
maranix
Configures Flutter Driver for app interaction and converts MCP actions into permanent integration tests.
SkillBFreshness: BClaude Code +9 - 0.524score
flutter-add-widget-test
maranix
Implement a component-level test using `WidgetTester` to verify UI rendering and user interactions (tapping, scrolling, entering text).
SkillBFreshness: BClaude Code +9 - 0.524score
dart-build-cli-app
maranix
Entrypoint structure, exit codes, cross-platform scripts.
SkillBFreshness: BClaude Code +9 - 0.524score
dart-setup-ffi-assets
maranix
Guides agents in compiling and packaging C/C++ source code into dynamic or static libraries (Code Assets) using Dart's Native Assets hook system (via…
SkillBFreshness: BClaude Code +9
Cite this page
dart-resolve-package-conflicts skill. Agent Mart. https://agentmart.dev/skills/maranix-dart-resolve-package-conflicts (last updated 2026-10-24)