Skip to content

feat: reshape the skill pack for Flutter mobile development - #1

Merged
apetroaeiandrei merged 35 commits into
mainfrom
feat/flutter-mobile-adaptation
Nov 2, 2026
Merged

apetroaeiandrei merged 35 commits into
mainfrom
feat/flutter-mobile-adaptation

Conversation

@apetroaeiandrei

Copy link
Copy Markdown
Owner

Repurposes this fork of addyosmani/agent-skills from web development to Flutter-only mobile development. 33 commits, 131 files, +5,647/-3,033.

This targets the fork's own main. It is deliberately not for upstream: it deletes upstream's web skills, which would be a hostile change there.

Renames

Web-specific assets are renamed rather than aliased — the fork owns the mapping, and no compatibility aliases are kept.

Before After
browser-testing-with-devtools flutter-devtools-and-device-testing
frontend-ui-engineering flutter-ui-engineering
web-performance-auditor mobile-performance-auditor
/webperf /perf-mobile

What changed

  • Device work goes through the Dart MCP server (dart mcp-server, bundled from Dart 3.9 / Flutter 3.35) and mobile-mcp. Chrome DevTools and browser workflows are gone. The new skill carries security boundaries for untrusted app output, device isolation, and cloud-device approval.
  • State and models standardize on Cubit and freezed — never Equatable, never hand-written ==/copyWith. freezed 3 syntax: sealed for unions, abstract for single-constructor models, with dart run build_runner build -d called out wherever staleness would bite.
  • Performance is rebuilt around frame budgets, cold start, memory, app size, and battery, with a metric-honesty rule in the auditor persona: static source analysis reports potential impact, never a measurement, and lab and field numbers are never mixed.
  • Security is rebuilt around the OWASP Mobile Top 10 and MASVS, on the premise that the client is in the attacker's hands — secure storage, pinning trade-offs, deep links, platform channels, obfuscation, manifest hardening, store privacy declarations.
  • CI/CD and shipping cover signing, build numbers, TestFlight and Play tracks, staged rollouts, and feature flags as the mobile rollback tool, since an installed app can't be recalled.
  • Personas (code-reviewer, test-engineer, security-auditor) gained Flutter checks; mobile-performance-auditor is new.
  • Backend examples (API contracts, SQL, caching, rate limiting, SSRF) stay in the backend's language and are labelled server-side.

Evals and fixtures moved with their skills; Dart fixtures replace the JS ones.

Verification

  • validate-skills, validate-commands, validate-reference-links, validate-artifact-paths, validate-versions — all pass
  • run-evals.js — 146 checks, 0 errors, 100% rank-1 trigger routing (94/94)

Review notes

The last commit (d6137aa) fixes three defects found in a review pass over the branch, all in copy-pasteable commands:

  • CI sharding used a 1-based matrix with --total-shards 3. --shard-index is 0-based and must be less than --total-shards, so the last job failed and shard 0 never ran — tests silently skipped while the matrix stayed green.
  • --analyze-size fails on Android without --target-platform. Flutter's own app-size docs omit the flag, which is how it slipped in.
  • flutter-version-file: pubspec.yaml needs an exact version and rejects the range syntax environment: normally holds.

Known overlap if any of this is ever floated upstream: open PRs addyosmani#580 and addyosmani#579 refactor performance-optimization and security-and-hardening, both rewritten here.

🤖 Generated with Claude Code

