Android Source Search
Communityrcosteira79
Use when needing to fetch Android source code — AOSP platform internals (@hide APIs, framework classes, system services) or AndroidX/Jetpack library source and samples. Also use when public docs are insufficient to complete a task and implementation details must be read directly from source.
Overview
- Repository
- rcosteira79/android-skills
- Publisher
- rcosteira79
- Stars
- 174
- Forks
- 21
- Bundled files
- 0
- License
- MIT
- Updated
- Nov 10, 2026
Installation
tmp=$(mktemp -d)
git clone --depth 1 https://github.com/rcosteira79/android-skills.git "$tmp"
mkdir -p ~/.claude/skills
cp -R "$tmp/plugins/android-skills/skills/android-source-search" ~/.claude/skills/android-source-search
rm -rf "$tmp"tmp=$(mktemp -d)
git clone --depth 1 https://github.com/rcosteira79/android-skills.git "$tmp"
mkdir -p ~/.codex/skills
cp -R "$tmp/plugins/android-skills/skills/android-source-search" ~/.codex/skills/android-source-search
rm -rf "$tmp"Install the Android Source Search agent skill from https://github.com/rcosteira79/android-skills/tree/main/plugins/android-skills/skills/android-source-search into this project's skills folder.Instructions
Android Source Search
Two source trees, two access strategies. AOSP lives on android.googlesource.com (Gitiles); AndroidX lives on GitHub. cs.android.com blocks automated fetching — it's a human-browse JS SPA only (never WebFetch it).
Preferred: the android-sources MCP
If mcp__android-sources__* tools are available, always prefer them over WebFetch/gh — local source, sub-10ms lookups. Fall back to the strategies below only when they aren't.
Fallback: WebFetch + gh
AOSP (framework internals, @hide APIs, internal constants, default attr values) → Gitiles. Raw text is base64-encoded and smaller:
https://android.googlesource.com/platform/frameworks/base/+/refs/heads/main/{path}?format=TEXT
Use refs/heads/main (the active default branch), or a tag like android-14.0.0_r74 for a specific API level. Key repos: platform/frameworks/base (core/java/android/ → View/Activity/Context; services/core/java/ → system services; core/res/ → default attrs/styles), platform/libcore (ojluni/src/main/java/ → Java core).
AndroidX (androidx.* source + samples) → GitHub. File content via raw.githubusercontent.com; directory listings via gh api:
https://raw.githubusercontent.com/androidx/androidx/androidx-main/{path}
gh api repos/androidx/androidx/contents/{path} --jq '.[].name'
Samples live next to the source as {ClassName}Samples.kt under a samples/ subpath. Key path prefixes: Compose UI compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/, Foundation compose/foundation/foundation/src/commonMain/kotlin/, Animation compose/animation/animation/src/commonMain/kotlin/. AndroidX is mirrored on Gitiles (platform/frameworks/support, androidx-main), but the GitHub layout is the canonical, better-documented path for androidx.* — prefer it.
When the path is unknown
Use cs.android.com as a human search UI (not WebFetch — JS SPA) to locate the class/file, then fetch via Gitiles (AOSP) or raw.githubusercontent.com / gh api (AndroidX):
https://cs.android.com/search?q=ClassName+methodName&ss=android # &ss=androidx for AndroidX
Both trees change frequently — always fetch current source rather than trusting remembered line numbers.
FAQ
What does Android Source Search do?
Use when needing to fetch Android source code — AOSP platform internals (@hide APIs, framework classes, system services) or AndroidX/Jetpack library source and samples. Also use when public docs are insufficient to complete a task and implementation details must be read directly from source.
Who made Android Source Search?
rcosteira79 (a community member) publishes it in the rcosteira79/android-skills repository on GitHub.
Is Android Source Search free?
Yes. Android Source Search is open source, published by rcosteira79 under the MIT license.
What comes with Android Source Search?
Just its instructions. Everything the agent needs is in one SKILL.md file.
Which agents can use Android Source Search?
Any coding agent that reads SKILL.md files, including Claude Code, Codex, Cursor, GitHub Copilot and Gemini CLI. The agent loads the skill when a task matches its description.
What are agent skills?
An agent skill is a folder with a SKILL.md file: instructions that teach a coding agent how to do one kind of task, and optionally files it can read while it works. The agent keeps only the skill's name and description in mind and reads the rest when a task calls for it.
How are agent skills different from MCP servers?
An MCP server gives an agent new tools to call, code that runs somewhere and returns results. A skill gives it knowledge: how to approach a task with the tools it already has. Many agents use both.
How can my agent test my Android app?
Robomori lets coding agents create, start and control Android emulators and devices from one command, so they can install your app, take screenshots and check dark mode, font sizes and languages.