mcpbeat

Android Background Work

hoangnguyen0403/android-background-work

Implement WorkManager and background processing correctly on Android. Use when creating Worker classes, scheduling tasks, choosing between WorkManager and Foreground Services, or setting up Hilt in workers; defer FCM and notification delivery to android-notifications.

1k tokens
context cost
the whole folder, loaded on every use
3
files
instructions only
0
copies elsewhere
how many repositories repackaged it
536
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/HoangNguyen0403/agent-skills-standard --skill android-background-work

What comes with it

4 402 bytes besides the instruction
evals/evals.json
references/implementation.md

The instruction itself

7 sections, as written by the author

Android Background Work Standards

Priority: P1 (HIGH)

Implementation Guidelines

WorkManager

  • CoroutineWorker: Use for all background tasks.
  • Constraints: explicit (Require Network, Charging).
  • Hilt: Use @HiltWorker for DI integration. Inject dependencies via @AssistedInject constructor; bind with HiltWorkerFactory in WorkManager configuration.

Foreground Services

  • Only When Necessary: Use generating visible notifications only for tasks user actively aware of (Playback, Calls, Active Navigation). Otherwise use WorkManager.

Anti-Patterns

  • No IntentService: Deprecated. Use WorkManager for all background tasks.
  • No Short Background Jobs: Use Coroutines in ViewModel scope instead.

References

  • Worker Template

How to use it

Copy the folder

Take hoangnguyen0403/android-background-work from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.