dup-classes

Compare generated Java models against openai-java classes field by field.

2.6k|2.2k|Updated Dec 6, 2011
One-click install
npx skills add https://github.com/Azure/azure-sdk-for-java --skill dup-classes
Or copy as Structured Prompt for Agentโ–ผ
Please help me install this Agent Skill.
Skill: dup-classes
Source: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/ai/.workflow_docs/dup-classes
Command: npx skills add https://github.com/Azure/azure-sdk-for-java --skill dup-classes

SYSTEM DOCUMENTATION & REQUIREMENTS

๐Ÿ’ก This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill identifies and categorizes duplicate Java model classes generated by the SDK against existing models in the openai-java library, helping to manage code redundancy and ensure accurate model coverage.

Core Features & Use Cases

  • Field-by-Field Comparison: Compares generated Java classes with openai-java models based on fields and types, even with differing names.
  • Duplicate Categorization: Distinguishes between actionable duplicates, structural equivalents within hierarchies, and partial matches.
  • Use Case: When updating SDKs that integrate with OpenAI, use this skill to ensure that newly generated models for features like chat completions don't unnecessarily duplicate existing OpenAI data structures, and to identify which duplicates can be safely removed.

Quick Start

Use the dup-classes skill to compare generated Java models in './src/main/java' against the openai-java dependency found in the pom.xml in the current directory.

Frequently Asked Questions about dup-classes

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I detect duplicate Java models in an OpenAI SDK?โ–ผ

Detecting duplicate Java models involves performing field-by-field comparison of shapes and types against the openai-java library. This identifies actionable duplicates, structural equivalents within type hierarchies, and partial matches to manage code redundancy.

What is the best way to compare generated Java classes with openai-java models?โ–ผ

The best way to compare generated Java classes with openai-java models is through field-by-field structural comparison. This method distinguishes between actionable duplicates, structural equivalents within type hierarchies, and partial matches, even when class names differ.

Can I find duplicate Java classes if they have different names?โ–ผ

Yes, you can find duplicate Java classes with different names. The duplicate detection mechanism compares generated classes based on their fields and types rather than names, successfully identifying structural equivalents and partial matches for code redundancy management.

Do I need a pom.xml to check for duplicate Java models?โ–ผ

Yes, you need a pom.xml to check for duplicate Java models. The comparison requires resolving the openai-java dependency version from a provided pom.xml in the current directory before scanning generated source roots for duplicates.

Why does my generated SDK have redundant OpenAI data structures?โ–ผ

Your generated SDK has redundant OpenAI data structures because newly generated models for features like chat completions often unnecessarily duplicate existing OpenAI data structures. Comparing these against the openai-java library identifies which duplicates can be safely removed.