apetroaeiandrei and others added 30 commits September 19, 2026 10:08
Rename browser-testing-with-devtools to flutter-devtools-and-device-testing
and rewrite it around Flutter DevTools, the Dart MCP server, and mobile-mcp.
Update cross-references, commands, docs, evals, and fixtures.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Rename web-performance-auditor to mobile-performance-auditor and /webperf
to /perf-mobile. Rewrite the audit scope around Flutter frame rendering,
lists, raster/shaders, images, isolates, startup, memory, network, app size,
and battery. Replace Lighthouse/CrUX artifacts with DevTools captures,
TimelineSummary, trace-startup, analyze-size, and Play/Organizer vitals.
Extend the metric-honesty rule to debug-mode and emulator numbers.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Rewrite the skill around Flutter widget architecture (Page/View split,
widget classes over helper methods), Bloc/Cubit state management,
go_router navigation, Material 3 theming, Semantics-based accessibility,
adaptive layout, and Cubit optimistic updates. Update the eval case and
fixture, and all cross-references.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Replace Equatable guidance with freezed: sealed classes for unions,
abstract classes for single-constructor models per the freezed docs,
and a required build_runner step after any freezed change. Update the
performance auditor, eval fixture, red flags, and verification items.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Replace Core Web Vitals, Lighthouse/RUM, image, React, and bundle guidance
with Flutter equivalents: frame budgets, profile-mode measurement on real
devices, startup, lists, rebuild scope, UI-isolate work, image decoding,
memory leaks, and app size. Keep the backend query and cache sections.
Rework the regression guard around integration_test timeline budgets and
--analyze-size, port the eval fixture to Dart, and update the eval case.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Reframe around the untrusted-client threat model and OWASP MASVS / Mobile
Top 10. Add secure storage, auth and biometrics, TLS and pinning, deep
links/WebViews/platform channels, secrets and binary protections, release
manifest hardening, cryptography, mobile privacy requirements, and pub
supply-chain hygiene. Drop XSS/CSP/CORS/cookie guidance and keep the
backend patterns (injection, SSRF, uploads, rate limiting) as server side.
Add a Flutter eval and fixture.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Rework the TDD skill around flutter_test/package:test: stack discovery
for Flutter vs pure Dart, build_runner before tests, Dart RED/GREEN and
Prove-It examples, a Flutter test pyramid, and a testing toolkit covering
bloc_test, widget, golden, and integration_test tests. Replace the browser
DevTools section with a pointer to device verification. Rewrite
references/testing-patterns.md for Dart/Flutter, port the eval fixture to
a pure Dart package, and update the test commands.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Rework the quality gate pipeline around pub, build_runner, dart format,
flutter analyze, flutter test, and per-platform builds. Add emulator
integration tests, versioning and code signing, a tag-driven release
workflow with Fastlane, staged store rollouts, feature flags as the
mobile rollback tool, flavors and bundle IDs, and Flutter-aware CI
optimization. Port the eval fixture to a Flutter project and update the
eval case.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Rework the pre-launch checklist and add store-readiness sections for the
App Store and Google Play. Replace deploy-and-rollback assumptions with
staged/phased rollouts, feature flags as kill switches, minimum-version
gates, and backward-compatible backends. Adapt monitoring to crash-free
rate, ANRs, cold start, and store signals, add Flutter error reporting,
and replace the rollback template with a recovery plan. Update the /ship
command, eval fixtures, and eval case.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Add the mobile client half: a Telemetry interface, app-version tagging,
explicit names instead of obfuscated runtimeType, crash/ANR/non-fatal
reporting across Flutter, async, isolate, Bloc, and native paths with
breadcrumbs and per-release symbols, consent-aware offline-safe analytics,
client metrics, client-to-server trace propagation, and version-scoped
alerts and runbooks. Keep the backend logging, RED/USE, tracing, and
alerting guidance. Update the checklist reference, eval fixtures, and eval.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…rlap

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Add app-to-backend contract guidance: additive-only changes and tolerant
readers for long-lived old app versions, client-friendly error semantics
and an unsupported-version signal, cursor pagination, persisted idempotency
keys, and a Designing for Mobile Clients section. Add Dart interface
patterns (repository contracts, freezed unions, DTO vs domain models,
extension-type IDs) alongside the server-side TypeScript patterns.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Add device-, lifecycle-, and release-build-dependent reproduction paths,
crash-report symbolication, and Flutter layer localization (widget, Cubit,
platform/plugin, build tooling). Replace npm and browser triage with
flutter test, build_runner, Gradle/CocoaPods, and common Flutter runtime
errors. Use Dart examples, state-based graceful degradation, and treat
device logs and crash reports as untrusted. Port the eval fixture to Dart.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Add a Deprecation and Migration on Mobile section: measuring usage by app
version before removal, prompt-then-force minimum version and OS bumps,
on-device data migrations that are tested from every supported version and
safe to interrupt, Dart @deprecated and dart fix data-driven fixes, adapter
migrations behind repository interfaces, and Flutter/Dart/package upgrade
discipline. Update rationalizations, red flags, and verification.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Add per-axis Flutter review prompts (async gaps, disposal, all states,
freezed and codegen, layering, plugin wrappers, both-platform evidence),
adapt performance, dependency, dead-code, sizing, and checklist sections
to Flutter and pub, and update the /review commands. Replace the eval
diff with a Flutter search-screen diff carrying typical Flutter and
security findings.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…mmit

