[!NOTE]
Personal Environment Router: This skill is optimized for
@kevmoo's local development environment and assumes specialized skills are checked out under~/github/kevmoo/and~/github/skills/. Other users should clone the required repositories or adapt the catalog paths in Skill Catalog to match their local layout.
Orchestrates specialized Dart workflows from local GitHub checkouts without pre-loading heavy individual skills into static prompt memory.
🛠️ Operating Protocol
1. Intent Evaluation & Confidence Matching (Strict Single-Skill Target)
When invoked with text (e.g. /dart-cleanup convert expect matchers to checks),
evaluate the input against the Skill Catalog using this
3-tier confidence decision tree:
- Tier 1: Unambiguous Clear Match (High Confidence / 90%+ sure)
- Exactly 1 skill in the catalog clearly maps to the requested transformation.
- Action:
- Check for the target
SKILL.mdat its candidate path in~/github/. - If missing, output the Missing Checkout Safety Net.
- If present, call
view_fileon the targetSKILL.md, hydrate its untruncated instructions into active context, and execute the refactoring immediately.
- Check for the target
- Tier 2: Uncertain / Close Match (Medium Confidence)
- A skill seems close or relevant, but there is ambiguity.
- Action: Stop and ask the user for confirmation before hydrating:
"I think you might mean
<skill-name>" (SKILL.md). Would you like me to load and run this workflow?"
- Tier 3: No Clear Match or Bare Invocation (Low Confidence / Empty Input)
- No skill matches the prompt, or
/dart-cleanupwas invoked with no arguments. - Action: Output:
"I couldn't find an unambiguous skill match for your request. Here is the catalog of available specialized Dart skills:" Render the categorized Skill Catalog with clickable
file://links so the user can choose.
- No skill matches the prompt, or
2. Missing Checkout Safety Net
If a target SKILL.md is selected but missing from the local filesystem,
output:
⚠️ Missing local checkout: Target skill
<skill-name>was not found at~/github/.... Please ensurehttps://github.com/<org>/<repo>is cloned into~/github/.
3. Coding Standards, Public API & Config Guardrails
- Architecture, Boundary & Testing Guardrails
(
~/.agents/CODING_STANDARDS.md):- Always review
~/.agents/CODING_STANDARDS.mdbefore executing multi-file Dart refactors, complexity reductions, test updates, or package maintenance:- Deep Externally, Pure Internally & Shallow-Helper Guardrail: Keep
lib/<pkg>.dartexports minimal (export 'src/...' show ...;). Never lower complexity by introducing stateful single-use_Populator/_Runnerhelper classes that mutate caller maps/sets in-place or high-arity (>= 5param) pass-through micro-helpers. Stop decomposing once a function reaches the Target Zone (8–15, not0), cap extracted pure helpers at<= 4parameters (<= 3preferred,sliceScoreAtRoot >= 3), and rundart run cognitive_complexity:shallow@^1.0.0 lib/to re-inline single-callerSAFE_INLINEhelpers. - Load-Bearing Library Boundary Rule: Extract a standalone
lib/src/library (Tier 1) only when the cut requires zero_privatevisibility widening; usepart/part of(Tier 2) when types share library-scoped access (sealed,final,interface,base,._(), or_privatemembers). Never widen_privatemembers to@internaljust to split files. - Public API Surface Verification (
dart run api_summary@^1.1.0): Rundart run api_summary@^1.1.0before and after multi-file refactors (--checkwhenapi.txtis tracked, ordiff -u /tmp/api_before.txt /tmp/api_after.txtotherwise) to verify zero unintended public API leaks. - Testing & Real Test Doubles (
dart-test-fundamentals): Importpackage:<pkg>/<pkg>.dartfor package integration tests andpackage:<pkg>/src/<subsystem>.dartwhen unit-testing internal deep modules (testing thin helpers through their owning module). Use real implementations (package:test_descriptord.sandbox/d.dir,Directory.systemTemp, loopbackHttpServer), first-party fakes (package:http/testing.dartMockClient), and@TestOn('browser')for DOM/Wasm interop. Assert boundary behavior of functions consuming constants and execute or render units directly.
- Deep Externally, Pure Internally & Shallow-Helper Guardrail: Keep
- Always review
- Optional
kscriptsConfig Hygiene (lint-cleanup&tighten):- When
kscriptsis onPATH, usekscripts lint-cleanup --rewriteto prune redundant lints inanalysis_options.yamlandkscripts tighten(orkscripts tighten --workspace) to alignpubspec.yamllower bounds withpubspec.lock.
- When
📋 Skill Catalog & Path Priority
Required Local Repositories
| Repository | Local Directory | Synced Commit |
|---|---|---|
dart-lang/skills |
~/github/skills |
b046fa1 |
kevmoo/analytica.dart |
~/github/kevmoo/analytica.dart |
1955b9e |
kevmoo/dash_skills |
~/github/kevmoo/dash_skills |
397a703 |
A. Refactoring & Code Quality
dart-build-cli-app: CLI entrypoint structure, argument parsing (package:args), cross-platform scripts, exit codes, and compilation.- Path:
~/github/skills/skills/dart-build-cli-app/SKILL.md
- Path:
dart-cognitive-complexity: Reduces cognitive complexity (Target Zone 8–15) via pattern matching, guard clauses,data_flow,file_split, andcognitive_complexity:shallowsingle-caller helper re-inlining.- Path:
~/github/kevmoo/analytica.dart/skills/dart-cognitive-complexity/SKILL.md
- Path:
dart-dedupe: Detects, audits, and safely remediates structural code duplication across Dart and Flutter repositories using the standalone Dedupe engine (pkg:dedupe) and empirical test gating.- Path:
~/github/kevmoo/analytica.dart/skills/dart-dedupe/SKILL.md
- Path:
dart-fix-runtime-errors: Resolves runtime errors, inspects active stack traces viaget_runtime_errorsand LSP, and verifies with hot reload.- Path:
~/github/skills/skills/dart-fix-runtime-errors/SKILL.md
- Path:
dart-run-static-analysis: Executesdart analyzeto catch issues anddart fix --applyto automatically resolve mechanical lint warnings.- Path:
~/github/skills/skills/dart-run-static-analysis/SKILL.md
- Path:
dart-undead: Audits, triages, and safely remediates unreachable and dead declarations in Dart and Flutter codebases using deterministic reachability analysis (pkg:undead).- Path:
~/github/kevmoo/analytica.dart/skills/dart-undead/SKILL.md
- Path:
dart-use-path-package: Cross-platform file and directory path manipulation, segment splitting, and extension extraction usingpackage:pathandpackage:file.- Path:
~/github/skills/skills/dart-use-path-package/SKILL.md
- Path:
profile-dart-code: Profiles Dart CLI applications using the VM Service protocol to capture CPU samples and pinpoint performance bottlenecks.- Path:
~/github/kevmoo/dash_skills/skills/profile-dart-code/SKILL.md
- Path:
B. Language Modernization & Syntax
dart-best-practices: Effective Dart guidelines, class design, null safety, and idiomatic style conventions.- Path:
~/github/kevmoo/dash_skills/skills/dart-best-practices/SKILL.md
- Path:
dart-long-lines: Formats and refactors code to adhere to the 80-column line limit (lines_longer_than_80_chars).- Path:
~/github/kevmoo/dash_skills/skills/dart-long-lines/SKILL.md
- Path:
dart-modern-features: Records, extension types, class modifiers (interface,base,final), null-aware elements (?e), dot shorthands, and digit separators.- Path:
~/github/kevmoo/dash_skills/skills/dart-modern-features/SKILL.md
- Path:
dart-multiline-strings: Converts consecutive print statements and string concatenations into clean triple-quoted multiline strings.- Path:
~/github/kevmoo/dash_skills/skills/dart-multiline-strings/SKILL.md
- Path:
dart-seal-type-hierarchies: Converts closed class hierarchies intosealedtypes to enable compiler-verified exhaustive pattern matching.- Path:
~/github/kevmoo/dash_skills/skills/dart-seal-type-hierarchies/SKILL.md
- Path:
dart-use-pattern-matching: Applies Dart 3 pattern matching, switch expressions, and object/record/MapEntry/list destructuring to unpack fields, validate schemas, and simplify control flow.- Path:
~/github/skills/skills/dart-use-pattern-matching/SKILL.md
- Path:
dart-use-primary-constructors: Adopts primary constructor syntax, empty-body semicolon syntax, in-body initializers, and concise forms.- Path:
~/github/skills/skills/dart-use-primary-constructors/SKILL.md
- Path:
C. Testing & Assertions
dart-add-unit-test: Writes and organizes unit tests for functions, methods, and classes usingpackage:testwith clean structure.- Path:
~/github/skills/skills/dart-add-unit-test/SKILL.md
- Path:
dart-collect-coverage: Collects test coverage usingpackage:coverageand generates LCOV reports.- Path:
~/github/skills/skills/dart-collect-coverage/SKILL.md
- Path:
dart-generate-test-mocks: Defines and generates mock objects for external dependencies usingpackage:mockitoandbuild_runner.- Path:
~/github/skills/skills/dart-generate-test-mocks/SKILL.md
- Path:
dart-matcher-best-practices: Best practices, custom matchers, and async matcher patterns for legacypackage:matcherassertions.- Path:
~/github/kevmoo/dash_skills/skills/dart-matcher-best-practices/SKILL.md
- Path:
dart-migrate-to-checks-package: Migrates legacyexpect(a, equals(b))matchers frompackage:matcherto fluentpackage:checkssyntax.- Path:
~/github/skills/skills/dart-migrate-to-checks-package/SKILL.md
- Path:
dart-test-coverage: Inspects, analyzes, and improves test coverage across a Dart package, locating missed lines.- Path:
~/github/kevmoo/dash_skills/skills/dart-test-coverage/SKILL.md
- Path:
dart-test-fundamentals: Corepackage:testpractices, test grouping,setUp/tearDownlifecycles, anddart_test.yamlconfiguration.- Path:
~/github/kevmoo/dash_skills/skills/dart-test-fundamentals/SKILL.md
- Path:
D. Documentation, Packaging & Native Interop
dart-doc-validation: Validates doc comments usingdart docto catch broken or unresolved references and macros.- Path:
~/github/kevmoo/dash_skills/skills/dart-doc-validation/SKILL.md
- Path:
dart-package-maintenance: Best practices for package maintenance, versioning, changelog curation, and publishing workflows.- Path:
~/github/kevmoo/dash_skills/skills/dart-package-maintenance/SKILL.md
- Path:
dart-resolve-package-conflicts: Resolves package dependency version conflicts whenpub getfails due to incompatible constraints.- Path:
~/github/skills/skills/dart-resolve-package-conflicts/SKILL.md
- Path:
dart-setup-ffi-assets: Compiles and packages C/C++ native assets using Dart's Native Assets hook system (hook/build.dartandhook/link.dart).- Path:
~/github/skills/skills/dart-setup-ffi-assets/SKILL.md
- Path:
dart-use-doc-examples: Injects external code examples into Dartdoc via{@example}directives and filters with#regiontags.- Path:
~/github/skills/skills/dart-use-doc-examples/SKILL.md
- Path:
dart-use-ffigen: Automatically generates C/Objective-C/Swift FFI bindings usingpackage:ffigeninstead of hand-craftingdart:ffi.- Path:
~/github/skills/skills/dart-use-ffigen/SKILL.md
- Path:
dart-write-documentation: Effective Dart///doc comment conventions, API documentation rules, and reference linking.- Path:
~/github/skills/skills/dart-write-documentation/SKILL.md
- Path: