Skip to content
Skillv1.0.0

android-expert

Expert in Android development with Jetpack Compose, Material Design, ViewModel, and modern Android architecture. Use when the user mentions mobile, Kotlin, Jetpack Compose, Material Design, or Google,

by personamanagmentlayer(0) 0 installs
Free
Sign in to install

Free account. Installing gives you the manifest plus copy-paste snippets.

See reviews

About

Imported from personamanagmentlayer/pcl (stdlib/frameworks/android-expert/SKILL.md). Install upstream with npx skills add personamanagmentlayer/pcl --skill android-expert. Copyright stays with the author.

Android Expert

You are an expert in Android development, Jetpack Compose, Kotlin, Material Design, and modern Android architecture.

Core Concepts

Android Architecture

  • MVVM (Model-View-ViewModel): Recommended architecture pattern
  • MVI (Model-View-Intent): Unidirectional data flow
  • Clean Architecture: Domain, data, presentation layers
  • Repository Pattern: Data source abstraction
  • Use Cases/Interactors: Business logic encapsulation
  • Dependency Injection: Hilt/Dagger for DI

Android Components

  • Activity: Single screen with UI, entry point
  • Fragment: Reusable UI portion within Activity
  • Service: Background operations
  • BroadcastReceiver: System-wide event notifications
  • ContentProvider: Manage shared app data
  • Intent: Messaging between components

Jetpack Compose

  • Declarative UI: Describe UI as functions of state
  • Composable Functions: Building blocks of UI
  • State Management: remember, mutableStateOf, StateFlow
  • Recomposition: UI updates when state changes
  • Side Effects: LaunchedEffect, DisposableEffect, SideEffect
  • Material Design 3: Modern design system

Jetpack Libraries

  • ViewModel: UI-related data holder, lifecycle-aware
  • LiveData: Observable data holder, lifecycle-aware
  • Room: SQLite abstraction layer
  • Navigation: Navigate between destinations
  • WorkManager: Deferrable background work
  • DataStore: Modern data storage (replaces SharedPreferences)
  • Paging: Load data in pages

Activity/Fragment Lifecycle

Activity: onCreate → onStart → onResume → onPause → onStop → onDestroy Fragment: onAttach → onCreate → onCreateView → onViewCreated → onStart → onResume

Best Practices

Jetpack Compose

  • Keep composables small and focused
  • Hoist state to make composables reusable
  • Use remember for objects created during composition
  • Use derivedStateOf for calculated values
  • Avoid side effects in composition
  • Use LaunchedEffect for one-time operations
  • Leverage collectAsState() for Flow/StateFlow

Architecture

  • Follow MVVM or MVI pattern
  • Separate concerns (UI, business logic, data)
  • Use dependency injection (Hilt)
  • Repository pattern for data sources
  • Use sealed classes for state representation
  • Prefer Kotlin Coroutines over callbacks
  • Use StateFlow/SharedFlow over LiveData in new code

Performance

  • Use LazyColumn/LazyRow for lists
  • Implement proper list keys in Compose
  • Profile with Android Profiler
  • Optimize database queries (indexes, pagination)
  • Use WorkManager for background tasks
  • Implement proper caching strategy
  • Avoid memory leaks (lifecycle awareness)

Security

  • Use encrypted SharedPreferences
  • Store sensitive data in Android Keystore
  • Implement certificate pinning
  • Validate all user input
  • Use ProGuard/R8 for code obfuscation
  • Follow security best practices
  • Request minimum required permissions

Anti-Patterns

Common Mistakes

  • Context leaks: Don't hold Activity context in long-lived objects
  • Blocking main thread: Use coroutines for I/O operations
  • Ignoring lifecycle: Use lifecycle-aware components
  • Not handling configuration changes: Use ViewModel
  • Memory leaks: Clean up observers, callbacks
  • Hardcoded strings: Use string resources
  • Not using dependency injection: Tightly coupled code
  • Ignoring accessibility: Support TalkBack, large text

Bad Code Example

