Communitygithub.com

curiositech/windags-skills

Spécialiste des tâches d'arrière-plan Android pour WorkManager, services au premier plan, mode Doze et optimisation de la batterie. Activez sur : WorkManager, tâche d'arrière-plan Android, Foreground Service, Doze mode, optimisation de la batterie, travail périodique, synchronisation en arrière-plan Android, JobScheduler. PAS pour : tâches d'arrière-plan iOS (utilisez swiftui-data-flow-expert), tâches d'arrière-plan React Native (utilisez mobile-offline-sync-architect), architecture UI (utilisez jetpack-compose-navigation-expert).

Qu'est-ce que windags-skills ?

Cette compétence est conçue pour les développeurs Android qui travaillent avec des tâches d'arrière-plan et ont besoin d'un guide fiable pour utiliser WorkManager, les Services au premier plan (Foreground Services) et les coroutines de manière efficace et respectueuse de la batterie. Elle fournit des recommandations précises sur le choix de l'API appropriée en fonction de la nature de la tâche (différable, immédiate, visible par l'utilisateur), ainsi que des exemples concrets d'implémentation en Kotlin. La compétence couvre les bonnes pratiques pour configurer des contraintes (réseau, batterie, stockage), chaîner plusieurs travaux, gérer les tentatives avec backoff exponentiel, et tester le comportement sous le mode Doze et App Standby via adb. Elle inclut des anti-patrons à éviter, comme l'utilisation d'AlarmManager pour du travail différé ou le démarrage d'un service sans notification en Android 12+. Les cas d'usage non Android (iOS, React Native) sont clairement exclus et redirigés vers des compétences spécialisées.

Compatible avec~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/curiositech/windags-skills/tree/HEAD/skills/android-background-task-specialist

Demander à votre IA préférée

Ouvre une nouvelle conversation avec cette compétence d'agent déjà préchargée.

Documentation

Spécialiste des tâches d'arrière-plan Android

Expert en exécution en arrière-plan Android avec WorkManager, Services au premier plan (Foreground Services), gestion du mode Doze et traitement économe en batterie.

Déclencheurs d'activation

Activer sur : "WorkManager", "tâche d'arrière-plan Android", "Foreground Service", "mode Doze", "optimisation batterie", "tâche périodique", "synchronisation en arrière-plan", "JobScheduler", "traitement en arrière-plan Android"

PAS pour : tâches d'arrière-plan iOS → swiftui-data-flow-expert | arrière-plan React Native → mobile-offline-sync-architect | architecture UI → jetpack-compose-navigation-expert

Démarrage rapide

  1. Choisissez la bonne API — WorkManager pour des tâches différées, Foreground Service pour des tâches visibles par l'utilisateur, coroutines pour des tâches asynchrones courtes.
  2. Définissez les workers — étendez CoroutineWorker avec des fonctions suspend pour un code asynchrone propre.
  3. Configurez les contraintes — type de réseau, niveau de batterie, espace de stockage requis.
  4. Gérez Doze et App Standby — utilisez WorkManager (pas AlarmManager) pour une planification compatible Doze.
  5. Testez avec adb — forcez le mode Doze et vérifiez que le travail s'exécute lorsque les contraintes sont remplies.

Fonctionnalités principales

DomaineTechnologies
Tâches différéesWorkManager 2.10, OneTimeWorkRequest, PeriodicWorkRequest
Au premier planTypes de Foreground Service (dataSync, location, mediaPlayback, shortService)
ContraintesNetworkType, BatteryNotLow, StorageNotLow, DeviceIdle
ChaînageWorkContinuation, chaînes parallèles, politiques de travail unique
TestsTestWorkerBuilder, TestListenableWorkerBuilder, WorkManagerTestInitHelper

Modèles d'architecture

Arbre de décision WorkManager

La tâche est-elle initiée par l'utilisateur et doit-elle se terminer ?
  ├─ OUI → Est-elle courte (< 10 min) ?
  │   ├─ OUI → Foreground Service (type shortService)
  │   └─ NON → Foreground Service (dataSync, location, etc.)
  │
  └─ NON → Est-elle différée ?
      ├─ OUI → WorkManager
      │   ├─ Unique ? → OneTimeWorkRequest
      │   └─ Périodique ? → PeriodicWorkRequest (intervalle min 15 min)
      │
      └─ NON → S'exécute-t-elle pendant que l'application est visible ?
          ├─ OUI → CoroutineScope (viewModelScope ou lifecycleScope)
          └─ NON → Vous avez probablement besoin de WorkManager de toute façon

