android-bug-hunting-kmp-defects

Detect platform leaks and expect/actual mismatches in Kotlin Multiplatform code.

Updated Jan 2, 2024
One-click install
npx skills add https://github.com/Mithrandir21/game-deals-android-app --skill android-bug-hunting-kmp-defects
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: android-bug-hunting-kmp-defects
Source: https://github.com/Mithrandir21/game-deals-android-app/tree/main/.claude/skills/android-bug-hunting-kmp-defects
Command: npx skills add https://github.com/Mithrandir21/game-deals-android-app --skill android-bug-hunting-kmp-defects

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

It helps developers locate and analyze platform-specific defects and mismatches in Kotlin Multiplatform projects, reducing debugging time and improving code reliability.

Core Features & Use Cases

  • Bug Pattern Detection: Finds expect/actual mismatches, platform leaks, and platform-specific code issues in shared Kotlin modules.
  • Cross-Platform Analysis: Checks resource access, type misusage, and interop pitfalls across different targets like Android, iOS, JVM, and Native.
  • Use Case: A developer wants to verify if their shared code correctly abstracts platform-specific APIs and avoids common KMP pitfalls; this tool provides targeted reports to pinpoint issues.

Quick Start

Run the script to scan source sets for expect declarations and platform-specific code issues in your Kotlin Multiplatform project.

Frequently Asked Questions about android-bug-hunting-kmp-defects

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find expect/actual mismatches in a Kotlin Multiplatform project?

To find expect/actual mismatches in a Kotlin Multiplatform project, run a script to scan source sets and analyze shared modules for declarations that do not align across platform targets. This generates targeted reports pinpointing the specific code issues.

What are common platform leak issues in Kotlin Multiplatform code?

Common platform leak issues in Kotlin Multiplatform code occur when platform-specific APIs or resources are improperly exposed in shared code. Analyzing the codebase detects these leaks alongside type misusage and interop pitfalls across Android, iOS, JVM, and Native targets.

How do I check for cross-platform resource access issues in shared Kotlin modules?

Check for cross-platform resource access issues in shared Kotlin modules by analyzing the code to verify that shared code correctly abstracts platform-specific APIs. This cross-platform analysis identifies unsafe resource usage across different targets.

Does Kotlin Multiplatform bug detection work for both iOS and Android targets?

Yes, Kotlin Multiplatform bug detection works for iOS and Android targets, as well as JVM and Native. The analysis checks for platform leaks, expect/actual mismatches, and interop issues across all these specified targets to ensure safe cross-platform development.

What is the best way to diagnose interop pitfalls in Kotlin Multiplatform shared code?

The best way to diagnose interop pitfalls in Kotlin Multiplatform shared code is to run a targeted analysis script that scans for type misusage and platform-specific code issues. This reduces debugging time by providing reports on cross-platform interop defects.