add-domain-modulelisted
Install: claude install-skill komodgn/meta-android
# Domain Module Creation Skill
This skill creates a new domain module in the `domain/` package.
## Prerequisites & Pre-steps
Before generating the module, confirm:
1. **Module Naming**:
- `{domain}`: Must be **snake_case** (e.g., `photo_tag`).
- `{Domain}`: Must be **PascalCase** (e.g., `PhotoTag`).
2. **Module Purpose** (What business domain this represents)
3. **Repository Interfaces** (What data contracts are needed)
4. **Use Cases** (What business operations are needed)
## Module Structure
Each domain module consists of a single `api` submodule:
```
domain/
└── {domain}/
└── api/ ← Public contracts (interfaces only)
├── build.gradle.kts
└── src/main/java/com/metasearch/android/domain/{domain}/api/
├── repository/
│ └── {Domain}Repository.kt
└── usecase/
└── {Action}{Domain}UseCase.kt
```
## Implementation Steps
### 1. Gradle Configuration (`domain/{domain}/api/build.gradle.kts`)
```kotlin
plugins {
alias(libs.plugins.metasearch.jvm.library)
}
dependencies {
api(projects.data.domain)
implementation(libs.kotlinx.coroutines.core)
}
```
### 2. File Structure
Create the source directory:
`domain/{domain}/api/src/main/java/com/metasearch/android/domain/{domain}/api/`
### 3. Key Files to Create
#### Repository Interface (`repository/{Domain}Repository.kt`)
```kotlin
package com.metasearch.android.domain.