项目简介
该仓库提供模块化、面向 AI 优化的指令文件(SKILL.md),帮助 LLM 智能体掌握 Android 官方开发最佳实践,重点覆盖评测中大模型表现不佳的场景。可通过 Android CLI 安装,或作为 Claude Code、Codex 等智能体的插件使用。
README 预览
## Android skills\n\n**Android skills** are a dedicated repository of **AI-optimized, modular instructions** and\nresources, to help agents better understand and execute specific patterns that follow the best\npractices and guidance on Android development\nfrom [developer.android.com](https://developer.android.com).\n\nAndroid skills follow the [open-standard agent skills](https://agentskills.io/home) - markdown\nfiles (SKILL.md) that provide a technical specification of a task, and **ground LLMs** with\ninformation on specialized domains and workflows.\n\nOur Android skill development focuses on **use cases and workflows where evaluations show LLMs\nunderperform**.\nWe aren't prioritizing well-established areas where LLMs are already proficient, such\nas basic Jetpack Compose best practices.\n\nTo learn more, read the official documentation:\n\n- [Android skills](https://developer.android.com/tools/agents/android-skills)\n- [Android CLI](https://developer.android.com/tools/agents/android-cli)\n- [Android Studio](https://developer.android.com/studio/gemini/skills)\n\n### Install Android skills\n\nUse Android CLI to install a specific skill into the current directory:\n\n```\nandroid skills add r8-analyzer --project=.\n```\n\nUse Android CLI to install all Android skills to directories for all detected agents:\n\n```\nandroid skills add --all\n```\n\nIf you don't have any existing agent directories and don't specify particular agents, the skills\nwill be installed for Gemini and Antigravity at `~/.gemini/antigravity/skills`.\n\n**Options:**\n\n- `--all` - Add all Android skills. If omitted, only the `android-cli` skill will be installed.\n- `--agent` - A comma-separated list of agents to install the skill for. If omitted, the skill will be installed for all detected agents.\n- `--project` - Path to a project root in which to install the skills.\n\n\nTo update all skills or specific ones, run:\n\n```\nandroid skills update --all\nandroid skills update wear-compose-m3\
常见问题 (3)
故障排除为什么 Codex 市场插件安装成功,但显示的技能数量为零?
这是插件版本 1.0.15 中的一个已知 bug:.codex-plugin/plugin.json 将 skills 声明为对象数组({ "source": { "path": "..." } }),但 Codex CLI 0.163.0 只接受路径字符串或字符串数组,因此它静默忽略了全部 30 个技能条目。修复(PR #247)将每个条目转换为普通路径字符串,例如 "skills": ["./devtools/android-cli"]。请将插件更新到修复版本,然后重启你的 Codex 会话。对于受影响的版本,临时解决方法是绕过插件市场直接安装技能:android skills add --agent codex —— 这样所有 30 个 Android 技能都可以被发现。要在不发起模型请求的情况下验证发现结果,请运行 codex debug prompt-input "Reply with exactly OK." 并检查生成的技能目录。
故障排除如何修复 Compose for TV 中的 "Unresolved reference: TvLazyColumn" 错误?
当 Compose for TV 从 alpha 迁移到稳定版(1.0.0)时,TvLazyColumn 被重命名了。请将 TvLazyColumn 替换为标准的 LazyColumn,并从 androidx.compose.foundation.lazy.LazyColumn 导入,而不是使用 TV 专用的软件包。TvLazyRow → LazyRow 同理。请参阅官方迁移指南:https://medium.com/androiddevelopers/migrating-compose-for-tv-from-alpha-to-stable-b0074d6fd350
故障排除I don't have access to the `journeys.md` file from the android-cli project you're referring to, so I can't see the specific JSON example in its 'Summarizing' section or diagnose the exact parse error. If you paste the JSON snippet here, I can tell you precisely what's wrong with it.
That said, JSON examples in documentation commonly fail to parse for these reasons:
- **Comments**: `//` or `/* */` annotations added for explanation — JSON doesn't support comments
- **Trailing commas** after the last element in an object or array
- **Placeholder text** like `...` or `<your-api-key>` left unquoted or unquoted in the structure
- **Truncation**: the example is an abbreviated excerpt missing closing braces/brackets
- **Single quotes** instead of the required double quotes
- **Smart quotes**: curly quotes (`" "`) introduced by Markdown rendering instead of straight ASCII quotes (`"`)
- **Unquoted keys** (valid in JavaScript, invalid in JSON)
If you share the example (and ideally the parse error message you're seeing), I can pinpoint the issue.
旧版本的 devtools/android-cli skill 在 references/journeys.md 中附带了一个格式错误的示例:其中包含内联 // 注释、尾随逗号、一个未闭合的字符串("action": "Click the blue button,),以及一个格式错误的 "journey:", 键,因此无法被解析为 JSON。修复方法:更新到最新版本的 android-cli skill,其中示例现在以 ``json 代码块包裹,语法有效(字符串已闭合、无尾随逗号、无注释),并且字段说明(status、commands、comment、有效的 status 值)已移至示例下方单独的 "Field reference" 列表中。如果你仍在使用旧副本,请在解析或复用该示例之前,手动删除 //` 注释和尾随逗号,并闭合所有字符串。