The previous commit removed the old fixture but the new user_search.diff
was not written, leaving the code-review eval failing. Add the fixture.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Convert the clarity examples to Dart, add a Dart section (null fallbacks,
collection-if and spread, switch expressions over sealed types) and a
Flutter Widgets section (Container to Padding/SizedBox, helper methods to
widget classes) in place of React/JSX, and extend behavior preservation to
rebuild behavior, accessibility, lifecycle, and platform branches. Add
Chesterton's Fence cases for mounted, dispose, Key, and Semantics, warn
against simplifying generated files, and port the eval fixture to Dart.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Detect the Flutter/Dart SDK and resolved package versions from pubspec.yaml
and pubspec.lock, read docs for the resolved version rather than the latest
README, and replace the source hierarchy with docs.flutter.dev, api.flutter.dev,
dart.dev, package changelogs, and platform standards. Use freezed 3 and
PopScope examples, treat package READMEs as untrusted content, and add
guidance on project conventions versus documentation. Replace the eval
fixture with a Flutter task and pubspec.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Replace the web/ARIA checklist with TalkBack and VoiceOver, Semantics,
focus and switch access, touch targets and gestures, text scaling and
reduced motion, forms, and localization/RTL. Add Flutter patterns
(IconButton tooltips, MergeSemantics, live regions, dialogs), widget-test
accessibility guidelines, platform testing tools, and a Flutter
anti-pattern table.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Replace Core Web Vitals, TTFB, and the web frontend checklist with mobile
targets, startup diagnosis, and a Flutter app checklist (frame rendering,
lists, raster, images, isolates, startup, memory, network, app size,
battery). Replace Lighthouse and bundle commands with profile-mode,
trace-startup, analyze-size, and platform tooling. Keep the backend,
query-plan, index, pooling, and caching sections, and update the
anti-pattern table.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Reframe around an untrusted client and OWASP MASVS / Mobile Top 10. Replace
cookie sessions, security headers, and CORS with authentication and
sessions for mobile, secure storage and communication, deep-link and
WebView input validation, platform configuration and permissions, and
secrets and binary protections. Add a Dart destructive-path guard and a
pub supply-chain checklist, keep the JavaScript package-manager and
install-script matrices for backend repositories, and add the OWASP
Mobile Top 10 table.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Add Flutter verification and analyze/format/codegen expectations, and a
Mobile section covering both platforms and real devices, screen states,
accessibility, adaptive layout, backend and data compatibility with old app
versions, and permission and SDK review. Reword rollback as a recovery path.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Add Flutter-specific prompts to each review dimension (async gaps and
disposal, screen states, widget classes, layering, freezed and codegen,
secure storage, rebuilds and lazy lists) and extend the verification story
with analyze/format, generated code, and both-platform UI evidence.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Add Flutter test levels (unit, bloc_test, widget, golden, repository,
integration_test with patrol), stack and codegen discovery, Dart test
structure, screen-state, lifecycle, accessibility, and platform scenarios,
and rules on fakes over mocks, emitted-state assertions, golden review,
and deterministic time.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Reframe around an untrusted client and the OWASP Mobile Top 10 / MASVS.
Replace cookies, CSP, CORS, XSS, and CDN checks with token storage and
mobile auth, deep links and WebViews, platform configuration, secrets and
binary protections, and plugin and SDK supply chain. Add an attack
precondition to findings, adapt severity examples, and require server-side
enforcement for anything that matters. Update the agent descriptions in
the README and docs.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Replace web tooling (Lighthouse, axe, size-limit, tsc) with Flutter gates:
flutter analyze and dart format, flutter test --coverage, widget-test
accessibility guidelines, integration_test frame timelines, --trace-startup,
and --analyze-size, with backend tools kept for the API. Reword the
URL-based checks as device-based, adapt the floor and guard moves to Dart
suppressions (ignore, coverage:ignore), UnimplementedError, and skip, add a
Makefile check script, update sane defaults, and extend the floor-guard
patterns and the /constraints commands. Verified the guard against a
scratch Dart diff.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Replace the React/Node CLAUDE.md example with a Flutter one (fvm-pinned
SDK, Cubit and freezed conventions, analyze/test/build_runner commands,
package and schema boundaries), convert the selective-include, project-map,
error-output, and summary examples to Dart paths, and swap the Chrome
DevTools MCP row for the Dart and Flutter MCP server and mobile-mcp.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Convert the assumptions, commands, and project structure examples to a
Flutter iOS and Android app, and add the mobile questions a spec should
settle before planning: targets and minimum OS versions, offline and sync,
permissions and privacy, accessibility and adaptivity, backend
compatibility with released versions, and store release.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Convert the commit message and change summary examples to Dart, replace
the npm/lint-staged pre-commit hygiene with dart format, flutter analyze,
build_runner, and flutter test plus a Lefthook example, update the
generated-files and .gitignore guidance for pubspec.lock, generated Dart,
build output, and signing material, and add the build name and build
number distinction to versioning.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Convert the inline comment examples to Dart, replace TSDoc with Dartdoc
guidance (doc comments, symbol links, dart doc, widget docs, the
public_member_api_docs lint), keep OpenAPI for the backend API, and update
the README example for a Flutter project (fvm, flutter doctor, build_runner,
flavors and dart-define config, and build commands).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
apetroaeiandrei and others added 5 commits September 19, 2026 11:51
…ideation skills

