Code quality
Skill thetruong1099/android-mvi-base-code/.claude/skills/code-quality
npx -y skills add thetruong1099/android-mvi-base-code --skill code-qualityAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Code quality guidelines for this project. Covers ktlint configuration and commands, architecture/Kotlin/Compose/error/testing review checklists, git branch naming and commit message conventions, and module dependency enforcement rules. Automatically applied during code review.
SKILL.md
2.6 KB, as published. Nobody here has run it
Code Quality
Ktlint
Configured via org.jlleitschuh.gradle.ktlint in root build.gradle.kts.
./gradlew ktlintCheck # Check all
./gradlew ktlintFormat # Auto-format all
./gradlew :feature:sample:ktlintCheck # Check single module
.editorconfig rules:
[*.{kt,kts}]
ktlint_code_style = android_studio
ktlint_standard_no-wildcard-imports = disabled
ktlint_standard_package-name = disabled
Code Review Checklist
Architecture
- Follows MVI pattern (State/Event/Effect)
- Domain layer has no Android imports
- UseCase follows Interface + Impl pattern
- Screen has Stateful + Stateless split
- Proper use of BaseScreenComponent
Kotlin
- No
!!operator (userequireNotNullor safe calls) - Exhaustive
whenfor sealed classes -
data classfor State,sealed interfacefor Event/Effect - Extension functions are focused and reusable
Compose
-
collectAsStateWithLifecycle()for state collection -
LaunchedEffectoronEffectcallback for effects -
MaterialTheme.spacinginstead of hardcoded dp - Preview uses
FakeBaseViewModel+TemplateThemePreview - Stable keys for LazyList items
Error Handling
- Errors go through
AppErrorsealed class -
showErrorToast(error)in ViewModel - No swallowed exceptions
- New error types added to both
ExceptionMapperandErrorHandler
Testing
- ViewModel tests for
onTriggerEvent()and state changes - UseCase tests for business logic
-
MainDispatcherRuleused in coroutine tests
Git Conventions
Branch Naming
feature/add-profile-feature
fix/data-loading-crash
refactor/extract-base-screen
chore/update-dependencies
Commit Messages
feat: add profile functionality
fix: resolve data loading crash on slow network
refactor: extract BaseScreenComponent
chore: upgrade Gradle, AGP, Kotlin versions
test: add SampleViewModel unit tests
docs: update agent skills documentation
Module Dependency Enforcement
When adding new dependencies, verify:
- Feature modules NEVER depend on
data:* - Domain modules NEVER import
android.* - Feature modules don't depend on other feature modules (only
feature:core) - New modules use convention plugins from
build_logic/