agentleFS
thienqothienqo/flutter-skills/skills/flutter-platform-integration/SKILL.md

flutter-platform-integration

Skill16 starsChanged 2 months agoBSD-3-ClauseView on GitHub

Implement or review Flutter platform channels, Pigeon APIs, FFI and build hooks, native plugin implementations, platform views, add-to-app boundaries, web interop, and native lifecycle integration. Use when Dart must communicate with native platforms; route reusable package APIs, federation, and publication readiness to flutter-package-development.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

10 rules. About 0 are common, 10 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈10

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Prefer an existing maintained plugin when it meets the requirement.

    line 8
  2. Distinctive:

    Use a package API for established cross-platform capabilities.

    line 14
  3. Distinctive:

    Use Pigeon or another typed generated contract when a multi-method channel benefits from compile-time structure.

    line 15
  4. Distinctive:

    Use a basic method/event channel for small, stable request/response or event surfaces.

    line 16
  5. Distinctive:

    Use FFI for suitable native C-compatible libraries and performance-sensitive calls.

    line 17
  6. Distinctive:

    Use platform views only when native view embedding is required and account for composition, gestures, accessibility, and performance.

    line 18
  7. Distinctive:

    Keep domain models outside the channel contract.

    line 20
  8. Distinctive:

    Read integration strategy when choosing among an existing package, channels or Pigeon, FFI, JS interop, and platform views.

    line 26
  9. Distinctive:

    Read plugin development when creating or evolving a reusable plugin package, federated implementation, platform interface, or …

    line 27
  10. Distinctive:

    Test the Dart adapter with fakes and the native implementation on every supported target.

    line 37

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Flutter Platform Integration

Prefer an existing maintained plugin when it meets the requirement. Write platform code when the capability is unavailable, product-specific, or requires a controlled native contract.

When asked to replace an adequate plugin the project already uses with custom native code, do not write the native code yet. Name what the current plugin already covers, ask which concrete requirement it fails (missing API, platform, behavior, license, or size), and recommend keeping it until that gap is known. When the gap is real, close it with the smallest change: a Dart wrapper, an upstream fix, or a narrow channel for the missing part only.

Choose the boundary

  • Use a package API for established cross-platform capabilities.
  • Use Pigeon or another typed generated contract when a multi-method channel benefits from compile-time structure.
  • Use a basic method/event channel for small, stable request/response or event surfaces.
  • Use FFI for suitable native C-compatible libraries and performance-sensitive calls.
  • Use platform views only when native view embedding is required and account for composition, gestures, accessibility, and performance.

Keep domain models outside the channel contract. Version or evolve messages compatibly, validate all values at the boundary, and map platform failures into actionable Dart errors.

flutter-media owns app-side capture, playback, livestream, call, and screen-share behavior using existing SDKs. Pair this skill when custom native implementation or platform integration is part of that work.

Load references conditionally

  • Read integration strategy when choosing among an existing package, channels or Pigeon, FFI, JS interop, and platform views.
  • Read plugin development when creating or evolving a reusable plugin package, federated implementation, platform interface, or multi-platform native API.

flutter-package-development owns reusable public APIs, package shape, compatibility, federation decisions, consumer quality, and publication readiness. Use both skills when package design and native implementation are material.

Lifecycle and platforms

Handle engine/activity/view-controller attachment, background/foreground changes, permission flow, cancellation, and multiple engine instances where applicable. Provide an explicit unsupported-platform behavior rather than a late missing-plugin crash.

Verification

Test the Dart adapter with fakes and the native implementation on every supported target. Verify error mapping, lifecycle reattachment, permissions, background behavior, and accessibility for embedded views.

Sources

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.