本文へスキップ
Skillpedia
エージェント10k · #11910

appfunctions

できること

このスキルは、Androidアプリを調べて、ノートの作成やメディアの再生などの一般的なユーザーの作業を見つけ、それらをAppFunctionsに変えます。公開されると、AIエージェントや音声コマンドはアプリを開かずに実行できます。システムのエージェントと連携させたいAndroid開発者向けです。

使う場面

  • ✓AIエージェントや音声コマンドで、Androidアプリのノートを作ったり、メディアを再生したりしたいとき。
  • ✓アプリのどの操作をシステムのエージェントに公開する価値があるかを見つけたいとき。
  • ✓エージェントが関数を正しく選んで呼び出せるように、Kotlinのコードと明確な説明がほしいとき。

スキルのリンク

https://github.com/android/skills/blob/main/device-ai/appfunctions/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/android/skills/blob/main/device-ai/appfunctions/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“AIエージェントに公開すべきAndroidアプリの主なタスクを見つけてください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

このスキルは、アプリを分析してユーザーの作業の流れを見つけ、androidx.appfunctionsライブラリを使ったKotlinのコードを書きます。また、エージェントが各関数をいつ使うべきかを理解できるように、説明文も改善します。

技術的な内容(元の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 AppFunctionServiceEntryPoint architecture 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 legacy AppFunctionConfiguration.Provider implementations, @AppFunction annotations, or appfn:description attributes, 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

よくある質問

アプリにはどのAndroidバージョンが必要ですか?

AppFunctionsはAndroid 16以降の一部なので、アプリはSDK 36以上をターゲットにし、SDK 37以上でコンパイルする必要があります。

アプリの画面なしで関数をテストできますか?

はい。このスキルには、ローカルのテストと評価のための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
更新日
2026/10/29

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル