agentleFS
thiennc-tesoglobalthiennc-tesoglobal/flutter-skills/skills/flutter-background-execution/SKILL.md

flutter-background-execution

Skill16 starsChanged 2 months agoBSD-3-ClauseView on GitHub

Implement, debug, or verify Flutter work that must continue or be scheduled after the app leaves the foreground, including OS-scheduled jobs, foreground services, and headless callbacks. Use for persistent background execution; route in-process async or CPU work to dart-concurrency and notification delivery to flutter-notifications.

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

8 rules. About 0 are common, 7 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Treat background execution as an operating-system contract, not a Dart timer that is guaranteed to keep running.

    line 8
  2. Very specific:

    Keep work in dart-concurrency when it only needs to run while the app process is alive.

    line 16
  3. Distinctive:

    Use an OS-backed scheduler for deferrable work that must survive the visible app.

    line 17
  4. Distinctive:

    Use a user-visible foreground or continued-processing mode only when the platform permits the use case and its disclosure, permissions, and …

    line 18
  5. Distinctive:

    Do not add a scheduling package by default.

    line 22
  6. Distinctive:

    Read Android scheduling and services for WorkManager, foreground services, exact alarms, reboot behavior, or Android permissions.

    line 26
  7. Distinctive:

    Read Apple background tasks for BGTaskScheduler, refresh/processing work, expiration, capabilities, or iOS scheduling expectations.

    line 27
  8. Distinctive:

    Read headless execution and reliability for callback dispatchers, isolates, plugin access, retries, deduplication, or durable progress.

    line 28

≈ “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 Background Execution

Treat background execution as an operating-system contract, not a Dart timer that is guaranteed to keep running. Preserve the project's scheduler or plugin when it satisfies the requirement; inspect pubspec.yaml, SDK constraints, target platforms, native capabilities, and existing registration before changing it.

Define the job

Record the trigger, acceptable delay, maximum duration, survival across process death or reboot, network/power constraints, user visibility, cancellation, and what should happen after sign-out or data deletion. Separate “must eventually run” from “must run at an exact time”; mobile schedulers are commonly opportunistic.

Choose the owner

  • Keep work in dart-concurrency when it only needs to run while the app process is alive.
  • Use an OS-backed scheduler for deferrable work that must survive the visible app.
  • Use a user-visible foreground or continued-processing mode only when the platform permits the use case and its disclosure, permissions, and limits are satisfied.
  • Route exact user reminders and notification delivery to flutter-notifications.
  • Route a custom native scheduler bridge or reusable plugin implementation to flutter-platform-integration.

Do not add a scheduling package by default. Verify platform coverage, maintenance, target SDK support, callback model, and the repository's existing dependencies first.

Load details conditionally

  • Read Android scheduling and services for WorkManager, foreground services, exact alarms, reboot behavior, or Android permissions.
  • Read Apple background tasks for BGTaskScheduler, refresh/processing work, expiration, capabilities, or iOS scheduling expectations.
  • Read headless execution and reliability for callback dispatchers, isolates, plugin access, retries, deduplication, or durable progress.

Verification

Test the job body behind a platform-free boundary, including success, retryable failure, permanent failure, cancellation, duplicate delivery, and stale identity. Then verify the native registration and lifecycle on every supported target: backgrounding, process termination, constraints, expiration or timeout, rescheduling, reboot when promised, and sign-out cleanup. Report actual device and lifecycle evidence; a successful direct function call does not prove OS scheduling.

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.