Agent skill
mainframe-removal
Apply mainframe dependency transformations to COBOL code using a pre-generated transformation guide. Converts CICS/VSAM constructs to standard COBOL.
Install this agent skill to your Project
npx add-skill https://github.com/OpenHands/extensions/tree/main/plugins/cobol-modernization/skills/mainfraime-removal
SKILL.md
Apply the transformations from a transformation guide to convert mainframe-specific COBOL to standard COBOL.
Prerequisite: A transformation guide must exist (see cobol-mainframe-planning skill).
Transformation Requirements
Data Operations
- Replace each CICS/VSAM construct with its standard COBOL equivalent per the plan
- Add FILE STATUS checks after EVERY file operation:
- Check for success (00) before proceeding
- Handle "not found" (23) distinctly from I/O errors (3x)
- Handle "file not exists" (35) at OPEN time
- Add explicit CLOSE statements in all code paths (including error paths)
UI/Terminal Operations (BMS maps, SEND/RECEIVE)
- Replace with simple stubs or ACCEPT/DISPLAY statements
- Do NOT spend time replicating screen layouts
- Focus on preserving data flow, not UI fidelity
Error Handling
- Replace CICS RESP/RESP2 checks with equivalent FILE STATUS logic
- Replace HANDLE CONDITION with explicit status checking after operations
- Ensure error paths don't leave files open
See references/cics-transformation-examples.md for before/after code examples.
Verification
After transformation:
- Code MUST compile without errors
- Test with valid input → should execute core business logic
- Test with missing/invalid files → should fail gracefully, not crash
Preserve
- All original business logic
- Data transformations and calculations
- Validation rules
Checklist
- All EXEC CICS commands replaced
- FILE STATUS declared for all files
- FILE STATUS checked after every I/O operation
- CLOSE statements in all code paths
- Code compiles successfully
- Basic test execution passes
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?