Making AI Write Android Code Our Way: A Practical Guide to Agent Skills
Article Summary
Pierrick CAEN from Medium's Android team reveals how they turned AI coding assistants from generic code generators into team-specific experts. The secret? Teaching the AI their exact conventions through structured 'skills.'
Medium's small Android team faced a common problem: AI tools like Cursor could write Kotlin, but not their Kotlin. They solved it by creating AGENTS.md (project context) and 13 reusable 'skills' (step-by-step playbooks) that encode everything from Clean Architecture patterns to Material 3 migration mappings.
Key Takeaways
- 13 skills now automate workflows that previously took 30-60 minutes per task
- Skills enforce consistency: feature flags checked once at init, never in composables
- AI can write the skills itself by analyzing your PRs and asking questions
- Scaffolding skills generate 6-8 files following exact team patterns from one prompt
- Migration skills contain 60+ component mappings AI couldn't know otherwise
By encoding team conventions as AI skills, Medium's Android team eliminated inconsistency and turned boilerplate work into single-prompt tasks.
About This Article
Medium's Android team kept getting generic Kotlin code from AI assistants that didn't follow their conventions for dependency injection, state management, and testing. Every PR needed significant feedback to fix these issues.
Pierrick CAEN's team built 13 reusable skills in the .agents/skills/ folder. These skills handle specific tasks: scaffolding new screens, migrating Material 2 to Material 3 components with 60+ mappings, and enforcing patterns to keep flags out of composables.
Building a new screen with ViewModel, listeners, composables, previews, and tests used to take most of a morning. Now it takes a single prompt and one review pass. The team also stopped seeing inconsistencies drift across their codebase.