
Check Downstream Consumers
FreeEvaluate breaking changes in Dart libraries effectively.
Free · Opens the source repo
What Check Downstream Consumers does
The Check Downstream Consumers skill is designed for developers working with the dart_skills_lint library, specifically during the evaluation of pull requests (PRs) and feature branches. This skill helps ensure that any changes made do not introduce breaking changes for downstream consumers, such as popular repositories like flutter/flutter or dart-lang/site-www. By validating the compatibility of changes across these external repositories, developers can maintain the integrity of their projects while implementing new features or fixes.
To use this skill, developers must first verify the local state of the dart_skills_lint repository, ensuring that all tests pass and the working directory is clean. The skill then guides users through the process of locating downstream consumers, updating their dependency specifications, and running verification tests to confirm that existing functionality remains intact. This systematic approach minimizes the risk of introducing regressions and helps maintain backward compatibility, which is crucial in collaborative environments.
The skill is particularly useful when assessing breaking changes during PR reviews or when validating migrations against the changelog. It emphasizes the importance of a human-in-the-loop decision-making process when encountering issues, allowing developers to diagnose problems and consider mitigation strategies before proceeding. By following the outlined steps, developers can confidently evaluate the impact of their changes on downstream consumers and ensure a smooth integration process.
This skill is ideal for teams working on Dart libraries that have multiple downstream consumers, as it streamlines the process of ensuring compatibility and reduces the likelihood of disruptions in the development workflow. Developers can leverage this skill to maintain high-quality code and foster collaboration across projects.
When to use it
Use this skill when assessing pull requests or feature branches in `dart_skills_lint` that may affect external repositories.
When not to use it
Avoid this skill if you are not working with Dart libraries or do not have downstream consumers to validate against.
What you can build with it
Evaluating a Pull Request
Use this skill to assess a pull request in `dart_skills_lint` for potential breaking changes affecting downstream consumers.
Testing Migration Compatibility
Leverage the skill to validate migrations against the changelog, ensuring that all changes are backward compatible.
Collaborating on Dart Libraries
Utilize this skill in team settings to maintain compatibility across multiple Dart libraries and their consumers.
How to install Check Downstream Consumers
View source1. Install with the skills CLI
npx skills add flutter/agent-plugins/check-downstream-consumers --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by flutterCheck Downstream Consumers & Evaluate Breaking Changes
[!IMPORTANT] No Downstream Commits Allowed This skill is focused entirely on evaluating breaking changes within
dart_skills_lintduring PR review and changelog validation. All modifications applied to downstream consumer repositories (such as temporarily editingpubspec.yamlref:hashes or updating calling syntax to verify migrations) are strictly diagnostic and transient. You must never stage, commit, or push code inside external downstream repositories during this workflow.
1. Preparation & Repository Verification
-
Verify Local Linter State (
dart_skills_lint)- Ensure your working directory in
dart_skills_lintis clean (git status). - Verify all existing tests pass cleanly (
dart test). - Push current commits to the remote branch so downstream consumers can resolve git hashes directly via the network.
- Record the latest remote git SHA-1 commit hash (e.g.,
1e1f280...).
- Ensure your working directory in
-
Locate & Check Out Downstream Consumers
- Read
resources/known_consumers.mdto review typical consumer repositories (flutter/flutter,flutter/devtools,dart-lang/site-www, etc.) and their specific consumption subdirectories. - Discovering Local Checkouts: If you do not already know the exact directory paths where these consumer repositories live on disk:
- Check Workspace Knowledge: Inspect active workspace definitions and machine-specific local Knowledge Items (
KIs), which frequently record configured system directory structures. - Inspect Adjacent Parent Directories: Check common sibling paths right around your current repository root (for example, listing adjacent directories under
..or running localized, depth-limited searches likefind .. -maxdepth 3 -name pubspec.yaml). - Ask Before Running Blind Traversals: Never execute unbounded root filesystem sweeps (
find / -name ...). If a target repository cannot be found within adjacent workspace boundaries, immediately ask the user whether the repository is checked out locally and prompt for its path before evaluating.
- Check Workspace Knowledge: Inspect active workspace definitions and machine-specific local Knowledge Items (
- For every target checked out on disk, verify its git state is clean and resting on its primary upstream branch (
mainormaster). Do not run tests against dirty or out-of-date branches.
- Read
2. Pointing Consumers to the In-Progress Hash
For each downstream consumer under evaluation:
-
Update
pubspec.yaml- Locate the target's relevant dependency specification (e.g.,
dev/tools/pubspec.yamlortool/pubspec.yaml). - Update the
ref:field under thegitconfiguration fordart_skills_lintto exact match the in-progress commit hash:dart_skills_lint: git: url: https://github.com/flutter/agent-plugins path: tool/dart_skills_lint ref: <LATEST_COMMIT_HASH>
- Locate the target's relevant dependency specification (e.g.,
-
Resolve Dependencies & Run Verification Tests (Legacy Check)
- Execute dependency resolution according to the consumer environment (Flutter workspaces require
flutter pub get; standard pure Dart repositories requiredart pub get). - Run the consumer's verification tests against their existing code (typically targeting tests like
test/validate_skills_test.dartor runningflutter test/dart test). - Confirm that all existing tests and static analyses compile and pass cleanly when using their established calling syntax. This ensures backward-compatibility deprecation shims function properly right alongside legacy calling conventions.
- Execute dependency resolution according to the consumer environment (Flutter workspaces require
-
Perform Diagnostic API Migration & Boundary Verification After verifying across each target consumer that legacy calls function properly without regressions in Step 2:
- Migrate Consumer Calling Syntax: For every repository in the set of downstream targets under evaluation (whether a single target, a requested subset, or all known consumers), update its codebase to remove any usage of deprecated getters, parameters, or constructors directly, replacing them with the new API surface introduced in
dart_skills_lint(for example, transitioningresolvedRulesarguments toresolvedRuleConfigs). - Verify Public Boundary Resolution: Execute strict static analysis (
dart analyze --fatal-infos <modified_test_or_package_path>) within the consumer's package directory after completing the migration.- Confirm that all newly exposed classes and parameters resolve cleanly through the public library barrier (
import 'package:dart_skills_lint/dart_skills_lint.dart';). - Any syntax check reporting
Undefined classor requiring internal implementation imports (import 'package:dart_skills_lint/src/...';) to compile indicates an explicit public export deficit insidelib/dart_skills_lint.dart.
- Confirm that all newly exposed classes and parameters resolve cleanly through the public library barrier (
- Run Migrated Test Suite: Re-run the complete downstream consumer test harness against the migrated code (
flutter test/dart test) to guarantee exact behavioral alignment before accepting the upstream change.
- Migrate Consumer Calling Syntax: For every repository in the set of downstream targets under evaluation (whether a single target, a requested subset, or all known consumers), update its codebase to remove any usage of deprecated getters, parameters, or constructors directly, replacing them with the new API surface introduced in
3. Breaking Change Evaluation & Decision Protocol
Whenever tests fail or dependency resolution encounters API friction, you must evaluate the nature of the breakage and pause for a deliberate human-in-the-loop decision before taking action.
Analyzing the Failure
- Diagnose: Identify exact causes (e.g., renamed public parameters, removed model types, altered getter return types, or modified severity profiles).
- Mitigation Options: Determine if a backwards-compatible code layer can seamlessly bridge the change without compromising new features (e.g.,
@Deprecatedgetters mapping new types back to legacy structures, constructor parameter forwarding, or fallback exports). - Changelog Integrity: Verify whether the breaking behavior and its required migration steps are fully documented in
dart_skills_lint/CHANGELOG.md.
The Human Collaboration Point
Present your diagnostic summary to the human and request a deliberate path forward. The choice between mitigating a break inside the linter versus making a breaking change in downstream libraries is strictly a human decision based on ecosystem trade-offs.
Pathway A: Backwards Compatibility Mitigation (Approved by Human)
If the decision is to soften or eliminate the breaking change from dart_skills_lint:
- Modify
dart_skills_lintcode to introduce the backward-compatible shim (such as deprecated getters/constructors or compatibility exports). - Add regression tests to ensure both legacy consumer calls and new patterns function properly without throwing exceptions, while verifying mutually exclusive flags fail gracefully if combined.
- Ensure temporary shims are appropriately documented and tagged with tracking issues (
// TODO(...)) for future removal. - Format code (
dart format .), verify static analysis (dart analyze --fatal-infos), and confirm tests pass locally (dart test). - Commit and push the updated branch, capture the refreshed SHA-1 commit hash, update the downstream
pubspec.yaml, and run tests again until the consumer cleanly compiles and passes.
Pathway B: Downstream Migration via Changelog (Break Accepted)
If the human instructs you not to mitigate (or if mitigation is structurally impossible) and accepts the breaking change:
- Attempt Downstream Upgrade: Upgrade the downstream library's calling code strictly following the migration instructions written in
dart_skills_lint/CHANGELOG.md. - Evaluate Changelog Quality: If the instructions written in the
CHANGELOG.mdare incomplete, confusing, or insufficient to cleanly migrate the downstream code, treat this as an explicit evaluation failure. Immediately propose targeted additions and clarity improvements todart_skills_lint/CHANGELOG.md. - Verify Build & Tests: After updating both the consumer codebase and any changelog enhancements, re-run dependency checks (
pub get) and test suites until the downstream package runs cleanly.
Constraint — Do Not Commit: Remember that any migration edits made across the downstream codebase exist purely to verify that dart_skills_lint/CHANGELOG.md instructions function cleanly in practice. Do not stage or commit these edits inside the consumer repository.
4. Iteration Loop & Repository Cleanup
After successfully evaluating and resolving one target repository:
- Clean Up Consumer State: Because downstream edits are entirely transient, restore the external consumer repository cleanly back to its initial git state (
git checkout -- .orgit restore .across the modified paths) before proceeding to the next candidate, unless expressly instructed by the user to leave uncommitted changes on disk for local inspection. - Record Evaluation Summary: Update and maintain clear summaries documenting which repositories passed cleanly without changes, which required local mitigations inside
dart_skills_lint, and which proved out changelog migration workflows. - Check Reviewer Intent: Ask the human reviewer whether to proceed directly to evaluating the next remaining repository listed in
resources/known_consumers.mdor halt execution.
Frequently asked questions about Check Downstream Consumers
Similar skills
Quality Playbook Generator
Run comprehensive quality audits on any codebase.
PR Draft Summary
Automate PR summary generation for openai-agents-python.
Final Release Review
Streamline your release candidate audits with ease.
Unit Test Vue Pinia
Efficiently write and review unit tests for Vue 3 applications.
Slang Shader Expert
Optimize and integrate Slang shaders with ease.
Telemetry Standards
Ensure consistent event tracking in Supabase Studio.
