appfunctions
ما الذي تفعله
تراجع هذه المهارة تطبيق Android لتجد المهام الشائعة لدى المستخدم، مثل إنشاء ملاحظة أو تشغيل وسائط، وتحوّلها إلى AppFunctions. وبعد عرضها، يمكن لوكلاء الذكاء الاصطناعي وأوامر الصوت تشغيلها دون فتح التطبيق. وهي موجهة لمطوري Android الذين يريدون أن يعمل تطبيقهم مع الوكلاء في النظام.
متى تستخدمها
- ✓عندما تريد أن ينشئ وكلاء الذكاء الاصطناعي أو أوامر الصوت ملاحظة أو يشغّلوا وسائط في تطبيق Android لديك.
- ✓عندما تريد معرفة أي إجراءات في تطبيقك تستحق أن تُعرض لوكلاء النظام.
- ✓عندما تحتاج إلى شيفرة Kotlin ووصف واضح حتى يختار الوكلاء دالتك ويستدعونها بشكل صحيح.
رابط المهارة
https://github.com/android/skills/blob/main/device-ai/appfunctions/SKILL.mdانسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.
طريقة الاستخدام
أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.
رسالة جاهزة للصق
لـ Claude Code أو Codex أو Cursor: شغّله داخل مجلد مشروعك وستُثبَّت المهارة.
نزّل ملف SKILL.md وضعه في مجلد مهارات وكيلك.
مثال على ما تطلبه من الذكاء الاصطناعي
“ابحث عن المهام الرئيسية في تطبيق Android لدي التي يجب أن أعرضها كـ AppFunctions لوكلاء الذكاء الاصطناعي.”
5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.
كيف تعمل
تحلل هذه المهارة التطبيق لإيجاد مسارات المستخدم، ثم تكتب شيفرة Kotlin باستخدام مكتبة androidx.appfunctions. كما تحسّن الأوصاف كي يفهم الوكلاء متى يستخدم كل دالة.
المحتوى التقني (ملف SKILL.md الأصلي)
النص الأصلي من المؤلف، مباشرة من 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
الأسئلة الشائعة
ما إصدار Android الذي يحتاجه تطبيقي؟
يجب أن يستهدف التطبيق SDK 36 أو أحدث، وأن يُترجم بـ SDK 37 أو أحدث، لأن AppFunctions جزء من Android 16 وما بعده.
هل يمكنني اختبار الدوال دون شاشة التطبيق؟
نعم. تتضمن المهارة أوامر ADB للاختبار المحلي والتقييم.
هل تغيّر المهارة شكل شاشات التطبيق؟
لا. هدفها عرض المسارات للوكلاء كي يعملوا دون فتح شاشات التطبيق.
التفاصيل
الوصف الأصلي من المؤلف
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
الشعبية
- نجوم GitHub
- 10k
- الترتيب
- #11910
- الترخيص
- Apache-2.0
- آخر تحديث
- 29/10/2026
التعليقات
- …
المزيد من المهارات من هذا المستودع
agp-9-upgrade
10kيساعد وكيلك على ترقية تطبيق Android إلى Android Gradle Plugin 9 ومعالجة التغييرات الجذرية فيه. لا يناسب مشاريع Multiplatform.
camerax
10kيساعد وكيلك على بناء ميزات الكاميرا في Android باستخدام CameraX، بما في ذلك تسجيل الفيديو وأدوات الأجهزة وتأثيرات ML Kit وMedia3.
android-for-cars-parked-apps
10kيساعد وكيلك على تكييف تطبيق فيديو أو لعبة أو متصفح في Android ليعمل كتطبيق متوقف على Android Auto وAndroid Automotive.
litert-lm
10kيساعد وكيلك على بناء تطبيق Android يشغّل نموذج ذكاء اصطناعي نصيًا مفتوحًا على الجهاز، باستخدام واجهة LiteRT-LM البرمجية بلغة Kotlin.
مهارات مشابهة
add-model-provider
394kتتيح لوكيلك ربط مزوّد نموذج ذكاء اصطناعي جديد بـ OpenClaw باستخدام أوامر إعداد آمنة، وإبقاء مفاتيح API خارج النص العادي، وإجراء اختبار حي.
acp-router
394kيساعد وكيلك على إرسال مهمة إلى مساعد برمجة مثل Claude Code أو Cursor عبر OpenClaw، فيعمل العمل داخل تلك الأداة.
browser-automation
394kتعلّم وكيلك التحكم في صفحات الويب خطوة بخطوة، بما في ذلك تسجيل الدخول والتبويبات والتعافي عندما تتوقف الصفحة عن الاستجابة.