find-module

Determine module placement for new code in Kotlin Multiplatform projects.

219|41|Updated Feb 21, 2024
One-click install
npx skills add https://github.com/proto-at-block/bitkey --skill find-module
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: find-module
Source: https://github.com/proto-at-block/bitkey/tree/main/app/ai-rules/skills/find-module
Command: npx skills add https://github.com/proto-at-block/bitkey --skill find-module

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Determine the correct module placement for new code in a Kotlin Multiplatform project, ensuring alignment with domain, libs, and ui structures and proper module types.

Core Features & Use Cases

  • Scan the existing module index to locate related modules in the same domain area.
  • Determine the appropriate module type (:public/:impl/:fake) for the new code.
  • Place code in the correct location (app/domain/, app/libs/, app/ui/) and in the correct source set (commonMain, androidMain, iosMain).

Quick Start

Identify the new feature, consult the domain's module index, and place the code in the appropriate KMP module under app/ (domain/, libs/, ui/) with commonMain as the default.

Frequently Asked Questions about find-module

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

FAQPage Schema
How do I determine the correct module placement for new code in a Kotlin Multiplatform project?

To determine module placement in a Kotlin Multiplatform project, consult the domain's module index to locate related modules, then place the code in the appropriate app/ subdirectory (domain/, libs/, or ui/) based on its functional area.

When should I place KMP code in commonMain versus androidMain or iosMain?

Place KMP code in commonMain by default for shared logic across platforms. Use androidMain or iosMain source sets only when the new code requires platform-specific implementations for Android or iOS.

How do I choose the right module type for new code in a multiplatform architecture?

Choose the right module type by checking the module index and docs to see if the new code requires a public API, an internal implementation, or a fake for testing, then select the matching :public, :impl, or :fake module type accordingly.

Does this approach work for organizing code across domain, libs, and ui areas?

Yes, this approach works for organizing code across domain, libs, and ui areas. It scans the existing module index to find related modules within the same area and places the new code in the corresponding app/ subdirectory structure.

What's the best way to locate related modules before adding new code to a KMP project?

The best way to locate related modules is to scan the existing module index within the target domain area. This ensures the new code aligns with existing structures before selecting a module type and source set.