dart-tool-scripts
Skill1 starsChanged 26 days agoBSD-3-ClauseView on GitHub
Moves growing shell logic into `tool/*.dart` scripts run with `dart run` instead of Bash. Use when a GitHub Actions step or repo bootstrap grows branches, loops, JSON, test sharding or macOS versus Linux sed.
In this repository52 other files it gives its agents.
- academic-research-assistantSkill
- answer-sheetSkill
- app-graphicsSkill
- app-landing-pageSkill
- app-screenshotsSkill
- break-uiSkill
- consumer-app-from-behaviorSkill
- cross-language-safetySkill
- decision-sweepSkill
- engineering-diarySkill
- figma-review-loopSkill
- flutter-app-size-auditSkill
- flutter-async-at-the-edgeSkill
- flutter-async-cubit-safetySkill
- flutter-bloc-clean-architectureSkill
- flutter-clean-architecture-tddSkill
- flutter-cubit-smart-cachingSkill
- flutter-error-logging-conventionsSkill
- flutter-observability-instrumentationSkill
- flutter-paywall-and-review-timingSkill
- flutter-precommit-cleanupSkill
- flutter-router-decisionSkill
- flutter-runtime-safetySkill
- flutter-shorebird-otaSkill
- flutter-stream-architectureSkill
- flutter-strict-analysisSkill
- flutter-web-first-paintSkill
- forced-pivot-15-daySkill
- gplay-consoleSkill
- ios-distribution-feature-flagsSkill
- launch-readinessSkill
- launch-watchSkill
- locale-expert-reviewSkill
- market-pulseSkill
- mobile-ui-referenceSkill
- moscow-prioritizationSkill
- orchestrate-agentic-engineeringSkill
- parallel-agent-inboxSkill
- paywall-conversion-flowSkill
- paywall-transparencySkill
- proactive-crash-repair-loopSkill
- promise-auditSkill
- pr-preview-shippingSkill
- ship-first-dollar-appSkill
- slim-ios-simulator-fleetSkill
- spec-sql-harnessSkill
- store-launch-mastermindSkill
- sync-contextSkill
- task-blitzSkill
- techdebtSkill
- vendor-decisionSkill
- web-interface-reviewSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 0 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 11
Keep Bash/Make for single commands: dart format ., dart analyze, flutter test.
- Very specific: line 18
Prefer calling Dart APIs over shelling out (typed config, e.g.
- Very specific: line 19
Use dart:io Platform.isWindows and package:path.
- Very specific: line 21
Don't rewrite flutter test itself.
- Very specific: line 35
Keep a custom tool/shard_tests.dart only for the cases the flags refuse, which are --no-optimization, --platform, --update-goldens, named …
≈ “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
Dart tool scripts
Keep Bash/Make for single commands: dart format ., dart analyze, flutter test.
The moment the script has branches, JSON, sharding, or portable path logic, put it in tool/<name>.dart and run dart run tool/<name>.dart.
Rules
- Parse args in Dart (
package:args), notshift/ positional bash. - Prefer calling Dart APIs over shelling out (typed config, e.g. ffigen
FfiGenerator(...)). - Use
dart:ioPlatform.isWindowsandpackage:path. Never assume GNUsed. - Package authors: export a function main so other CLIs can import it without spawning a process.
- Don't rewrite
flutter testitself. Wrap selection, sharding, and coverage around it. dart runfrom a Flutter repo needs an SDK constraint the CI image actually has.
CI sharding
strategy:
matrix: { shard: [0, 1, 2] }
steps:
- uses: dart-lang/setup-dart@v1
- run: dart run tool/shard_tests.dart --index ${{ matrix.shard }} --total 3Where a Flutter package already runs very_good test and is on Dart 3.13 or later with very_good_cli 1.6.0 or later, use its --shard-index (1-based) and --total-shards flags in the matrix before writing a script.
Keep a custom tool/shard_tests.dart only for the cases the flags refuse, which are --no-optimization, --platform, --update-goldens, named test files and --min-coverage.
A 10-line bash pipe is still fine. This skill starts when the script has branches.
Sources
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.

