Migrate COBOL code to idiomatic Java, preserving business logic while following Java best practices. Use for COBOL modernization projects.
Scanned 6/5/2026
Install via CLI
openskills install OpenHands/extensions---
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
No comments yet. Be the first to comment!
Practical guide to testing web applications with screen readers for comprehensive accessibility validation.
克劳德代码会话的正式评估框架,实施评估驱动开发(EDD)原则
Go测试模式包括表格驱动测试、子测试、基准测试、模糊测试和测试覆盖率。遵循TDD方法论,采用地道的Go实践。
使用pytest、TDD方法、夹具、模拟、参数化和覆盖率要求的Python测试策略。
在编写新功能、修复错误或重构代码时使用此技能。强制执行测试驱动开发,包含单元测试、集成测试和端到端测试,覆盖率超过80%。