ワンクリックで
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.
// Verify whether generated Java classes duplicate openai-java models by comparing fields/types (names may differ). Use when checking for duplicate model coverage.
Interactive wizard that walks service teams through creating a package-specific skill for their Azure SDK package. Scans the package, detects customization patterns, scaffolds a SKILL.md with references, validates with vally lint, and registers in find-package-skill. WHEN: create package skill; add service skill; bootstrap skill for package; new package skill; skill for my SDK package; write skill for search; write skill for cosmos.
**UTILITY SKILL** — Must be consulted before making any changes to packages under sdk/. Provides package-specific domain knowledge that prevents common mistakes. WHEN: add feature to package; fix bug in package; modify package code; regenerate from typespec; change client library.
Generate code from TypeSpec via tsp-client (update, sync, generate). Requires a tsp-location.yaml in the current working directory. Supports updating the commit hash before running.
Suppress generated Java classes that duplicate openai-java models, using @@alternateType in TypeSpec and manual serialization bridges. Use after dup-classes has identified actionable duplicates.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Update CHANGELOG.md and README.md for an Azure SDK for Java package based on a GitHub PR. Use when the user wants to write or update release notes, changelogs, or readme docs from a PR reference.
| name | dup-classes |
| description | Verify whether generated Java classes duplicate openai-java models by comparing fields/types (names may differ). Use when checking for duplicate model coverage. |
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 versionLocate the pom.xml in the current directory tree (find . -name pom.xml). If multiple, ask which module to use.
Resolve openai-java:
openai-java (or an explicit group/artifact provided by the user).~/.m2/repository.openai-java-core, not the top-level openai-java artifact.List candidate classes:
class and record declarations.jar tf <jar> | grep '\.class$' (filter by package hints if provided).Extract field signatures (names may differ; compare shape):
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.Compare shapes:
@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.Categorize results (do NOT treat all matches the same):
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).
Report:
@@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.