Medium Pierrick CAEN Mar 17, 2026

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

Critical Insight

By encoding team conventions as AI skills, Medium's Android team eliminated inconsistency and turned boilerplate work into single-prompt tasks.

The article includes the exact two-composable pattern they use for every screen and why checking feature flags in the wrong place causes bugs.

About This Article

Problem

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.

Solution

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.

Impact

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.