Skip to content

Add Java-to-Kotlin conversion skill#10

Merged
Tapchicoma merged 1 commit intomainfrom
add-java-to-kotlin-skill
Mar 20, 2026
Merged

Add Java-to-Kotlin conversion skill#10
Tapchicoma merged 1 commit intomainfrom
add-java-to-kotlin-skill

Conversation

@e5l
Copy link
Copy Markdown
Member

@e5l e5l commented Mar 17, 2026

Summary

  • Adds kotlin-tooling-java-to-kotlin skill for converting Java source files to idiomatic Kotlin
  • Extracts the conversion methodology from the j2k-vscode extension: 4-step precognition process (faithful translation → nullability → collections → idioms) with 5 invariants checked at each step
  • Includes framework-aware conversion guidance for 12 frameworks, each in a separate reference file loaded only when matching imports are detected:
    • Spring — constructor injection, @Value escaping, @Bean/@Transactional openness
    • Lombok — full annotation removal and Kotlin equivalent mapping
    • Hibernate/JPA — open entities, no data classes, annotation site targets
    • Jackson@field:/@get: dual annotation site targets
    • Micronaut — constructor injection, AOP openness
    • Quarkus — CDI no-arg constructors, Panache entities
    • Dagger/Hilt@Inject constructor syntax, object modules
    • RxJava — Observable/Single/Completable → Flow/suspend mapping
    • JUnit/TestNG — JUnit 4→5 migration, kotlin.test assertions
    • Guice — module binding DSL, @Named site targets
    • Retrofit/OkHttpCall<T> → suspend, interceptor SAM conversion
    • Mockito — MockK conversion table and mockito-kotlin alternative
  • Includes known issues reference (keyword conflicts, SAM ambiguity, platform types, etc.)
  • Includes post-conversion verification checklist

Test plan

  • CI validates skill directory naming convention (kotlin-tooling-java-to-kotlin)
  • CI validates SKILL.md frontmatter via Flash-Brew-Digital/validate-skill action
  • Manual test: convert a sample Java file using the skill's methodology
  • Verify framework detection table covers all 12 reference files

🤖 Generated with Claude Code

@e5l
Copy link
Copy Markdown
Member Author

e5l commented Mar 18, 2026

@evilya could you please check why the CI status is stuck?

Adds kotlin-tooling-java-to-kotlin skill that converts Java source files
to idiomatic Kotlin using a 4-step conversion methodology with 5 invariants.
Includes framework-aware guidance for 12 frameworks (Spring, Lombok, Hibernate,
Jackson, Micronaut, Quarkus, Dagger/Hilt, RxJava, JUnit, Guice, Retrofit,
Mockito), each in separate reference files loaded only when matching imports
are detected.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@e5l e5l force-pushed the add-java-to-kotlin-skill branch from 90d0419 to 699e6b3 Compare March 18, 2026 12:00
@evilya
Copy link
Copy Markdown
Collaborator

evilya commented Mar 18, 2026

@e5l I guess #19 should fix it, but it might require us to re-trigger workflows. You can ignore it for now

@e5l
Copy link
Copy Markdown
Member Author

e5l commented Mar 18, 2026

The merge is blocked for me cause I'm not the owner. If you need help with reviewing feel free to add me in

@evilya
Copy link
Copy Markdown
Collaborator

evilya commented Mar 18, 2026

Same, I also don't have permission to merge without checks. @Tapchicoma said he would take a look at it

@d-ambatenne
Copy link
Copy Markdown
Collaborator

@e5l have also evaled this one as the skills in the backend repo?

@e5l
Copy link
Copy Markdown
Member Author

e5l commented Mar 20, 2026

Yep, it's the essence of the agent we built for the j2k during internship

@Tapchicoma Tapchicoma merged commit 8fc58af into main Mar 20, 2026
4 checks passed
@Tapchicoma Tapchicoma deleted the add-java-to-kotlin-skill branch March 20, 2026 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants