An Agent Skill that lets an AI agent understand and edit Android code through a running Android Studio, using the Android CLI's android studio subcommands. The agent works from the IDE's semantic index instead of plain text search.
The agent follows an understand → edit → verify loop:
- Understand —
android studio find-declaration/find-usagesto locate where a symbol is defined and used (the index distinguishes same-named symbols thatgrepwould conflate). - Edit — change the code.
- Verify —
android studio analyze-filefor a file's lint/inspection findings before a build, andandroid studio render-compose-previewto render a Compose preview (optionally with--print-semantics). Re-runfind-usageswhen a symbol's shape changes.
Get the project name with android studio check, then pass --project=<name> to every command (or --pid=<pid> to target a specific running instance).
Use the skills CLI:
npx skills add takahirom/android-cli-code-skillPick your agents when prompted; the CLI copies the skill into each selected agent's skills directory.
Note
In the "Additional agents" list, Claude Code and others are not selected by default — press Space to toggle (○ → ●) before pressing Enter. Hitting Enter while the row is only highlighted (❯ ○) confirms without selecting, and the skill ends up in ~/.agents/skills/ only, which Claude Code does not read.
- Android CLI with the
android studiosubcommands (check,find-declaration,find-usages,analyze-file,render-compose-preview,version-lookup,open-file) - A running Android Studio with the target project open
In an agent chat, ask something like:
Find every usage of
NiaAppStateand checkNiaAppState.ktfor warnings before I build.
The agent should activate the skill and drive the android studio commands for you.