Skip to content
Agent Orchestration
Skill

/to-java-migration

Migrate COBOL code to idiomatic Java, preserving business logic while following Java best practices. Use for COBOL modernization projects.

From plugin
extensions
18489 skills4 commands

Claude Code

$ npx -y skills add openhands/extensions --skill to-java-migration --agent claude-code

SKILL.md

to-java-migration.SKILL.md
name: to-java-migration
description: Migrate COBOL code to idiomatic Java, preserving business logic while following Java best practices. Use for COBOL modernization projects.
license: MIT
compatibility: Requires Java 11+, Maven or Gradle
triggers:
  - cobol to java
  - cobol migration
  - cobol modernization
  - migrate cobol

Migrate COBOL code to idiomatic Java, preserving all business logic.

Code Style Requirements

Write idiomatic Java, NOT literal COBOL translations:

  • Use Java conventions: camelCase names, standard collections (List, Map)
  • Use Java standard library instead of rolling your own
  • No god classes — split into cohesive, single-responsibility classes
  • No TODO comments or stub implementations — fully implement everything

Robustness Requirements

  • Validate inputs at method entry (null checks, range validation)
  • Use try-catch for all I/O and external operations
  • Use try-with-resources for files, streams, connections
  • Handle errors gracefully with meaningful messages

Configuration Requirements

  • No hardcoded file paths or credentials — use environment variables
  • No magic numbers — use named constants
  • Make limits and timeouts configurable

Documentation Requirements

  • Add COBOL references: `// COBOL equivalent: BNK1CRA.cbl 145-167`
  • Document assumptions made during conversion
  • Add Javadoc to public methods

Testing Requirements

If test fixtures exist (see `cobol-build-setup` skill):

  • Create a JUnit test class for each migrated program
  • Load inputs from fixtures, assert output matches expected (golden) output
  • All tests must pass before migration is complete

References

  • See [references/cobol-to-java-example.md](references/cobol-to-java-example.md) for a complete transformation example
  • See [references/datatype-mappings.md](references/datatype-mappings.md) for COBOL→Java type mappings

Done When

✓ Code compiles without errors ✓ All JUnit tests pass (Java output matches COBOL golden output) ✓ No TODO or stub implementations remain ✓ COBOL references documented in comments

Read more
@openhands
Ships withextensions

This repository is the public extensions registry for OpenHands. It contains reusable, shareable skills, plugins, and Agent Canvas Apps that customize agent behavior and interfaces. Skills overview docs: SDK skill guide:

Stars on GitHub

Momentum

stars in total
184
Star history of openhands/extensions on GitHub, a chart by star-history.com

Other skills on extensions.

build-setup

build-setup

Set up build environment and test fixtures for COBOL-to-Java migrations. Creates compilation infrastructure for both languages…

cobol-modernization

cobol-modernization

End-to-end COBOL to Java migration workflow. Handles build setup, mainframe dependency removal, and code migration with test…

mainframe-planning

mainframe-planning

Create a transformation guide for replacing mainframe-specific COBOL constructs with standard COBOL equivalents. Use when…

mainframe-removal

mainframe-removal

Apply mainframe dependency transformations to COBOL code using a pre-generated transformation guide. Converts CICS/VSAM…

migration-mapping

migration-mapping

Create a mapping from source language files to target language files for code migrations. Use when evaluating or documenting a…

More skills from other plugins.

1password

1password

Set up and use 1Password CLI for sign-in, desktop integration, and reading or injecting secrets.

openclaw4d395k
@steipete@steipeteInstall Skill
jira-tickets

jira-tickets

Read and update Jira tickets through Orca's saved Jira connections. Use when a task comes from Jira or the user asks for Jira…

orca2d128k
@stablyai@stablyaiInstall Skill
agentmail

agentmail

Use your assigned AgentMail inbox to read email tasks, explicitly send or reply, and check delivery. Provided automatically by…

paperclip3d114k
@paperclipai@paperclipaiInstall Skill
adr-create

adr-create

Create a new Architecture Decision Record with sequential numbering and AgentDB registration

@ruvnet@ruvnetInstall Skill

Questions about to-java-migration.

Which coding agents can use to-java-migration?
to-java-migration installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.