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.zip

Installs 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.
82 charsno explicit “when” trigger
Intermediate

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

You give it
Android component (activity, fragment, service, intent, permission) and an optional lifecycle state
You get back
Guidance and code examples for Android core components and their lifecycle management

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 setup
  • onStart(): Become visible
  • onResume(): Gain focus
  • onPause(): Lose focus
  • onStop(): Hidden
  • onDestroy(): Final cleanup

Fragment Lifecycle

Similar to Activity but with:

  • onAttach(): Attached to activity
  • onDetach(): 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.

SkillInstallsUpdatedSafetyDifficulty
platform (this skill)01moReviewIntermediate
android-kotlin-development2685moReviewAdvanced
kotlin-multiplatform323moReviewAdvanced
kmp-cmp-app-builder04moReviewAdvanced

Try saying

Example prompts that trigger this skill in your AI assistant.

Search skills

Search the agent skills registry