appfunctions
Ce qu’il fait
Ce skill examine une application Android pour trouver les tâches courantes des utilisateurs, comme créer une note ou lire un média, et les transforme en AppFunctions. Une fois exposées, les agents IA et les commandes vocales peuvent les exécuter sans ouvrir l'application. Il s'adresse aux développeurs Android qui veulent que leur application fonctionne avec les agents système.
Quand l’utiliser
- ✓Quand vous voulez que des agents IA ou des commandes vocales créent une note ou lisent un média dans votre application Android.
- ✓Quand vous voulez identifier les actions de votre application qui valent la peine d'être exposées aux agents système.
- ✓Quand vous avez besoin de code Kotlin et de descriptions claires pour que les agents choisissent et appellent correctement vos fonctions.
Lien du skill
https://github.com/android/skills/blob/main/device-ai/appfunctions/SKILL.mdCopiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.
Comment l’utiliser
Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.
Message prêt à coller
Pour Claude Code, Codex ou Cursor : lancez-la dans le dossier du projet et le skill est installé.
Téléchargez le SKILL.md et placez-le dans le dossier de skills de votre agent.
Exemple de demande à votre IA
“Trouve les tâches principales de mon application Android que je devrais exposer comme AppFunctions pour les agents IA.”
5 nouveaux skills par semaine. 1 minute de lecture.
Comment ça marche
Le skill analyse l'application pour trouver les parcours utilisateurs, puis écrit du code Kotlin avec la bibliothèque androidx.appfunctions. Il améliore aussi les descriptions pour que les agents comprennent quand utiliser chaque fonction.
Contenu technique (SKILL.md original)
Texte original de l’auteur, en anglais, directement depuis GitHub.
Analyzes Android apps to identify key user workflows to expose as AppFunctions, such as creating a note, playing media, or sending a message, for AI agents, voice commands, and system shortcuts to run without opening the app UI.
Generates Kotlin code to expose these workflows to the Android system, allowing agents to discover and execute them on-device.
Also refines KDoc documentation and the app description so AI agents correctly understand and use the provided functionality.
Prerequisites
The app must targetSdk 36 or newer and use compileSdk 37 or newer as
AppFunctions, part of the Android platform API, are available from Android 16
onwards.
Always use the Jetpack library because it handles backward compatibility.
Use androidx.appfunctions:appfunctions and the KSP compiler
androidx.appfunctions:appfunctions-compiler, version 1.0.0-beta01 or later.
Workflows
This skill enables the caller to discover features that will be provided to system agents, implement these with AppFunctions, improve function description for agents, and use ADB commands for local evaluation and testing.
The full AppFunction development flow consists of these four steps:
- Step 1: Discovery: Analyze Android codebases to identify and recommend potential AppFunctions. Use this step when a user asks to "discover AppFunctions," "find features for AI," or "analyze my app for agentic tools."
- Step 2: Implementation and configuration: Generate Kotlin implementations of AppFunctions, manage system-wide configuration, and configure build dependencies. Use this step when a user asks to "implement AppFunctions," "set up the AppFunctions framework," or "configure Hilt for AppFunctions."
- Step 3: KDoc refinement: Optimize AppFunction KDoc and the app description for AI agents and Model Context Protocol. If a user asks to "write KDoc", "optimize for MCP", or "refactor tool descriptions for LLMs", use this step.
- Step 4: Testing and debugging: Provide commands to interact with AppFunctions using ADB for testing and debugging. If a user wants to "list app functions", "invoke an app function", or "verify app function registration" on a device, use this step.
When the user asks for a subset of the steps, run those steps and any step that the critical constraints require. Then list the skipped steps and ask whether to run them.
If they apply, you must load the following references:
- Context and terminology: Defines the ubiquitous language, architecture definitions, and design patterns across the AppFunctions skill suite. Load when you need to understand core architecture terminology or check the distinctions between modern and legacy AppFunctions APIs.
- Migration to service entry point : Migrates apps on AppFunctions 1.0.0-alpha09 or lower to the
AppFunctionServiceEntryPointarchitecture from 1.0.0-alpha10, and upgrades apps to 1.0.0-beta01. Load it when a user asks to migrate or upgrade existing AppFunctions code. When you find legacyAppFunctionConfiguration.Providerimplementations,@AppFunctionannotations, orappfn:descriptionattributes, load it and ask the user before you migrate.
Critical constraints
- Modular consistency: You must refine KDocs immediately after you generate AppFunction implementations.
- Security: Expose only safe, non-destructive tasks that the app's UI already offers on that form factor. Never give agents wide-ranging access to user data or system resources. Never require or return passwords, financial details, private keys, or other highly sensitive personal information.
- Descriptions: Describe what each function does, never how an agent must behave. Put call order across functions in the app description, not in function KDoc.
Troubleshooting
- If you encounter build-time errors such as Kotlin Symbol Processing (KSP) issues, see Implementation and configuration.
- If you encounter runtime errors such as missing services or execution failures, see Testing and debugging.
- If you need architecture definitions and vocabulary, see Context and terminology.
- If you encounter issues when upgrading AppFunct
Questions fréquentes
Quelle version d'Android mon application doit-elle cibler ?
L'application doit cibler le SDK 36 ou plus et être compilée avec le SDK 37 ou plus, car les AppFunctions font partie d'Android 16 et des versions ultérieures.
Puis-je tester les fonctions sans l'écran de l'application ?
Oui. Le skill inclut des commandes ADB pour les tests et l'évaluation en local.
Cela modifie-t-il l'apparence des écrans de l'application ?
Non. Son but est d'exposer les parcours aux agents pour qu'ils puissent s'exécuter sans ouvrir les écrans de l'application.
Détails
Description originale de l’auteur
Analyzes Android apps to find user workflows to expose as AppFunctions, such as creating a note, playing media, or sending a message. AI agents, voice commands, and system shortcuts then run them without opening the app UI. Generates Kotlin code with the androidx.appfunctions library, and refines KDoc and the app description so that agents choose and call functions correctly. Use this skill when discovering, implementing, documenting, testing, or upgrading AppFunctions in an Android app, including @AppFunctionDeclaration, @AppFunctionSerializable, @AppFunctionServiceEntryPoint, AppFunctionServ
repo: android/skills
Popularité
- Étoiles GitHub
- 10k
- Position au classement
- #11910
- Licence
- Apache-2.0
- Mis à jour
- 29/10/2026
Commentaires
- …
Autres skills de ce dépôt
agp-9-upgrade
10kAide votre agent à migrer une application Android vers Android Gradle Plugin 9 et à corriger les changements incompatibles. Hors Kotlin Multiplatform.
camerax
10kAide votre agent à créer des fonctions de caméra Android avec CameraX : vidéo, commandes matérielles, ML Kit et effets Media3.
android-for-cars-parked-apps
10kAide votre agent à adapter une application vidéo, de jeu ou de navigateur Android pour qu'elle tourne sur Android Auto ou Automotive.
litert-lm
10kAide votre agent à créer une application Android qui exécute un modèle textuel ouvert sur l'appareil, avec l'API Kotlin LiteRT-LM.
Skills similaires
add-model-provider
394kPermet à votre agent de connecter un nouveau fournisseur de modèles IA à OpenClaw par des commandes sûres, sans clé en clair, puis de lancer un test.
acp-router
394kAide votre agent à envoyer une tâche à un assistant de code comme Claude Code ou Cursor via OpenClaw, afin que le travail s'exécute dans cet outil.
browser-automation
394kApprend à votre agent à piloter des pages web étape par étape, y compris les connexions, les onglets et la reprise lorsqu'une page ne répond plus.