agentleFS
evolplusevolplus/talos/skills/flutter-platform-integration/SKILL.md

flutter-platform-integration

Skill9 starsChanged 6 months agoApache-2.0View on GitHub

Flutter native/platform integration guidance for FE Dev. Use when a task touches platform channels, plugins, permissions, flavors, dart-define config, deep links, push notifications, secure storage, app lifecycle, native iOS/Android files, or platform-specific behavior.

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

17 rules. About 0 are common, 14 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈14

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this for Flutter work that crosses the Dart/native boundary: platform channels, plugins, permissions, flavors, app config, deep links, …

    line 14
  2. Distinctive:

    Check authorization before changing platform capabilities:

    line 28
  3. Distinctive:

    if the requirement is absent, halt with an OQ instead of silently adding capability.

    line 30
  4. Distinctive:

    use SRS §3.4.6 keys and the existing config loader.

    line 32
  5. Very specific:

    keep dev/staging/prod endpoints out of Dart and native source literals.

    line 34
  6. Distinctive:

    Keep permission UX complete:

    line 35
  7. Distinctive:

    update iOS usage descriptions and Android permission declarations.

    line 36
  8. Distinctive:

    keep widgets independent of channel names and native file paths.

    line 41
  9. Distinctive:

    use typed DTOs for channel payloads and document nullable/error cases.

    line 42
  10. Distinctive:

    run at least one affected platform build/check when native files, plugins, flavors, or permissions change.

    line 44
  11. Very specific:

    test deep links, push/open flows, storage migration, channel error handling, or lifecycle paths on the relevant simulator/emulator/device.

    line 45
  12. Very specific:

    When you cannot build — operator-run build handoff: If your sandbox has no Flutter/Android/Xcode toolchain, a build-config, plugin, …

    line 47
  13. Distinctive:

    Do not add platform capabilities, permissions, plugins, or native APIs without SRS/architecture coverage.

    line 60
  14. Distinctive:

    Do not store tokens or secrets in plain local storage.

    line 61
  15. Distinctive:

    Do not hardcode environment endpoints in Dart, Gradle, Xcode, plist, or manifest files.

    line 62
  16. Distinctive:

    Do not mark a native/build-config change verified from a static read.

    line 63
  17. Distinctive:

    Do not let platform-channel errors disappear into generic UI failure.

    line 64

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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

When to use

Use this for Flutter work that crosses the Dart/native boundary: platform channels, plugins, permissions, flavors, app config, deep links, push notifications, background tasks, secure storage, lifecycle hooks, or iOS/Android-specific behavior. Load it alongside flutter-implementation.

Inputs and outputs

  • Inputs: SRS/architecture permission and platform requirements, API contracts, env configuration, existing Flutter plugin/channel setup, iOS/Android project files, current flavor/build configuration.
  • Outputs: platform changes that are approved by architecture, configured per environment, covered by smoke/build checks, and documented in task notes or deploy reports when QA/DevOps needs them.

Procedure

  1. Classify the integration:
    • package/plugin only;
    • MethodChannel/EventChannel/FFI/custom native code;
    • flavor/build-config change;
    • permission/deep-link/push/background lifecycle change.
  2. Check authorization before changing platform capabilities:
    • new plugins, permissions, background modes, associated domains, push services, and native APIs require architecture/dependency approval;
    • if the requirement is absent, halt with an OQ instead of silently adding capability.
  3. Implement environment-safe config:
    • use SRS §3.4.6 keys and the existing config loader;
    • pass non-secret values through the established --dart-define, flavor file, or build-time config path;
    • keep dev/staging/prod endpoints out of Dart and native source literals.
  4. Keep permission UX complete:
    • update iOS usage descriptions and Android permission declarations;
    • provide user-facing rationale/copy where required by the feature;
    • handle denied, restricted, unavailable, and recoverable states in UI.
  5. Isolate platform differences:
    • wrap platform calls behind services/repositories;
    • keep widgets independent of channel names and native file paths;
    • use typed DTOs for channel payloads and document nullable/error cases.
  6. Verify platform behavior:
    • run at least one affected platform build/check when native files, plugins, flavors, or permissions change;
    • test deep links, push/open flows, storage migration, channel error handling, or lifecycle paths on the relevant simulator/emulator/device;
    • record any platform that could not be checked.
  7. When you cannot build — operator-run build handoff. If your sandbox has no Flutter/Android/Xcode toolchain, a build-config, plugin, SDK-level or native change is unverified until someone else builds it. Do not describe a static read as "compatibility confirmed". Instead:

    • Read the failing component's own source before proposing a fix. For a plugin build error, open the plugin's android/build.gradle / ios/*.podspec in the package cache (~/.pub-cache/hosted/pub.dev/<pkg>-<ver>/) or the pub.dev archive. A plugin that hard-codes compileSdk 34 cannot be fixed from the app's Gradle files, and no amount of root-project override will make it so. Cite the file and line in the task notes.
    • Write the build handoff into the deploy report / task notes, so the operator's build can be checked against it — not just "run flutter build apk":
      • exact command, flavor and --dart-define-from-file used;
      • host prerequisites (sdkmanager "platforms;android-NN", Xcode/CocoaPods version, FVM pin);
      • release-signing check — the release build type must be signed with the registered key, not the debug fallback. Name how signing engages (env vars or android/key.properties) and give the verification: apksigner verify --print-certs build/app/outputs/flutter-apk/app-release.apk | grep SHA-1 must equal the SHA-1 registered for Google Sign-In / Firebase / Play. A debug-signed release builds and launches fine and then fails every Google sign-in with ApiException: 10;
      • the smoke the operator should run on the installed build (sign-in, the changed flow) and what "pass" looks like.
    • Propose ready-for-deploy with the verification explicitly marked operator-owed. A failed operator build is a reopen; the second one routes to diagnosis (orchestrator-operating-rules.md §9 Step 7.6), not to another speculative attempt.

    Why: a plugin that hard-codes its own compileSdk cannot be fixed from the app's Gradle files, and guessing from the error message costs an operator build per guess. Separately, a rebuild that silently falls back to debug signing installs and launches normally and then fails every Google sign-in — a handoff that names SDK prerequisites but not the signing check lets that ship.

Hard rules

  • Do not add platform capabilities, permissions, plugins, or native APIs without SRS/architecture coverage.
  • Do not store tokens or secrets in plain local storage.
  • Do not hardcode environment endpoints in Dart, Gradle, Xcode, plist, or manifest files.
  • Do not mark a native/build-config change verified from a static read. If you could not build it, say so and hand off the build with the checks in Procedure step 7.
  • Do not let platform-channel errors disappear into generic UI failure; map them to user-visible or logged failure states per architecture.

References

  • ../flutter-implementation/SKILL.md - baseline Flutter implementation discipline.
  • ../flutter-performance/SKILL.md - performance review for channel-heavy or platform-heavy changes.
  • ../third-party-dependency-evaluation/SKILL.md - dependency approval for plugins.
  • ../local-deployment/SKILL.md - deploy/env evidence consumed by QA.

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.