platform
Reference and lifecycle management tool for Android components like Activities, Fragments, and Services.
Install
mkdir -p .claude/skills/platform-anirudhhhh && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/14561" && unzip -o skill.zip -d .claude/skills/platform-anirudhhhh && rm skill.zipInstalls to .claude/skills/platform-anirudhhhh
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Android core components lifecycle, Activities, Fragments, Services, Intent system.Key capabilities
- →Implement Activity lifecycle callbacks like `onCreate()` and `onDestroy()`
- →Manage Fragment lifecycle with `onAttach()` and `onDetach()`
- →Utilize the Intent system for explicit and implicit actions
- →Handle Services as started, bound, or foreground
- →Use ViewModel for state management
- →Unregister listeners and test configuration changes
How it works
The skill provides code examples and explanations for Android core components and their lifecycle methods. It covers Activities, Fragments, Services, and the Intent system, along with best practices.
Inputs & outputs
When to use platform
- →Implementing Activity lifecycles
- →Setting up Fragments
- →Managing Android services and intents
About this skill
Android Platform Skill
Quick Start
Activity Lifecycle
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
}
override fun onDestroy() {
super.onDestroy()
// Cleanup
}
}
Fragment Usage
class UserFragment : Fragment() {
private val viewModel: UserViewModel by viewModels()
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
viewModel.user.observe(viewLifecycleOwner) { user ->
updateUI(user)
}
}
}
Key Concepts
Lifecycle Callbacks
onCreate(): Initial setuponStart(): Become visibleonResume(): Gain focusonPause(): Lose focusonStop(): HiddenonDestroy(): Final cleanup
Fragment Lifecycle
Similar to Activity but with:
onAttach(): Attached to activityonDetach(): Detached- Fragment manager for transactions
Intent System
// Explicit
startActivity(Intent(this, DetailActivity::class.java))
// Implicit
startActivity(Intent(Intent.ACTION_VIEW, Uri.parse("https://example.com")))
Services
- Started:
startService() - Bound:
bindService() - Foreground: Visible notification
Best Practices
✅ Handle lifecycle properly ✅ Use ViewModel for state ✅ Unregister listeners ✅ Test configuration changes ✅ Respect process lifecycle
Resources
When not to use it
- →When developing for platforms other than Android
Limitations
- →The skill is specific to Android core components.
- →The skill focuses on lifecycle management and intent system.
- →The skill does not cover UI design or data persistence beyond ViewModel.
How it compares
This workflow provides direct code examples and best practices for Android component lifecycle management, offering a structured approach to app development compared to manual API lookup.
Compared to similar skills
platform side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| platform (this skill) | 0 | 1mo | Review | Intermediate |
| android-kotlin-development | 268 | 5mo | Review | Advanced |
| kotlin-multiplatform | 32 | 3mo | Review | Advanced |
| kmp-cmp-app-builder | 0 | 4mo | Review | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
android-kotlin-development
aj-geddes
Develop native Android apps with Kotlin. Covers MVVM with Jetpack, Compose for modern UI, Retrofit for API calls, Room for local storage, and navigation architecture.
kotlin-multiplatform
vitorpamplona
Platform abstraction decision-making for Amethyst KMP project. Guides when to abstract vs keep platform-specific, source set placement (commonMain, jvmAndroid, platform-specific), expect/actual patterns. Covers primary targets (Android, JVM/Desktop, iOS) with web/wasm future considerations. Integrates with gradle-expert for dependency issues. Triggers on: abstraction decisions ("should I share this?"), source set placement questions, expect/actual creation, build.gradle.kts work, incorrect placement detection, KMP dependency suggestions.
kmp-cmp-app-builder
firdaus1453
>
android-clean-architecture
farhankabir133
Clean Architecture patterns for Android and Kotlin Multiplatform projects — module structure, dependency rules, UseCases, Repositories, and data layer patterns.
kotlin-coroutines-flows
decodedbyrajat
Kotlin Coroutines and Flow patterns for Android and KMP — structured concurrency, Flow operators, StateFlow, error handling, and testing.
android-kotlin
alinaqi
Android Kotlin development with Coroutines, Jetpack Compose, Hilt, and MockK testing