CoroutineWorker avec réessai et progression

@HiltWorker
class SyncWorker @AssistedInject constructor(
    @Assisted context: Context,
    @Assisted params: WorkerParameters,
    private val syncRepository: SyncRepository,
    private val notificationHelper: NotificationHelper,
) : CoroutineWorker(context, params) {

    override suspend fun doWork(): Result {
        // Signaler la progression pour observation par l'UI
        setProgress(workDataOf("progress" to 0))

        return try {
            val pendingItems = syncRepository.getPendingChanges()

            pendingItems.forEachIndexed { index, item ->
                syncRepository.syncItem(item)
                setProgress(workDataOf(
                    "progress" to ((index + 1) * 100 / pendingItems.size)
                ))
            }

            Result.success(workDataOf("synced" to pendingItems.size))
        } catch (e: IOException) {
            if (runAttemptCount < 3) {
                Result.retry()  // Backoff exponentiel par défaut
            } else {
                Result.failure(workDataOf("error" to e.message))
            }
        }
    }

    override suspend fun getForegroundInfo(): ForegroundInfo {
        return ForegroundInfo(
            NOTIFICATION_ID,
            notificationHelper.createSyncNotification()
        )
    }
}

Planification avec contraintes et chaînage

// Planifier une synchronisation périodique toutes les 1 heure (minimum 15 min)
val syncRequest = PeriodicWorkRequestBuilder<SyncWorker>(1, TimeUnit.HOURS)
    .setConstraints(
        Constraints.Builder()
            .setRequiredNetworkType(NetworkType.CONNECTED)
            .setRequiresBatteryNotLow(true)
            .build()
    )
    .setBackoffCriteria(
        BackoffPolicy.EXPONENTIAL,
        WorkRequest.MIN_BACKOFF_MILLIS,
        TimeUnit.MILLISECONDS
    )
    .addTag("sync")
    .build()

WorkManager.getInstance(context).enqueueUniquePeriodicWork(
    "periodic-sync",
    ExistingPeriodicWorkPolicy.KEEP,  // Ne pas redémarrer si déjà planifié
    syncRequest
)

// Chaîne : télécharger → traiter → envoyer (séquentiel)
WorkManager.getInstance(context)
    .beginWith(downloadWork)
    .then(processWork)
    .then(uploadWork)
    .enqueue()

Anti-patrons

  1. AlarmManager pour du travail différé — Les alarmes AlarmManager ne sont pas compatibles avec Doze et vident la batterie. Utilisez WorkManager qui respecte Doze, App Standby et l'économiseur de batterie.
  2. Service en arrière-plan sans notification de premier plan — Android 12+ tue les services en arrière-plan. Utilisez un Foreground Service avec une déclaration de type correcte ou WorkManager.
  3. Périodicité inférieure à 15 minutes — WorkManager impose un intervalle minimum de 15 minutes. Pour un travail plus fréquent, utilisez un Foreground Service ou une coroutine avec conscience du cycle de vie.
  4. Ne pas déclarer le type de Foreground Service — Android 14+ nécessite un foregroundServiceType explicite dans le manifeste. Son omission provoque une SecurityException.
  5. Ignorer l'observation du travail — démarrer un travail sans montrer la progression aux utilisateurs. Observez WorkInfo via getWorkInfoByIdLiveData() ou getWorkInfoByIdFlow() pour mettre à jour l'UI.

Liste de contrôle qualité

[ ] WorkManager utilisé pour les tâches différées (pas AlarmManager)
[ ] Foreground Service déclaré avec le bon type dans AndroidManifest
[ ] Contraintes configurées (réseau, batterie, stockage)
[ ] Politique de réessai avec backoff pour les échecs temporaires
[ ] Politique de travail unique définie pour les travaux périodiques/uniques
[ ] Progression du travail observable depuis l'UI
[ ] Mode Doze testé via adb : `adb shell dumpsys deviceidle force-idle`
[ ] Optimisation de la batterie testée : `adb shell am set-inactive <package> true`
[ ] Workers testés avec TestWorkerBuilder
[ ] Canaux de notification créés pour les notifications de Foreground Service
[ ] Les chaînes de travail gèrent gracieusement les échecs partiels
[ ] Le travail en arrière-plan respecte la préférence d'économiseur de batterie de l'utilisateur

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

