debouncing-strategies

Implements debouncing and throttling policies for offline insights and local notifications in Kotlin Android apps.

Updated May 9, 2026
One-click install
npx skills add https://github.com/Bumh3rr/solvyx-app --skill debouncing-strategies-bumh3rr
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: debouncing-strategies
Source: https://github.com/Bumh3rr/solvyx-app/tree/main/.opencode/skill/debouncing-strategies
Command: npx skills add https://github.com/Bumh3rr/solvyx-app --skill debouncing-strategies-bumh3rr

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Offline insight engines can overwhelm users with too many banners, notifications, and reminders. This Skill defines frequency caps, quiet hours, and per-type cooldowns so an Android app respects user attention instead of saturating it. ## Core Features & Use Cases - Temporal debouncing: Kotlin decision functions that enforce minimum intervals (e.g., 72h between automatic insights, 24h when the user opts into more) backed by DataStore timestamps. - Quiet hours and user preferences: Preference models for enabling/disabling insights, requesting more or fewer, and blocking delivery during configurable nighttime windows. - Notification throttling and prioritization: A daily notification counter with priority rules (Bitácora > Rutina > Insight), plus per-insight-type 7-day cooldowns and feedback-driven rule disabling. - Use Case: When building a journaling or wellness app that surfaces offline-generated insights, apply these policies so the user sees at most a few well-timed insights per week instead of one after every log entry. ## Quick Start Apply the debouncing strategies skill to configure how often insights, banners, and local notifications are shown to the user.

Frequently Asked Questions about debouncing-strategies

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I debounce insights or notifications in a Kotlin Android app?▼

Store the last-shown timestamp in DataStore and compare elapsed hours against a minimum interval before emitting. A decision function returns true on first run, then only after the configured interval (e.g., 72 hours) has passed.

How to implement quiet hours for local notifications on Android?▼

Read the current hour from a Calendar instance and check it against user-configured start and end hours, handling ranges that wrap past midnight. If the current time falls inside quiet hours, suppress the insight or notification regardless of other rules.

How do I limit local notifications per day in Android?▼

Keep a daily counter and date string in DataStore, incrementing on each send and resetting when the date changes. Block new notifications once the daily cap (for example 3) is reached, and prioritize competing types such as journal reminders over insights.

Should I use Handler.postDelayed or WorkManager for scheduled notifications?▼

Use WorkManager or coroutines instead of Handler.postDelayed, since Handler timers are less robust across process death and app restarts. The skill explicitly lists Handler.postDelayed as an anti-pattern for this use case.

Why should timestamps be compared as Long instead of Date objects?▼

Comparing raw Long millisecond values avoids timezone and locale errors that Date comparisons can introduce. Convert elapsed milliseconds to hours or days with TimeUnit for interval checks.

How can user feedback reduce unwanted insights automatically?▼

Record 'not useful' feedback per insight type in a local database and disable a rule after repeated negative marks, such as three within 30 days. Also reduce frequency automatically when users consistently ignore insights.