dart-concurrency
Skill2 starsChanged 3 months agoApache-2.0View on GitHub
A specialized workflow for preventing, diagnosing, and remediating asynchronous anomalies in Dart and Flutter. Trigger this skill when encountering UI freezes, jank, laggy performance, event loop starvation, race conditions, shared state corruption, isolate deadlocks, test timeouts (Futures, Streams, FakeAsync, pumpAndSettle), or static analysis lints (unawaited_futures, discarded_futures, use_build_context_synchronously).
In this repository30 other files it gives its agents.
- agy-debuggerSkill
- analyze-github-prSkill
- api-reviewSkill
- branch-cleanupSkill
- code-documentationSkill
- code-mergeSkill
- code-reviewSkill
- cognitive-complexitySkill
- commit-changesSkill
- cost-optimizationSkill
- dart-cli-app-best-practicesSkill
- dart-modern-featuresSkill
- flutter-architectureSkill
- flutter-concurrencySkill
- flutter-testingSkill
- gh-cliSkill
- github-collab-searchSkill
- git-stackSkill
- nochangeSkill
- planSkill
- pr-feedback-handlerSkill
- proposal-writerSkill
- pr-reviewer-recommendationSkill
- pr-reviewerSkill
- sem-semantic-infoSkill
- ship-itSkill
- skill-creatorSkill
- unix-cli-best-practicesSkill
- write-pr-descriptionSkill
- write-proseSkill
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 7 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 24
Before debugging runtime issues, enforce structural correctness.
- Very specific: line 26
Scan: Use analyze_files to check analysis_options.yaml.
- Very specific: line 27
Enforce: Ensure unawaited_futures, discarded_futures, and use_build_context_synchronously are enabled.
- Distinctive: line 28
Remediate: If violations are found, apply the strategies defined in references/static-analysis.md.
- Distinctive: line 32
If a defect is reported via CI/CD or local testing:
- Very specific: line 34
Execute: Run run_tests with the --log-file argument.
- Distinctive: line 40
If the application is unresponsive but compiles:
- Very specific: line 43
Check Errors: Use get_runtime_errors to identify unhandled exceptions.
- Distinctive: line 44
Profile: Use VM Service lookups to differentiate between Event Loop Starvation and Deadlocks.
- Distinctive: line 45
If CPU is high and stack traces show recursion: See references/event-loops.md.
- Distinctive: line 46
If CPU is low and execution halts: See references/race-conditions.md or references/isolate-management.md.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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
Dart Concurrency Anomalies Workflow
MCP Toolchain Dependencies
This skill requires access to the dart and dart_analysis_server MCP toolsets:
- analyze_files: For static analysis and AST parsing.
- run_tests: To reproduce hangs and capture timeout logs (
--log-file). - dtd: To bridge into the runtime environment (Dart Tooling Daemon).
- get_runtime_errors: To fetch current runtime errors and stack traces.
- widget_inspector: To detect infinite rendering loops.
- hot_reload: To inject fixes without losing state.
- pub_dev_search: To find pub packages (e.g.,
synchronized).
Operational Workflows
Phase 1: Proactive Static Analysis
Before debugging runtime issues, enforce structural correctness.
- Scan: Use
analyze_filesto checkanalysis_options.yaml. - Enforce: Ensure
unawaited_futures,discarded_futures, anduse_build_context_synchronouslyare enabled. - Remediate: If violations are found, apply the strategies defined in references/static-analysis.md.
Phase 2: Test Suite Reproduction
If a defect is reported via CI/CD or local testing:
- Execute: Run
run_testswith the--log-fileargument. - Parse: Scan logs for
pumpAndSettletimed out orFakeAsyncdiscrepancies. - Resolve: Apply heuristics from references/test-suite-anomalies.md.
Phase 3: Runtime Introspection (The "Hang" Protocol)
If the application is unresponsive but compiles:
- Connect: Invoke
dtd. - Check Errors: Use
get_runtime_errorsto identify unhandled exceptions. - Profile: Use VM Service lookups to differentiate between Event Loop Starvation and Deadlocks.
- If CPU is high and stack traces show recursion: See references/event-loops.md.
- If CPU is low and execution halts: See references/race-conditions.md or references/isolate-management.md.
Decision Trees
Is the UI Frozen?
- Yes -> Check Event Loop Starvation (High CPU) or Deadlock (Low CPU).
- No (stale data) -> Check Race Conditions.
Is it a Test Timeout?
pumpAndSettle-> Infinite Animation.- Silent Hang ->
FakeAsyncvs. Real I/O conflict.
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.

