Agent skill
build-setup
Set up build environment and test fixtures for COBOL-to-Java migrations. Creates compilation infrastructure for both languages and generates golden test data.
Install this agent skill to your Project
npx add-skill https://github.com/OpenHands/extensions/tree/main/plugins/cobol-modernization/skills/build-setup
SKILL.md
Set up a build environment and create test fixtures for validating COBOL-to-Java migrations.
To install GnuCOBOL, run: ./scripts/install-gnucobol.sh
Phase 1: Build Setup
COBOL Build
- Find a way to compile and run the COBOL code (e.g., GnuCOBOL)
- Verify at least one program compiles and executes
- Note any dependencies or setup required
Java Build
- Initialize a Java project alongside the COBOL code (Maven or Gradle)
- Set up standard directory structure:
src/main/java,src/test/java - Include JUnit 5 as a test dependency
- Verify the project builds (even if empty)
Phase 2: Test Fixture Generation
For each major COBOL program:
Create Synthetic Test Inputs
- Save to:
test-fixtures/inputs/{PROGRAM_NAME}/ - Create 3-5 test cases per program covering:
- Normal/happy path (valid, typical data)
- Edge cases (empty input, maximum values, boundary conditions)
- Error cases (invalid formats, missing required fields)
Generate Golden Outputs
- Run each COBOL program with each test input
- Save COBOL output to:
test-fixtures/expected_outputs/{PROGRAM_NAME}/ - These become the "golden" outputs that Java must match
Create Test Manifest
Save to test_manifest.json:
{
"PROGRAM1": {
"description": "Brief description of what this program does",
"test_cases": [
{
"name": "normal_invoice",
"input": "inputs/PROGRAM1/test_001.dat",
"expected": "expected_outputs/PROGRAM1/test_001.out",
"description": "Happy path"
}
]
}
}
Deliverables
- build_notes.md — Build instructions for COBOL and Java
- test-fixtures/ — Directory with
inputs/andexpected_outputs/ - test_manifest.json — JSON manifest of all test cases
Priority
Focus on programs with core business logic (transactions, calculations, data processing). UI-heavy programs (menu screens, reports) are lower priority.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
releasenotes
Generate formatted changelogs from git history since the last release tag. Use when preparing release notes that categorize changes into breaking changes, features, fixes, and other sections.
bitbucket
Interact with Bitbucket repositories and pull requests using the BITBUCKET_TOKEN environment variable. Use when working with code hosted on Bitbucket or managing Bitbucket resources via API.
add-skill
Add an external skill from a GitHub repository to the current workspace. Use when users want to import, install, or add a skill from a GitHub URL (e.g., `/add-skill https://github.com/OpenHands/extensions/tree/main/skills/codereview` or "add the codereview skill from https://github.com/OpenHands/extensions/"). Handles fetching the skill files and placing them in .agents/skills/.
add-javadoc
Add comprehensive JavaDoc documentation to Java classes and methods. Use when documenting Java code, adding API documentation, or improving code documentation.
flarglebargle
A test skill that responds to the magic word "flarglebargle" with a compliment. Use for testing skill activation and trigger functionality.
codereview-roasted
Brutally honest code review in the style of Linus Torvalds, focusing on data structures, simplicity, and pragmatism. Use when you want critical, no-nonsense feedback that prioritizes engineering fundamentals over style preferences.
Didn't find tool you were looking for?