notifications
Skill15 starsChanged 9 months agoMITView on GitHub
Android notifications for AI agents. Use this skill whenever implementing push notifications, local notifications, notification channels, FCM (Firebase Cloud Messaging), notification styles (BigText, BigPicture, Inbox), notification actions, notification groups, notification importance, foreground services with notifications, notification permission (Android 13+), deep link from notification, PendingIntent, NotificationCompat, WorkManager notifications, or any notification in Android.
7 other projects use a version of this.
Adopted by
Most recently taken up by
- rlajous/claude-code-commandstheir own version, first seen Aug 28, 2026
- gaganjainse/shesh-skillstheir own version, first seen Aug 15, 2026
- Happy-Technologies-LLC/happy-platform-skillstheir own version, first seen Jul 28, 2026
- vellum-ai/vellum-assistanttheir own version, first seen Jul 8, 2026
- moasq/ios-dev-agenttheir own version, first seen May 26, 2026
- hkarpinen/agent-skillstheir own version, first seen Apr 15, 2026
Other versions7 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 7
- vellum-ai/vellum-assistant★ 1.4ksame name
- Happy-Technologies-LLC/happy-platform-skills★ 40same name
- rlajous/claude-code-commands★ 30same name
- moasq/ios-dev-agent★ 4same name
- montagao/skills★ 2same name
- hkarpinen/agent-skills★ 1same name
- gaganjainse/shesh-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository27 other files it gives its agents.
- AGENTS.mdAGENTS.md
- accessibilitySkill
- adaptive-uiSkill
- android-architectureSkill
- android-setupSkill
- android-testingSkill
- biometricsSkill
- ci-cd-androidSkill
- compose-animationSkill
- compose-navigationSkill
- compose-uiSkill
- datastoreSkill
- design-systemSkill
- design-tokensSkill
- firebaseSkill
- gradleSkill
- hilt-diSkill
- kotlin-patternsSkill
- material3Skill
- offline-firstSkill
- performanceSkill
- permissionsSkill
- play-store-releaseSkill
- retrofitSkill
- room-databaseSkill
- securitySkill
- supabase-androidSkill
The file
Files
Android Notifications
Rule 1: Always create channels before posting (Android 8+)
// ✅ Channel setup — do this in Application.onCreate()
class MyApplication : Application() {
override fun onCreate() {
super.onCreate()
createNotificationChannels()
}
private fun createNotificationChannels() {
val channels = listOf(
NotificationChannelCompat.Builder(
NotificationChannels.MESSAGES,
NotificationManagerCompat.IMPORTANCE_HIGH
).apply {
setName("Messages")
setDescription("Direct messages from other users")
setVibrationEnabled(true)
setLightsEnabled(true)
}.build(),
NotificationChannelCompat.Builder(
NotificationChannels.UPDATES,
NotificationManagerCompat.IMPORTANCE_DEFAULT
).apply {
setName("Updates")
setDescription("App updates and announcements")
}.build(),
NotificationChannelCompat.Builder(
NotificationChannels.BACKGROUND_SYNC,
NotificationManagerCompat.IMPORTANCE_MIN
).apply {
setName("Background sync")
setDescription("Silent background sync status")
}.build()
)
NotificationManagerCompat.from(this).createNotificationChannelsCompat(channels)
}
}
object NotificationChannels {
const val MESSAGES = "messages"
const val UPDATES = "updates"
const val BACKGROUND_SYNC = "background_sync"
}Rule 2: NotificationCompat — correct builder pattern
// ✅ Full notification with actions and deep link
class NotificationHelper @Inject constructor(
@ApplicationContext private val context: Context
) {
private val notificationManager = NotificationManagerCompat.from(context)
fun showMessageNotification(
id: Int,
senderName: String,
messagePreview: String,
conversationId: String
) {
// Deep link PendingIntent
val intent = Intent(context, MainActivity::class.java).apply {
flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK
putExtra("conversation_id", conversationId)
}
val pendingIntent = PendingIntent.getActivity(
context, id, intent,
PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE
)
// Reply action
val replyInput = RemoteInput.Builder("reply_text")
.setLabel("Reply...")
.build()
val replyIntent = Intent(context, NotificationReceiver::class.java).apply {
action = "REPLY"
putExtra("notification_id", id)
putExtra("conversation_id", conversationId)
}
val replyPendingIntent = PendingIntent.getBroadcast(
context, id, replyIntent,
PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_MUTABLE // MUTABLE required for RemoteInput
)
val replyAction = NotificationCompat.Action.Builder(
R.drawable.ic_reply, "Reply", replyPendingIntent
).addRemoteInput(replyInput).build()
val notification = NotificationCompat.Builder(context, NotificationChannels.MESSAGES)
.setSmallIcon(R.drawable.ic_notification)
.setContentTitle(senderName)
.setContentText(messagePreview)
.setStyle(NotificationCompat.BigTextStyle().bigText(messagePreview))
.setContentIntent(pendingIntent)
.addAction(replyAction)
.setAutoCancel(true)
.setPriority(NotificationCompat.PRIORITY_HIGH)
.setCategory(NotificationCompat.CATEGORY_MESSAGE)
.setVisibility(NotificationCompat.VISIBILITY_PRIVATE) // hide on lock screen
.build()
if (ActivityCompat.checkSelfPermission(context, Manifest.permission.POST_NOTIFICATIONS)
== PackageManager.PERMISSION_GRANTED) {
notificationManager.notify(id, notification)
}
}
fun cancel(id: Int) = notificationManager.cancel(id)
fun cancelAll() = notificationManager.cancelAll()
}Rule 3: Foreground service notification
// ✅ Required notification for foreground services
class DownloadService : Service() {
private val notificationId = 100
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
startForeground(notificationId, buildProgressNotification(0))
return START_STICKY
}
fun updateProgress(progress: Int) {
NotificationManagerCompat.from(this).notify(notificationId, buildProgressNotification(progress))
}
private fun buildProgressNotification(progress: Int) =
NotificationCompat.Builder(this, NotificationChannels.BACKGROUND_SYNC)
.setSmallIcon(R.drawable.ic_download)
.setContentTitle("Downloading...")
.setProgress(100, progress, progress == 0)
.setOngoing(true) // can't be dismissed by user
.setSilent(true)
.build()
}Common Mistakes
❌ Not creating channel before posting — notification silently dropped on Android 8+
❌ FLAG_MUTABLE on PendingIntent without RemoteInput — security vulnerability
❌ FLAG_IMMUTABLE on PendingIntent with RemoteInput — reply won't work
❌ Not checking POST_NOTIFICATIONS permission on Android 13+
❌ Hardcoded notification IDs — use consistent ID per notification type, not random
❌ No setAutoCancel(true) — notification stays after user taps it
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
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.

