Java api consistency validator
Skill ArabelaTso/Skills-4-SE/skills/java-api-consistency-validator
A curated list of 180+ useful Claude Skills for Software Engineering and resources for customizing AI for SE workflows.
npx -y skills add ArabelaTso/Skills-4-SE --skill java-api-consistency-validatorAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
What its author says it does
Copied from the file, not written here
Validate API consistency between two versions of Java libraries. Use when you need to compare API behavior, signatures, and exceptions between Java library versions to identify breaking changes, incompatible modifications, and behavior differences. The skill performs static analysis of Java code, compares method signatures, class definitions, interface changes, parameter types, return types, exception declarations, and generates a detailed JSON report with breaking changes, warnings, and migration guidance. Supports Java libraries and packages.
SKILL.md
2.6 KB, as published. Nobody here has run it
Java API Consistency Validator
Overview
This skill validates API consistency between two versions of Java libraries by comparing signatures, behavior, and exceptions. It identifies breaking changes, incompatible modifications, and provides detailed reports to guide safe API migration or upgrade.
Quick Start
# Compare two versions of a Java library
python scripts/validate.py /path/to/old_version /path/to/new_version
# Specify output file
python scripts/validate.py old_lib/ new_lib/ --output report.json
What Gets Validated
- Method Signatures - Parameters, return types, modifiers
- Class Definitions - Methods, inheritance, interfaces
- Interface Changes - Method additions, removals
- Parameter Changes - Added, removed, or modified parameters
- Return Type Changes - Modified return types
- Exception Declarations - throws clauses
- Removed APIs - Deleted classes, interfaces, or methods
Validation Report
The tool generates a JSON report with:
- Breaking Changes: API removals, incompatible modifications
- Warnings: Type changes, signature modifications
- Info: New additions, non-breaking changes
- Summary: Total issues by severity
Example report:
{
"summary": {
"breaking_changes": 3,
"warnings": 5,
"info": 2
},
"breaking_changes": [
{
"type": "method_removed",
"class": "UserService",
"method": "getUser",
"severity": "breaking",
"message": "Method 'UserService.getUser' was removed"
}
]
}
Usage
python scripts/validate.py <old_version_path> <new_version_path> [--output <report.json>]
The validator exits with code 1 if breaking changes are found, 0 otherwise.
Tips
- Run validation before upgrading dependencies
- Review breaking changes carefully
- Check warnings for potential issues
- Use in CI/CD pipelines to catch API changes
- Compare against semantic versioning expectations
- Validate before releasing new library versions