From oh-my-forge
Performs comprehensive Kotlin code review on modified .kt files via git diff: runs gradlew build/test, detekt, ktlintCheck; checks null safety, coroutines, security; generates severity-categorized report.
npx claudepluginhub rlagycks/oh-my-forge --plugin oh-my-forge# Kotlin Code Review This command invokes the **kotlin-reviewer** agent for comprehensive Kotlin-specific code review. ## What This Command Does 1. **Identify Kotlin Changes**: Find modified `.kt` and `.kts` files via `git diff` 2. **Run Build & Static Analysis**: Execute `./gradlew build`, `detekt`, `ktlintCheck` 3. **Security Scan**: Check for SQL injection, command injection, hardcoded secrets 4. **Null Safety Review**: Analyze `!!` usage, platform type handling, unsafe casts 5. **Coroutine Review**: Check structured concurrency, dispatcher usage, cancellation 6. **Generate Report**: ...
/kotlin-reviewPerforms comprehensive Kotlin code review on modified .kt files via git diff: runs gradlew build/test, detekt, ktlintCheck; checks null safety, coroutines, security; generates severity-categorized report.
/kotlin-reviewReviews modified Kotlin files via git diff for idiomatic patterns, null safety, coroutines, and security. Runs gradlew build, detekt, ktlintCheck; generates severity-categorized report.
/kotlin-reviewKotlin code review for coroutines, null safety, sealed classes, and architecture patterns. Invokes the kotlin-reviewer agent.
/kotlin-reviewComprehensive code review for Kotlin and Jetpack Compose code.
/kotlin-reviewPerforms comprehensive Kotlin code review on modified .kt files via git diff: runs gradlew build/test, detekt, ktlintCheck; checks null safety, coroutines, security; generates severity-categorized report.
/kotlin-reviewPerforms comprehensive Kotlin code review on modified .kt files via git diff: runs gradlew build/test, detekt, ktlintCheck; checks null safety, coroutines, security; generates severity-categorized report.
This command invokes the kotlin-reviewer agent for comprehensive Kotlin-specific code review.
.kt and .kts files via git diff./gradlew build, detekt, ktlintCheck!! usage, platform type handling, unsafe castsUse /kotlin-review when:
!! without justificationwhen on sealed types# Build check
./gradlew build
# Static analysis
./gradlew detekt
# Formatting check
./gradlew ktlintCheck
# Tests
./gradlew test
User: /kotlin-review
Agent:
# Kotlin Code Review Report
## Files Reviewed
- src/main/kotlin/com/example/service/UserService.kt (modified)
- src/main/kotlin/com/example/routes/UserRoutes.kt (modified)
## Static Analysis Results
✓ Build: Successful
✓ detekt: No issues
WARNING: ktlint: 2 formatting warnings
## Issues Found
[CRITICAL] Force-Unwrap Null Safety
File: src/main/kotlin/com/example/service/UserService.kt:28
Issue: Using !! on nullable repository result
```kotlin
val user = repository.findById(id)!! // NPE risk
```
Fix: Use safe call with error handling
```kotlin
val user = repository.findById(id)
?: throw UserNotFoundException("User $id not found")
```
[HIGH] GlobalScope Usage
File: src/main/kotlin/com/example/routes/UserRoutes.kt:45
Issue: Using GlobalScope breaks structured concurrency
```kotlin
GlobalScope.launch {
notificationService.sendWelcome(user)
}
```
Fix: Use the call's coroutine scope
```kotlin
launch {
notificationService.sendWelcome(user)
}
```
## Summary
- CRITICAL: 1
- HIGH: 1
- MEDIUM: 0
Recommendation: FAIL: Block merge until CRITICAL issue is fixed
| Status | Condition |
|---|---|
| PASS: Approve | No CRITICAL or HIGH issues |
| WARNING: Warning | Only MEDIUM issues (merge with caution) |
| FAIL: Block | CRITICAL or HIGH issues found |
/kotlin-test first to ensure tests pass/kotlin-build if build errors occur/kotlin-review before committing/code-review for non-Kotlin-specific concernsagents/kotlin-reviewer.mdskills/kotlin-patterns/, skills/kotlin-testing/