.claude/skills/write-feature/SKILL.md
Use when adding a new feature to Alkaa end-to-end — from domain models through data layer, Koin DI, and up to presentation. Triggers on tasks like "add a new feature", "create [feature] feature", "implement [feature] functionality", or "add [feature] to the app".
npx skillsauth add igorescodro/alkaa write-featureInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
A complete Alkaa feature spans five layers: domain models → repository interface → data implementation → Koin DI → presentation. Each layer has strict conventions. This skill guides you through all five in order.
Before starting: Use superpowers:brainstorming to align on scope and API design. Use superpowers:writing-plans if the feature is large.
references/DOMAIN_LAYER.mdreferences/DATA_LAYER.md
write-local-datasource skill firstreferences/KOIN_DI.md| Rule | Details |
|------|---------|
| Use cases are internal | internal visibility — never public |
| One use case = one action | Never inject another ViewModel or feature module directly |
| Flow vs. suspend | Flow<T> for streams; suspend fun for one-shot mutations. No Result<T> wrapping |
| Mappers required | Never return the entity directly — local ↔ repo ↔ domain separation is required |
| ViewModels inject use cases | Never inject repositories into ViewModels |
| Register in KoinHelper immediately | Missing registration causes silent runtime crashes |
| API module only when shared | Only create <name>-api when another feature depends on this one → see references/FEATURE_API_MODULE.md |
| Interactors for cross-feature side effects | When a use case must trigger an action in another feature, define an Interactor interface in domain/interactor/ — never import the feature directly → see references/INTERACTOR.md |
write-viewmodel skillwrite-composable skillnavigation skilllocalization skillwrite-design-system-component skill before implementing the composablewrite-unit-tests skillwrite-ui-tests skillwrite-e2e-tests skill| Mistake | Fix |
|---------|-----|
| suspend fun for a stream | Use Flow<T> for streams; suspend only for one-shot mutations |
| Wrapping return values in Result<T> | Don't — exceptions propagate through Flow |
| One use case doing two things | Create separate use cases |
| Skipping the mapper | Local ↔ repo ↔ domain separation is required |
| Injecting a repository into the ViewModel | ViewModels inject use cases only |
| Feature depending directly on another feature | Create a <name>-api module |
| Registering in KoinHelper after the feature works | Register immediately — silent runtime crashes |
| Reusing the domain model as the view model | Keep them separate — UI concerns must not bleed into domain |
| Importing a feature module directly into a use case | Define an Interactor interface in domain/interactor/ instead → see references/INTERACTOR.md |
development
A skill for reviewing Android code before it is pushed to production.
documentation
Use when writing a new ViewModel or modifying an existing one in the Alkaa project. Triggers on tasks like "add a ViewModel", "create VM for X screen", "implement state handling", or "connect use case to UI".
testing
Use when writing or modifying unit tests in the Alkaa project — triggers on tasks like "add a test", "write tests for X", "test this ViewModel", "cover this use case with tests", or "add unit test coverage".
testing
Use when writing or modifying UI/Compose instrumented tests in the Alkaa project — triggers on tasks like "add a UI test", "test this composable", "add instrumented test", "test this screen behavior".