Agent skill

To Java Migration

by OpenHands in OpenHands/extensions

Migrate COBOL code to idiomatic Java, preserving business logic while following Java best practices.

MITAuto-check passedDevelopment

Install To Java Migration

skills CLI
$ npx skills add OpenHands/extensions --skill to-java-migration -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install OpenHands/extensions to-java-migration --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/OpenHands/extensions.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/cobol-modernization/skills/to-java-migration .claude/skills/to-java-migration && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
to-java-migration
GitHub stars
157
Token cost
~518 tokens
SKILL.md length
204 words
Files
3 (incl. references)
Skills in repo
78
Repo updated
First seen
Licence
MIT

At a glance

Migrate COBOL code to idiomatic Java, preserving business logic while following Java best practices.

  • COBOL modernization projects
  • SKILL.md covers Code Style Requirements, Robustness Requirements, Configuration Requirements and Documentation Requirements, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Tasks that involve Legacy modernization

What it does

To Java Migration is an agent skill from OpenHands/extensions. Migrate COBOL code to idiomatic Java, preserving business logic while following Java best practices. Use for COBOL modernization projects.

Its SKILL.md is about 520 tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/cobol-to-java-example.md` and `references/datatype-mappings.md`). Compatibility notes: Requires Java 11+, Maven or Gradle

It sits in Development, covering Legacy modernization. It works with Java. The repository describes itself as: Public registry for OpenHands extensions. The licence is MIT.

When your agent uses it

  • COBOL modernization projects
  • Tasks that involve Legacy modernization

Example prompts

  • “/to-java-migration”

Requirements

  • Compatibility (from SKILL.md): Requires Java 11+, Maven or Gradle

What it can do on your machine

Read from SKILL.md and the folder at commit d008b81. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Requires Java 11+, Maven or Gradle

    From compatibility in the SKILL.md frontmatter.

Context cost

To Java Migration loads about 518 tokens when it runs, and up to ~1.1k if it reads all its reference files. Until then it costs about 39 tokens; SKILL.md has 204 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~39
When it runs · the whole SKILL.md, loaded when a task matches
~518
With references · SKILL.md plus every file in references/, read only if the agent opens them
~1.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from OpenHands/extensions at commit d008b81, republished under its MIT licence (© OpenHands). 204 words, ~518 tokens.

Download SKILL.mdSave it as .claude/skills/to-java-migration/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
to-java-migration
description
Migrate COBOL code to idiomatic Java, preserving business logic while following Java best practices. Use for COBOL modernization projects.
compatibility
Requires Java 11+, Maven or Gradle
license
MIT
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

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

© OpenHands, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (references) in plugins/cobol-modernization/skills/to-java-migration of OpenHands/extensions.

  • SKILL.md
  • references/cobol-to-java-example.md
  • references/datatype-mappings.md

Open the folder on GitHubat commit d008b81

Compare with similar skills

To Java Migration next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

To Java Migration compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
To Java Migration this skillOpenHands/extensions157—~518Automated safety check: PassMIT
Azure Communication Callingserver Javamicrosoft/skills3.1k5 repos~715Automated safety check: PassMIT
Modernization Flowgriddynamics/rosetta353—~1.7kAutomated safety check: PassApache-2.0
Approval Testing Toolkitlexler/skill-factory239—~1.2kAutomated safety check: PassApache-2.0
Azure Upgrademicrosoft/GitHub-Copilot-for-Azure2551 repos~1.5kAutomated safety check: PassMIT
Creating Description For Gh PRredis/jedis12k—~838Automated safety check: PassMIT

Similar skills

  • Official

    Azure Communication Services CallingServer (legacy) Java SDK.

    3.1k GitHub starsUsed in 5 repos~715 tokens
    DevelopmentAuto-check passed
  • Modernization Flow

    griddynamics/rosetta

    Workflow for converting, modernizing, upgrading, or re-architecting code (e.g.

    353 GitHub stars~1.7k tokensUpdated 7 days ago
    Backend & APIsAuto-check passed
  • Approval Testing Toolkit

    lexler/skill-factory

    Writes snapshot-style approval tests in Python, JavaScript, TypeScript or Java, comparing output against an approved file instead of writing individual assertions.

    239 GitHub stars~1.2k tokensUpdated 1 mo ago
    Testing & QAAuto-check passed
  • Azure Upgrade

    microsoft/GitHub-Copilot-for-Azure

    Official

    Assess and upgrade Azure workloads between plans, tiers, or SKUs, or modernize Azure SDK dependencies in source code.

    255 GitHub starsUsed in 1 repo~1.5k tokens
    DatabasesAuto-check passed
  • Official

    Generate a clear, concise GitHub PR title and description from the diff between two local git branches, and save it to prDescription.md in the repo root.

    12k GitHub stars~838 tokensUpdated today
    DevelopmentAuto-check passed
  • Code Refactoring Workflow

    luongnv89/claude-howto

    Guides systematic, test-backed refactoring in the style of Martin Fowler, moving through research, planning and small incremental changes with your approval at each phase.

    42k GitHub stars~3.1k tokensUpdated 7 days ago
    DevelopmentAuto-check passed

More from OpenHands/extensions

All 78 skills in this repo
  • Agent Readiness Report

    OpenHands/extensions

    Evaluate how well a codebase supports autonomous AI-assisted development.

    157 GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Discord

    OpenHands/extensions

    Build and automate Discord integrations (bots, webhooks, slash commands, and REST API workflows).

    157 GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • GitHub

    OpenHands/extensions

    Interact with GitHub repositories, pull requests, issues, and workflows using the GITHUBTOKEN environment variable and GitHub CLI.

    157 GitHub stars~1.7k tokensUpdated today
    Auto-check passed
  • GitHub Issue To PR

    OpenHands/extensions

    Create an automation that implements GitHub issues when a configurable trigger label is applied.

    157 GitHub stars~4.4k tokensUpdated today
    Auto-check passed
  • GitHub Repo Monitor

    OpenHands/extensions

    This skill should be used when the user asks to "monitor a GitHub repository", "watch GitHub for issues or PRs", "respond to @OpenHands mentions on GitHub", "set up an OpenHands GitHub integration"…

    157 GitHub stars~3.1k tokensUpdated today
    Auto-check passed
  • GitLab Issue To Mr

    OpenHands/extensions

    Create an automation that implements GitLab issues when a configurable trigger label is applied.

    157 GitHub stars~4.9k tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about To Java Migration

What does To Java Migration do?

Migrate COBOL code to idiomatic Java, preserving business logic while following Java best practices. To Java Migration is an agent skill from OpenHands/extensions. Migrate COBOL code to idiomatic Java, preserving business logic while following Java best practices.

When should I use To Java Migration?

To Java Migration fits situations like: COBOL modernization projects; tasks that involve Legacy modernization.

How do I install To Java Migration in Claude Code?

Run `npx skills add OpenHands/extensions --skill to-java-migration -a claude-code`. Or copy the skill folder (plugins/cobol-modernization/skills/to-java-migration in OpenHands/extensions) into .claude/skills/to-java-migration in your project. Claude Code loads it when a task matches its description.

How do I install To Java Migration in Codex?

Run `npx skills add OpenHands/extensions --skill to-java-migration -a codex`. Or copy the skill folder (plugins/cobol-modernization/skills/to-java-migration in OpenHands/extensions) into .agents/skills/to-java-migration in your project. Codex loads it when a task matches its description.

Can I use To Java Migration in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add OpenHands/extensions --skill to-java-migration -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/to-java-migration, .gemini/skills/to-java-migration, .github/skills/to-java-migration and .opencode/skills/to-java-migration in your project.

What does To Java Migration need to run?

SKILL.md names no scripts, command-line tools or credentials: To Java Migration is instructions for the agent only. Compatibility (from SKILL.md): Requires Java 11+, Maven or Gradle.

Does To Java Migration access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is To Java Migration safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does To Java Migration use?

To Java Migration is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does To Java Migration use?

About 518 tokens (SKILL.md is roughly 2.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 546 tokens, read only when the agent opens those files.

What are the alternatives to To Java Migration?

Skills that share tags, products or a category with To Java Migration: Azure Communication Callingserver Java (microsoft/skills, 3.1k stars), Modernization Flow (griddynamics/rosetta, 353 stars), Approval Testing Toolkit (lexler/skill-factory, 239 stars) and Azure Upgrade (microsoft/GitHub-Copilot-for-Azure, 255 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains To Java Migration?

OpenHands (a GitHub organization) maintains it in OpenHands/extensions, which has 157 GitHub stars. The repository holds 78 skills in this directory. The repository was last updated on October 6, 2026.

Source: OpenHands/extensions on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.