Install
$ agentstack add skill-lugassawan-swe-workbench-language-dart ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
Dart
Null safety
- Sound null safety is on by default (Dart ≥2.12) — no unsound nulls sneak through.
- Non-nullable is the default; append
?only when a value can genuinely be absent (String? name). latedefers initialization for values assigned before first read (DI fields,initStatefields) — alatefield read before assignment throws.!(null-assertion) asserts non-null; prefer narrowing (if (x != null)) or?./??over!, since!throws at runtime.??=for lazy default assignment;??for fallback expressions.
String greet(String? name) => 'Hello, ${name ?? 'stranger'}';
Async — Futures and Streams
Futurewraps a value that arrives later;async/awaitreads like sync code.- Unhandled Future errors surface as unhandled exceptions — always
try/catcharoundawait, or attach.catchError. Streammodels a sequence over time;await forconsumes it,StreamControllerproduces it.Completerbridges callback-based APIs into aFuture.Future.wait([...])for concurrent futures; don'tawaitsequentially in a loop when the work is independent.
Future fetchUser(String id) async {
try {
final res = await api.get('/users/$id');
return User.fromJson(res.data);
} on DioException catch (e) {
throw UserFetchException(id, e);
}
}
Widget composition
StatelessWidgetis the default; reach forStatefulWidgetonly when the widget owns mutable state across rebuilds.build()must be pure and fast — no side effects, no I/O; it can run many times per frame.- Compose small widgets instead of deep inheritance — extract a widget class, not a private
_buildX()method, when it needs its ownconstor rebuild boundary. constconstructors on leaf widgets let Flutter skip rebuilding subtrees whose inputs didn't change.- Pass a
Key(ValueKey,ObjectKey) when reordering or diffing a list of like-typed widgets, or state attaches to the wrong element.
State management — Riverpod and Bloc
- Riverpod:
Provider/NotifierProviderdeclares state outside the widget tree;ref.watch(p)subscribes and rebuilds,ref.read(p)reads once (event handlers, notbuild). - Bloc: a
Cubitexposes methods thatemitnew states; aBlocmaps incomingEvents toStates viaon. Widgets react viaBlocBuilder/BlocListener. - Both push state out of widgets and make it unit-testable without pumping a widget tree — pick per-team convention, don't mix them within the same feature.
final counterProvider = NotifierProvider(Counter.new);
class Counter extends Notifier {
@override
int build() => 0;
void increment() => state++;
}
Testing
flutter_test:testWidgets('description', (tester) async { ... })drives a widget in an isolated binding.tester.pumpWidget(...)mounts;tester.pump()advances one frame,tester.pumpAndSettle()drains animations/microtasks.find.text(...),find.byType(...),find.byKey(...)locate widgets; assert withexpect(find.text('X'), findsOneWidget).integration_testruns the same API on a real device/emulator for end-to-end flows.- Unit-test
Notifier/Cubit/Bloclogic directly — no widget tree needed.
Tooling
- Format:
dart format . - Lint/analyze:
dart analyze(package) orflutter analyze(app) — configured viaanalysis_options.yaml. - Dependencies: declared in
pubspec.yaml; resolved withdart pub get/flutter pub get. - Test:
flutter test(widget/unit),flutter test integration_test(e2e).
Idioms cheat sheet
finalovervarwhen the reference won't be reassigned;constwhen the value is compile-time constant.- Cascades (
obj..a()..b()) for fluent multi-call setup. - Named constructors (
User.fromJson(...)) beat factory functions with boolean flags. - Extension methods add behavior to existing types without subclassing.
- Records (
(int, String),({int id, String name})) for small ad-hoc multi-value returns, in place of a throwaway class.
Avoid
!as a habitual fix for the analyzer instead of proving non-null.- Business logic inside
build()— extract it into the state-management layer. - Deeply nested
setStatewidgets when aNotifier/Cubitwould isolate the rebuild. - Blocking synchronous work on the UI isolate — use
compute()or a separate isolate for CPU-heavy work.
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: lugassawan
- Source: lugassawan/swe-workbench
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.