跪拜 Guibai
← All articles
Android · Android Jetpack · Kotlin

Android Skills Are Not a Knowledge Base — They're Targeted Bug Fixes for LLMs

By 稀有猿诉 ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

AI coding agents default to legacy patterns and produce subtly wrong modern Android code. Treating Skills as a curated set of patches rather than a documentation dump cuts token waste, prevents agent-driven code rot, and keeps migration efforts on rails.

Summary

Android Skills ship as modular Markdown instruction sets that auto-trigger when a prompt matches their metadata. The initial batch covers Navigation 3, edge-to-edge, AGP 9, XML-to-Compose migration, and R8 analysis. Each skill exists only because Google's evaluations proved that frontier models reliably produce wrong output on that specific topic — roughly 20 skills made the cut, not 200.

The hidden cost hits teams that install skills as if they were documentation. Every installed skill injects 100–200 tokens into every task's base context, and activation spikes that into the thousands. A team running 150 daily tasks with 10 unnecessary skills can waste $500–600 annually on tokens the model never needed, while the extra noise degrades output quality.

Custom skills solve the most underrated problem: agents working on legacy codebases match surrounding patterns and reinforce old code. A skill that explicitly routes new features through ComposeView breaks that loop. Google designed the entire system for deprecation — skills retire when models improve enough to pass evaluations without them, so a healthy setup shrinks over time, not grows.

Takeaways
Every installed skill adds 100–200 tokens to every task's base context; activation pushes that into the thousands, wasting $500–600/year for a team running 150 daily tasks with 10 unnecessary skills.
Skills target confirmed model failure modes, not general knowledge — Google ships roughly 20 official skills, each backed by an evaluation proving the model gets it wrong without the skill.
The Knowledge Base (`android docs`) should always be installed first; skills are secondary and only for gaps documentation cannot bridge.
Navigation 3 type-safe routes eliminate string-based routing, catching errors at compile time instead of runtime — the before/after output shows the concrete difference a skill makes.
A production `AGENTS.md` with reference files (e.g., `HomeScreen.kt`, `NavGraph.kt`) and explicit anti-patterns by name is more effective than a dozen generic skills.
Custom skills break agents out of legacy-pattern lock-in by instructing them to embed Compose via ComposeView when adding features to old screens.
Skills are designed to be deprecated — Google retires them when models pass evaluations without activation, so quarterly audits should shrink your installed set, not grow it.
Conclusions

The framing of Skills as patches rather than documentation is a sharp architectural choice: it forces a discipline of minimalism that most developer tooling avoids, and it bakes planned obsolescence into the system from day one.

Token cost is the mechanism that makes over-installation painful, but the real damage is output degradation from context noise — a subtler failure mode that teams are unlikely to notice or measure.

The legacy-codebase problem reveals a fundamental tension in AI coding agents: they optimize for local consistency, which in a legacy project means actively resisting modernization unless explicitly overridden.

Google's evaluation-first gating — a skill must prove a measurable failure mode before it ships — is a standard most community skill repositories ignore, making them a vector for bad patterns rather than a fix.

Concepts & terms
Android Skills
Modular Markdown-based instruction sets (`SKILL.md`) that auto-trigger when a prompt matches their metadata, providing targeted technical specifications to correct known LLM failure modes in Android development.
AGENTS.md
A project-level configuration file that defines architecture rules, coding conventions, reference files, and explicit anti-patterns for AI coding agents, acting as a persistent instruction set beyond individual prompts.
Navigation 2.8+ type-safe routes
A Navigation Compose API (2.8.0+) that uses Kotlin serializable classes as route definitions, replacing string-based routes and manual argument parsing with compile-time type checking.
Source: juejin.cn ↗ Google Translate ↗ Backup ↗