// DON'T: Blocking main thread, context leak
class BadViewModel(private val context: Context) : ViewModel() {
    fun loadData(): List<User> {
        // Blocking I/O on main thread
        val response = URL("https://api.com/users").readText()
        return JSONArray(response).toList()
    }
}

// DO: Proper architecture with DI and coroutines
@HiltViewModel
class GoodViewModel @Inject constructor(
    private val userRepository: UserRepository
) : ViewModel() {
    private val _users = MutableStateFlow<List<User>>(emptyList())
    val users: StateFlow<List<User>> = _users.asStateFlow()

    init {
        loadUsers()
    }

    private fun loadUsers() {
        viewModelScope.launch {
            try {
                _users.value = userRepository.getUsers()
            } catch (e: Exception) {
                // Handle error
            }
        }
    }
}

Reference Documentation

Detailed material lives alongside this skill and is read on demand:

  • Code Examples — Jetpack Compose App Structure, MVVM with ViewModel and StateFlow, Room Database, Retrofit API Service, Navigation with Compose, WorkManager Background Task

Resources

Documentation

Tools

Libraries

Testing

Community

Use it

Copy one of these into your project. Installing also returns the manifest and these snippets.

yaml
targets:
  - https://api.opensmartroute.ai/api/v1/registry/personamanagmentlayer-pcl-android-expert/manifest   # or paste the manifest below

Manifest

An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.

personamanagmentlayer-pcl-android-expert.ocm.jsonjson
{
  "ocm": "1",
  "id": "personamanagmentlayer-pcl-android-expert",
  "kind": "skill",
  "name": "android-expert",
  "description": "Expert in Android development with Jetpack Compose, Material Design, ViewModel, and modern Android architecture. Use when the user mentions mobile, Kotlin, Jetpack Compose, Material Design, or Google, or when the task involves Android Architecture, Android Components, Jetpack Libraries, or Activity/Fragment Lifecycle.",
  "publisher": "personamanagmentlayer",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "general"
    ],
    "tags": [
      "skill-md",
      "mobile",
      "android",
      "kotlin",
      "jetpack-compose",
      "material-design",
      "google",
      "skills-sh"
    ],
    "languages": [
      "en"
    ]
  },
  "quality_prior": 0.6,
  "examples": [
    "Expert in Android development with Jetpack Compose, Material Design, ViewModel, and modern Android architecture. Use when the user mentions mobile, Kotlin, Jetpack Compose, Material Design, or Google, or when the task involves Android Architecture, Android Components, Jetpack Libraries, or Activity/Fragment Lifecycle."
  ],
  "primary": false,
  "metadata": {
    "source": {
      "provider": "skills.sh",
      "repository": "https://github.com/personamanagmentlayer/pcl",
      "path": "stdlib/frameworks/android-expert/SKILL.md",
      "ref": "HEAD",
      "url": "https://github.com/personamanagmentlayer/pcl/blob/HEAD/stdlib/frameworks/android-expert/SKILL.md",
      "key": "personamanagmentlayer/pcl/stdlib/frameworks/android-expert/SKILL.md"
    },
    "allowed_tools": [
      "Read",
      "Write",
      "Edit",
      "Bash",
      "Grep",
      "Glob"
    ]
  },
  "instructions": "# Android Expert\n\nYou are an expert in Android development, Jetpack Compose, Kotlin, Material Design, and modern Android architecture.\n\n## Core Concepts\n\n### Android Architecture\n\n- **MVVM (Model-View-ViewModel)**: Recommended architecture pattern\n- **MVI (Model-View-Intent)**: Unidirectional data flow\n- **Clean Architecture**: Domain, data, presentation layers\n- **Repository Pattern**: Data source abstraction\n- **Use Cases/Interactors**: Business logic encapsulation\n- **Dependency Injection**: Hilt/Dagger for DI\n\n### Android Components\n\n- **Activity**: Single screen with UI, entry point\n- **F",
  "cost": {
    "context_tokens": 1540
  }
}

Fetch it by URL: GET /api/v1/registry/personamanagmentlayer-pcl-android-expert/manifest?version=1.0.0

Reviews

Star ratings from people who tried it. One review per account; edit yours any time.

No reviews yet. Install it, try it, and be the first to rate it.