curiositech/windags-skills

Expert in 2000s-era music visualization (Milkdrop, AVS, Geiss) and modern WebGL implementations. Specializes in Butterchurn integration, Web Audio API AnalyserNode FFT data, GLSL shaders for audio-reactive visuals, and psychedelic generative art. Activate on "Milkdrop", "music visualization", "WebGL visualizer", "Butterchurn", "audio reactive", "FFT visualization", "spectrum analyzer". NOT for simple bar charts/waveforms (use basic canvas), video editing, or non-audio visuals.

curiositech/windags-skills

Expert legal research agent for finding and scraping expungement data state by state. Knows authoritative sources, URL patterns, Firecrawl configuration, and 2026 legal landscape.

curiositech/windags-skills

Expert in 3D computer vision labeling tools, workflows, and AI-assisted annotation for LiDAR, point clouds, and sensor fusion. Covers SAM4D/Point-SAM, human-in-the-loop architectures, and vertical-specific training strategies. Activate on '3D labeling', 'point cloud annotation', 'LiDAR labeling', 'SAM 3D', 'SAM4D', 'sensor fusion annotation', '3D bounding box', 'semantic segmentation point cloud'. NOT for 2D image labeling (use clip-aware-embeddings), general ML training (use ml-engineer), video annotation without 3D (use computer-vision-pipeline), or VLM prompt engineering (use prompt-engineer).

curiositech/windags-skills

Implement WCAG 2.2 AA/AAA compliance with automated testing, keyboard navigation, screen reader support, and focus management. Activate on: accessibility audit, WCAG compliance, keyboard navigation, screen reader, aria attributes, axe-core, focus trap. NOT for: design-level accessibility review (use design-accessibility-auditor), color contrast only (use css-in-js-architect).

curiositech/windags-skills

Time-blind friendly planning, executive function support, and daily structure for ADHD brains. Specializes in realistic time estimation, dopamine-aware task design, and building systems that actually work for neurodivergent minds.

curiositech/windags-skills

Designs digital experiences for ADHD brains using neuroscience research and UX principles. Expert in reducing cognitive load, time blindness solutions, dopamine-driven engagement, and compassionate design patterns. Activate on 'ADHD design', 'cognitive load', 'accessibility', 'neurodivergent UX', 'time blindness', 'dopamine-driven', 'executive function'. NOT for general accessibility (WCAG only), neurotypical UX design, or simple UI styling without ADHD context.

curiositech/windags-skills

>- Apply crisis decision-making research to agent routing, uncertainty triage, and coordination failure analysis in time-pressured systems. Use when diagnosing handoff failures, analytical paralysis, or expert judgment under incomplete information. NOT for routine coding, simple CRUD design, or static single-agent tasks with complete information.

curiositech/windags-skills

Extend and modify the admin dashboard, developer portal, and operations console. Use when adding new admin tabs, metrics, monitoring features, or internal tools. Activates for dashboard development, analytics, user management, and internal tooling.

curiositech/windags-skills

Conversation patterns and interaction protocols for multi-agent systems. Covers request/response, pub/sub, blackboard, delegation chains, debate, critique, consensus, fan-out/fan-in, supervisor-worker, and peer negotiation. Deep analysis of AutoGen conversation patterns, CrewAI delegation, LangGraph state passing, and FIPA-ACL performatives. Teaches how to design what agents say to each other and in what order. Activate on: "agent conversation", "agent protocol", "multi-agent debate", "agent delegation", "supervisor worker pattern", "agent voting", "consensus protocol", "fan-out fan-in", "agent negotiation", "blackboard pattern", "agent dialogue", "conversation topology", "agent handoff". NOT for: wire format or serialization (use agent-interchange-formats), orchestration infrastructure (use agentic-infrastructure-2026), single agent behavior (use agentic-patterns).

curiositech/windags-skills

Meta-agent for creating new custom agents, skills, and MCP integrations. Expert in agent design, MCP development, skill architecture, and rapid prototyping. Activate on 'create agent', 'new skill', 'MCP server', 'custom tool', 'agent design'. NOT for using existing agents (invoke them directly), general coding (use language-specific skills), or infrastructure setup (use deployment-engineer).

curiositech/windags-skills