Use app and repository wording in contract-first slicing and the task
dependency graph, Dart file paths in task and note examples, and add
flutter test to the listed test commands.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Add a Flutter Mobile Fork section to the README (what changed, renamed
items, assumed conventions, and how to use the fork) and a Flutter fork
conventions section to CLAUDE.md. Update the Copilot, Cursor, and
skill-anatomy examples to Flutter commands and globs, and use Flutter doc
URLs in the source-driven cache docs, noting that pub.dev pages emit no
validators and are never cached.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Three defects found while reviewing the mobile adaptation, all in
copy-pasteable commands:

- The CI sharding example used a 1-based matrix (`shard: [1, 2, 3]`) with
  `--total-shards 3`. `--shard-index` is 0-based and must be less than
  `--total-shards`, so the last job failed outright and shard 0 never ran,
  silently skipping those tests while the rest of the matrix stayed green.
- `--analyze-size` fails on Android without `--target-platform`: "Cannot
  perform code size analysis when building for multiple ABIs". Flutter's own
  app-size docs omit the flag, which is how it slipped through. Fixed in four
  command blocks and noted that the ABI must be pinned consistently for
  baseline comparisons to mean anything.
- `flutter-version-file: pubspec.yaml` requires an exact version and rejects
  a range, which is the usual `environment:` idiom.

Validators and evals pass: 25 skills, 9 commands, reference links, artifact
paths, version manifests, and 146 eval checks at 100% rank-1 routing.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Findings from a second review pass over the branch.

The optimistic-update example in flutter-ui-engineering emitted after an
await with no isClosed guard, which throws "Bad state: Cannot emit new
states after calling close" when the user navigates away mid-request.
Reproduced against bloc 9. Three other files already told reviewers to
flag exactly this (code-review-and-quality, performance-checklist,
mobile-performance-auditor), but the skill that teaches Cubits never
stated the rule, so the canonical example contradicted the review lens.
Guards the example and adds the rule to the Cubit rules and Red Flags.

The same View discarded the message its failure state carries. It now
renders it, with a note that the message must be user-facing and mapped
in the Cubit, so this doesn't teach leaking exception text to the UI.

--analyze-size cannot be combined with --split-debug-info, so the app-size
gate cannot run inside the release job, and the size it reports is not the
shipped size. Says so in both skills, marks the measurement artifact as
not-for-upload, and restores the APK form dropped in d6137aa.

Validators, evals (146 checks, 100% rank-1), and the five unit suites
(45 assertions) all pass.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…ording

Marketplace, plugin manifests, workflow, and install docs now reference
apetroaeiandrei/agent-skills and the flutter-agent-skills marketplace
name, so a marketplace install no longer pulls the upstream web skills.
Upstream credit, issue links, and license are unchanged.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@apetroaeiandrei
apetroaeiandrei merged commit 2a58b5f into main Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant