Agent skill

Android API Diff

by gkd-kit in gkd-kit/gkd

Looks up Android framework Java and AIDL APIs across versions with the android-api-diff CLI: signatures, availability, source files and hidden-API access code.

GPL-3.0Auto-check passedMobile

Install Android API Diff

skills CLI
$ npx skills add gkd-kit/gkd --skill android-api-diff -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install gkd-kit/gkd android-api-diff --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/gkd-kit/gkd.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/android-api-diff .claude/skills/android-api-diff && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
android-api-diff
GitHub stars
43k
Token cost
~796 tokens
SKILL.md length
340 words
Files
2
Skills in repo
2
Repo updated
First seen
Licence
GPL-3.0

At a glance

Looks up Android framework Java and AIDL APIs across versions with the android-api-diff CLI: signatures, availability, source files and hidden-API access code.

  • Finding which Android versions include a framework API
  • SKILL.md covers Route the request, Interpret results and Handle a missing CLI
  • Calls npm
  • Fetching the full source of a frameworks/base file at a release tag

What it does

The skill treats the `android-api-diff` CLI as the only tool interface and keeps its default JSON output. Requests are routed to five subcommands: `generate` for Java hidden-API access code, which runs the version query itself, `query` for signatures, version ranges, availability and reasons an API is missing, `resolve` for the matching `frameworks/base` file and target kind, `source` for the complete content of a known path at an exact Android release tag, and `preload` only when you explicitly ask to warm the cache. API names are always quoted because constructors and member references contain shell-sensitive characters.

Results count as successful only with exit code 0 and top-level `ok: true`, with the answer under `result`. Range endpoints are described as the first or last tag checked in the current snapshot, so a last-checked endpoint does not promise that no later revision exists. For members, the `overloads` list is the source of truth, and a missing reason of overload-not-found means the name exists but that exact parameter signature does not. On errors the agent reports the code and message from stderr without retrying. If the CLI is missing, the agent stops and tells you to install it with npm and run its skill install command from the project root.

When your agent uses it

  • Finding which Android versions include a framework API
  • Fetching the full source of a frameworks/base file at a release tag
  • Explaining why an API is missing on a given Android version
  • Generating Java code that reaches a hidden API

Example prompts

  • “Resolve ContentObserver() to its frameworks/base source file.”
  • “Which Android versions have IActivityManager.getTasks, with minimum SDK 28?”
  • “Generate Java hidden-API access code for ActivityManager.getTasks.”
  • “Show me the full AccessibilityButtonController source at android-17.0.0_r1.”

Requirements

  • The `android-api-diff` CLI, installed with `npm install --global android-api-diff@latest`
  • Network access for fetching framework sources

What it can do on your machine

Read from SKILL.md and the folder at commit daed366. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npm, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Android API Diff loads about 796 tokens when it runs. Until then it costs about 99 tokens; SKILL.md has 340 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~99
When it runs · the whole SKILL.md, loaded when a task matches
~796

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from gkd-kit/gkd at commit daed366, republished under its GPL-3.0 licence (© gkd-kit). 340 words, ~796 tokens.

Download SKILL.mdSave it as .claude/skills/android-api-diff/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
android-api-diff
description
Inspect Android framework Java and AIDL APIs across versions with the android-api-diff CLI. Use when resolving an Android API to frameworks/base source, fetching the complete content of a tagged source file, comparing signatures or availability by Android version, explaining missing APIs, generating Java hidden-API access code, or explicitly prewarming the local query cache.

Android API Diff

Use the android-api-diff CLI as the only tool interface. Keep its default JSON output so results remain machine-readable.

Route the request

  • Run generate when the user wants Java hidden-API access code. It performs the version query internally, so never call query first.
  • Run query when the user wants signatures, version ranges, availability, missing reasons, or source metadata.
  • Run resolve when the user only needs the matching frameworks/base file and target kind.
  • Run source when the user wants the complete content of a known source path at an exact Android release tag. If only an API name is known, run resolve first and use its source.path.
  • Run preload only when the user explicitly asks to preload several APIs.

Always quote API names because constructors and member references can contain shell-sensitive characters.

sh
android-api-diff resolve "ContentObserver()"
android-api-diff source android-17.0.0_r1 core/java/android/accessibilityservice/AccessibilityButtonController.java
android-api-diff query "IActivityManager.getTasks" --min-sdk 28
android-api-diff generate "ActivityThread.currentApplication" --min-sdk 28
android-api-diff preload "ContentObserver()" "IActivityManager.getTasks" --min-sdk 28

Omit --min-sdk unless the user provides a minimum Android API level. The CLI then uses its built-in default.

Interpret results

Treat exit code 0 together with top-level ok: true as success. Read the operation result from the top-level result field.

For query, describe range endpoints as the first or last tag checked in the current snapshot. A last-checked endpoint is not a promise that no later revision exists.

For member queries, treat result.overloads as the source of truth. Each item has a stable overloadId, its latest checked signature and member, and independent ranges. A range with missingReason: "overload-not-found" means the member name exists in that source revision but that specific parameter signature does not. Use top-level result.ranges[].overloadIds only when describing which overloads were available together.

On a nonzero exit code, read the structured JSON error from stderr and report its error.code and error.message. Do not add an automatic retry: the CLI network layer already retries transient fetches.

Handle a missing CLI

If android-api-diff is not installed, stop and tell the user to run:

sh
npm install --global android-api-diff@latest
android-api-diff skill install

Run the Skill command from the root of the current Git or Gradle project so it remains project-scoped. Do not implement or simulate version checks. The package manager owns CLI update detection and upgrades.

© gkd-kit, GPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in .agents/skills/android-api-diff of gkd-kit/gkd.

  • SKILL.md
  • agents/openai.yaml

Open the folder on GitHubat commit daed366

Compare with similar skills

Android API Diff next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Android API Diff compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Android API Diff this skillgkd-kit/gkd43k—~796Automated safety check: PassGPL-3.0
Android Audio E2Ehyochan/react-native-nitro-sound961—~814Automated safety check: PassMIT
Install Firecrasherosama-raddad/FireCrasher147—~562Automated safety check: PassApache-2.0
Apc BuildJoker-x-dev/AndroidProject-Compose102—~553Automated safety check: PassNone
Sentry Android SDKgetsentry/sentry-for-ai268—~7.7kAutomated safety check: PassApache-2.0
Dt Setup AndroidDynatrace/dynatrace-for-ai161—~3.5kAutomated safety check: PassApache-2.0

Similar skills

  • Android Audio E2E

    hyochan/react-native-nitro-sound

    Build and run device-backed Android end-to-end checks for react-native-nitro-sound permissions, recording, playback, listeners, pause/resume, seek, speed, audio focus, lifecycle behavior, and rapid…

    961 GitHub stars~814 tokensUpdated 8 days ago
    MobileAuto-check passed
  • Install Firecrasher

    osama-raddad/FireCrasher

    Add the FireCrasher crash-recovery library to an Android app and install it in the Application class.

    147 GitHub stars~562 tokensUpdated 3 mo ago
    MobileAuto-check passed
  • Apc Build

    Joker-x-dev/AndroidProject-Compose

    管理 AndroidProject-Compose 的 Gradle、版本目录、SDK、BuildConfig、构建类型、ABI、签名、混淆、应用资源和 APK/AAB 发布流程。用户要求升级依赖、修改构建配置、替换图标或启动页、配置签名、排查构建失败、缩减包体或生成发布包时使用。

    102 GitHub stars~553 tokensUpdated 21 days ago
    MobileAuto-check passed
  • Sentry Android SDK

    getsentry/sentry-for-ai

    Official

    Full Sentry SDK setup for Android. An agent skill from getsentry/sentry-for-ai.

    268 GitHub stars~7.7k tokensUpdated today
    MobileAuto-check passed
  • Dt Setup Android

    Dynatrace/dynatrace-for-ai

    Instruments an existing Android project (Kotlin or Java) with the Dynatrace Mobile Agent for basic monitoring.

    161 GitHub stars~3.5k tokensUpdated 6 days ago
    MobileAuto-check passed
  • Android Dev

    OpenMinis/MinisSkills

    在 Minis 的 ARM64 Alpine PRoot 中从零诊断、安装并验证 Android 构建环境,以及创建、构建、签名验证、安装和启动原生 Android App;覆盖 Java/Kotlin/Gradle/SDK/AAPT2、APK、ADB/无线调试/Shizuku,以及条件式 JNI/NDK。用户提到 Android…

    440 GitHub stars~1.9k tokensUpdated 2 days ago
    MobileAuto-check passed

More from gkd-kit/gkd

  • Checks whether Android hidden-API implementations and system callbacks survive R8 minification, and diagnoses Release-only failures such as AbstractMethodError.

    43k GitHub stars~1.5k tokensUpdated yesterday
    Auto-check passed

Categories

Questions about Android API Diff

What does Android API Diff do?

Looks up Android framework Java and AIDL APIs across versions with the android-api-diff CLI: signatures, availability, source files and hidden-API access code. The skill treats the `android-api-diff` CLI as the only tool interface and keeps its default JSON output. Requests are routed to five subcommands: `generate` for Java hidden-API access code, which runs the version query itself, `query` for signatures, version ranges, availability and reasons an API is missing, `resolve` for the matching `frameworks/base` file and target kind, `source` for the complete content of a known path at an exact Android release tag, and `preload` only when you explicitly ask to warm the cache.

When should I use Android API Diff?

Android API Diff fits situations like: finding which Android versions include a framework API; fetching the full source of a frameworks/base file at a release tag; explaining why an API is missing on a given Android version; generating Java code that reaches a hidden API.

How do I install Android API Diff in Claude Code?

Run `npx skills add gkd-kit/gkd --skill android-api-diff -a claude-code`. Or copy the skill folder (.agents/skills/android-api-diff in gkd-kit/gkd) into .claude/skills/android-api-diff in your project. Claude Code loads it when a task matches its description.

How do I install Android API Diff in Codex?

Run `npx skills add gkd-kit/gkd --skill android-api-diff -a codex`. Or copy the skill folder (.agents/skills/android-api-diff in gkd-kit/gkd) into .agents/skills/android-api-diff in your project. Codex loads it when a task matches its description.

Can I use Android API Diff in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add gkd-kit/gkd --skill android-api-diff -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/android-api-diff, .gemini/skills/android-api-diff, .github/skills/android-api-diff and .opencode/skills/android-api-diff in your project.

What does Android API Diff need to run?

Going by SKILL.md and its folder, Android API Diff needs the command-line tools its instructions call (npm). Our summary lists: The `android-api-diff` CLI, installed with `npm install --global android-api-diff@latest`; Network access for fetching framework sources.

Does Android API Diff access the network?

SKILL.md contains no URLs. Its commands use npm, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Android API Diff safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Android API Diff use?

Android API Diff is published under the GPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Android API Diff use?

About 796 tokens (SKILL.md is roughly 3.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Android API Diff?

Skills that share tags, products or a category with Android API Diff: Android Audio E2E (hyochan/react-native-nitro-sound, 961 stars), Install Firecrasher (osama-raddad/FireCrasher, 147 stars), Apc Build (Joker-x-dev/AndroidProject-Compose, 102 stars) and Sentry Android SDK (getsentry/sentry-for-ai, 268 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Android API Diff?

gkd-kit (a GitHub organization) maintains it in gkd-kit/gkd, which has 42,544 GitHub stars. The repository holds 2 skills in this directory. The repository was last updated on October 6, 2026.

Source: gkd-kit/gkd on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.