azure/dup-classes
Verify whether generated Java classes duplicate openai-java models by comparing fields/types (names may differ). Use when checking for duplicate model coverage.
npx skills add https://github.com/Azure/azure-sdk-for-java --skill dup-classes
Use this skill to compare generated Java models against the openai-java dependency. The goal is field-by-field comparison of model shapes, even when class or field names differ.
src/main/java/...)pom.xml (module) to resolve the openai-java dependency versionfind . -name pom.xml). If multiple, ask which module to use.openai-java (or an explicit group/artifact provided by the user).~/.m2/repository.openai-java-core, not the top-level openai-java artifact.class and record declarations.jar tf <jar> | grep '\.class$' (filter by package hints if provided).record, use the component list in the record declaration.class, extract non-static field declarations (type + count) and note any @JsonProperty names.toJson/fromJson methods for the actual JSON keys used in serialization.javap -classpath <jar> -p <FQCN> to list fields (ignore static, validated, hashCode$delegate, additionalProperties).@JsonProperty keys from the sources JAR (*-sources.jar) for JSON key comparison.@JsonProperty (openai-java) vs toJson/fromJson string literals (generated).BinaryData ↔ JsonValue (both represent untyped JSON), Map<String,BinaryData> ↔ Map<String,JsonValue>, Java enum ↔ Kotlin string enum.Actionable duplicates — standalone models not in any type hierarchy. These can potentially be suppressed and replaced with the openai-java equivalent. Examples: ComparisonFilter, Reasoning.
Structural equivalents — classes that produce identical JSON but participate in a discriminator hierarchy (e.g., extends Tool, extends TextResponseFormatConfiguration). The SDK's polymorphic serialization (Tool.fromJson() dispatches to FunctionTool.fromJson(), etc.) requires these to exist. They are NOT actionable duplicates. Examples: FunctionTool, FileSearchTool, ComputerUsePreviewTool.
Partial matches — classes with most fields matching but extra Azure-specific fields. Note the extra fields. Examples: CodeInterpreterTool (extra container), WebSearchTool (extra custom_search_configuration).
@@alternateType or @@access(internal) would be the right suppression mechanism (see dedup-openai skill).rg -n "^(public\s+)?(final\s+)?(class|record)\s+" <generated_root>
grep -E '^\s+private\s+' <file> | grep -v 'static\s'
grep -E 'jsonWriter\.write|"[a-z_]+"' <file> | grep -v '//'
javap -classpath <jar> -p <fully.qualified.ClassName>
jar xf <sources-jar> main/com/openai/models/<Class>.kt
grep '@JsonProperty' main/com/openai/models/<Class>.kt
grep 'extends\s' <file> # If it extends Tool, TextResponseFormatConfiguration, etc. → structural
search-m2 if you need help locating the dependency version or JAR path.JsonSerializable). Compare at the JSON wire level, not at the Java API level.Take azure/dup-classes from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.