appfunctions

Generates Kotlin AppFunctions exposing Android app workflows to on-device AI agents.

2|Updated Jun 21, 2026
One-click install
npx skills add https://github.com/IsKenKenYa/skills --skill appfunctions-iskenkenya
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: appfunctions
Source: https://github.com/IsKenKenYa/skills/tree/main/skills/android/device-ai/appfunctions
Command: npx skills add https://github.com/IsKenKenYa/skills --skill appfunctions-iskenkenya

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Android developers need to expose app capabilities to AI agents and system assistants without forcing users to open the app UI, but implementing AppFunctions correctly requires coordinating discovery, Kotlin code generation, KDoc optimization, and device testing across multiple APIs. ## Core Features & Use Cases - Feature Discovery: Analyzes Android codebases (manifests, Activities, Services) to identify high-value user workflows suitable for AppFunctions, such as sending messages or playing media. - Kotlin Implementation: Generates AppFunction code using the @AppFunctionServiceEntryPoint architecture with KSP, Hilt or alternative DI, and proper manifest configuration. - KDoc Optimization: Refines function and serializable documentation so AI agents and MCP clients correctly understand workflows, parameters, and constraints. - ADB Testing: Provides commands to list, invoke, enable, and disable app functions on a connected device for verification. - Use Case: You want users to say "Tell Alice I'm running late" and have your chat app send the message via a system AI agent. This skill discovers the workflow, generates the AppFunction service, optimizes its KDoc, and verifies it with ADB. ## Quick Start Analyze my Android app and implement AppFunctions so AI agents can trigger its core workflows without opening the UI.

Frequently Asked Questions about appfunctions

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

FAQPage Schema
How do I expose Android app features to AI agents?

Implement AppFunctions by annotating methods with @AppFunction inside an abstract class extending AppFunctionService, marked with @AppFunctionServiceEntryPoint. KSP generates the service and XML metadata, letting system agents discover and execute your workflows without opening the app UI.

How to test AppFunctions on an Android device with ADB?

Use adb shell cmd app_function list-app-functions to view registered functions, then execute one with adb shell cmd app_function execute-app-function passing the package, function ID, and JSON parameters in single quotes. You can also enable or disable functions with the set-enabled command.

What Android version does AppFunctions require?

AppFunctions requires targetSdk 36 or newer and compileSdk 37 or newer, as the platform API is available from Android 16 onwards. Always use the Jetpack androidx.appfunctions library, which handles backward compatibility.

How do I migrate AppFunctions from alpha09 to alpha10?

Remove the standalone appfunctions-service dependency, replace AppFunctionConfiguration.Provider on the Application class with an abstract AppFunctionService wrapper annotated with @AppFunctionServiceEntryPoint, drop AppFunctionContext parameters, and register the KSP-generated service in AndroidManifest.xml.

Why is my AppFunction KDoc not appearing in metadata?

For @AppFunctionSerializable data classes, KSP only extracts inline KDoc written directly above each property. Class-level @param or @property tags are ignored, so move documentation inline for every property definition.

Can I use Koin or a service locator instead of Hilt with AppFunctions?

Yes. Because AppFunctionService inherits from android.app.Service and therefore Context, you can access your DI container through applicationContext in property getters or during service lifecycle execution, supporting Koin, Anvil, or manual service locators.