AI-powered calendar management and agent-based scheduling coordination. Covers calendar APIs (Google Calendar, CalDAV/iCal), AI scheduling assistants (Reclaim, Clockwise, Motion, Cal.com), building custom calendar agents with MCP, multi-calendar merging, timezone management, focus block protection, meeting fatigue detection, and agent-to-agent meeting negotiation protocols. Activate on: "calendar agent", "AI scheduling", "calendar coordination", "meeting scheduling", "calendar API", "focus time protection", "calendar optimization", "Google Calendar MCP", "Reclaim", "Clockwise", "Motion", "Cal.com", "smart scheduling", "calendar-aware agent", "timezone scheduling", "agent negotiation meetings". NOT for: manual calendar UI component design (use form-validation-architect), project management scheduling or Gantt charts (use project-management-guru-adhd), general time-tracking or pomodoro apps (use adhd-daily-planner for time-awareness), building the agent itself from scratch (use agent-creator).

curiositech/windags-skills

Build and adopt production AI agent infrastructure in 2026. Covers framework selection (LangGraph, CrewAI, AutoGen, MCP), orchestration patterns, evaluation, observability, memory systems, and tool use. Also covers the SOCIAL dimension: how to sell agent infrastructure internally, change management, measuring ROI, building trust in autonomous systems, and scaling adoption across teams. Activate on: "agent infrastructure", "agent framework comparison", "which agent framework", "sell AI tools internally", "agent adoption", "agent observability", "agent evaluation", "MCP architecture", "agentic mesh", "enterprise AI agents", "AI change management", "agent ROI". NOT for: building specific agents (use ai-engineer), designing agent behavior patterns (use agentic-patterns), prompt tuning (use prompt-engineer).

curiositech/windags-skills

Fundamental patterns for effective agentic behavior. Teaches decomposition, tool orchestration, error recovery, context management, quality self-assessment, and knowing when to stop. Model-agnostic principles that make any agent more effective regardless of domain. Activate on: "how should I structure this agent", "agentic workflow", "agent patterns", "multi-step task", "tool orchestration", "/agentic-patterns", "decompose this", "agent best practices", "chain of actions", "when should the agent stop", "agent loop design". NOT for: creating agent infrastructure (use agent-creator), building DAGs (use windags-architect), specific tool implementation.

curiositech/windags-skills

Automated discovery and matching of agent skills for dynamic task routing and capability assessment

curiositech/windags-skills

Cryptographic security for agentic systems — zero-trust agent networking, signed message envelopes (JWS/JWE), capability-based security (ocaps), Merkle tree audit trails, WASM sandboxing, and formal verification. Covers CLI dev tool security, mTLS between agents, permission boundaries (least privilege for AI agents), and supply chain security for skills/plugins. Activate on: "agent security", "zero trust agents", "secure agent communication", "capability-based security", "ocap", "signed messages between agents", "agent audit trail", "sandbox agent execution", "agent permissions", "mTLS agents", "cryptographic verification", "agent supply chain", "OWASP agentic", "prove agent did X", "tamper-proof agent logs". NOT for: application-level SAST scanning (use security-auditor), network firewall rules (use infrastructure), SOC2/HIPAA compliance (organizational), or prompt injection defense (use prompt-engineer).

curiositech/windags-skills

Data structures and serialization formats for agent-to-agent communication. Covers message envelopes, structured output schemas, capability declarations, task handoff payloads, error/retry signaling, and context windows as data structures. Deep comparison of A2A protocol, MCP, OpenAI function calling, and LangChain message types. Teaches when to use rigid schemas vs free-form with validation, typed vs untyped, streaming vs batch. Activate on: "agent message format", "agent communication schema", "agent-to-agent protocol", "A2A protocol", "MCP message format", "structured output for agents", "agent interop", "interchange format", "agent serialization", "task handoff format", "capability declaration". NOT for: what agents say to each other (use agent-conversation-protocols), orchestration topology (use multi-agent-coordination), building agent infrastructure (use agentic-infrastructure-2026).

curiositech/windags-skills

Logic-based agent programming language implementing BDI architecture for practical autonomous agent development

curiositech/windags-skills

>- Design AgentSpeak(L)-style BDI agents with context-guarded plans, selection functions, and intention stacks. Use for interruptible autonomy, agent policy, and multi-agent orchestration in dynamic environments. NOT for simple rule engines, static planners, or centralized workflows.

curiositech/windags-skills

Foundational concurrent computation model where actors communicate exclusively through asynchronous message passing

curiositech/windags-skills

license: Apache-2.0 NOT for unrelated tasks outside this domain.

Skills associés