openapi-expert
यह क्या करती है
यह स्किल OpenAPI specifications लिखने का मार्गदर्शन देती है, जो API के paths, schemas, सुरक्षा और responses बताती हैं। यह उन बैकएंड और API डिज़ाइनरों के लिए है जो दूसरे डेवलपरों के लिए साफ़ अनुबंध चाहते हैं।
कब इस्तेमाल करें
- ✓जब आप नया API डिज़ाइन कर रहे हों और कोड लिखने से पहले साफ़ अनुबंध चाहते हों।
- ✓जब आपको मौजूदा API को OpenAPI फ़ॉर्मैट में दस्तावेज़ित करना हो।
- ✓जब आप CI में spec की गलतियाँ या breaking बदलाव जाँचना चाहते हों।
Skill का लिंक
https://github.com/RightNow-AI/openfang/blob/main/crates/openfang-skills/bundled/openapi-expert/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“हमारे orders API के लिए OpenAPI spec लिखिए, जिसमें versioned paths, दोबारा इस्तेमाल होने वाले schemas और साफ़ विवरण हों।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
स्किल पहले spec लिखने, references से schemas दोबारा इस्तेमाल करने, API को version देने, और lint टूल्स से spec जाँचने की सलाह देती है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
OpenAPI Expert
An API design architect with deep expertise in the OpenAPI Specification, RESTful API conventions, and the tooling ecosystem for validation, documentation, and code generation. This skill provides guidance for designing clear, consistent, and evolvable API contracts using OpenAPI 3.0 and 3.1, covering schema composition, security definitions, versioning strategies, and developer experience optimization.
Key Principles
- Design the API specification before writing implementation code; the spec serves as the contract between frontend, backend, mobile, and third-party consumers
- Use $ref extensively to define reusable schemas, parameters, and responses in the components section; duplication across paths leads to inconsistency and maintenance burden
- Version your API explicitly through URL path prefixes (/v1/, /v2/) or custom headers; never break existing consumers by changing response shapes without a version boundary
- Write meaningful descriptions for every path, parameter, schema property, and response; the spec doubles as your API documentation and should be understandable without reading source code
- Validate the spec in CI using linting tools to catch breaking changes, missing descriptions, inconsistent naming, and schema errors before they reach production
Techniques
- Structure the OpenAPI document with info (title, version, contact), servers (base URLs per environment), paths (endpoints), and components (schemas, securitySchemes, parameters, responses)
- Compose schemas using allOf for inheritance (base object + extension), oneOf for polymorphism (exactly one match), and anyOf for flexible unions (at least one match)
- Provide request and response examples at both the schema level and the media type level; tools like Swagger UI and Redoc render these prominently for developer reference
- Define security schemes (Bearer JWT, API key, OAuth2 flows) in components/securitySchemes and apply them globally or per-operation with the security field
- Distinguish path parameters (/users/{id}), query parameters (?page=2&limit=20), and header parameters for different use cases; path parameters identify resources, query parameters filter or paginate
- Implement consistent pagination with limit/offset or cursor-based patterns, documenting the pagination metadata schema (total, next_cursor, has_more) in a reusable component
- Generate server stubs and client SDKs using openapi-generator with language-specific templates; customize templates for your coding conventions
Common Patterns
- Error Response Schema: Define a reusable error object with code (machine-readable string), message (human-readable), and details (array of field-level errors) applied consistently across all error responses
- Polymorphic Responses: Use discriminator with oneOf to model responses that can be different types (e.g., a notification that is either an EmailNotification or PushNotification) with a type field
- Pagination Envelope: Wrap list responses in a standard envelope with data (array of items), pagination (cursor or offset metadata), and optional meta (total count, timing)
- Webhook Definitions: Use the webhooks section (OpenAPI 3.1) to document callback payloads your API sends to consumers, specifying the event schema and expected acknowledgment
Pitfalls to Avoid
- Do not use additionalProperties: true by default; it makes schemas permissive and hides unexpected fields that may cause client parsing issues
- Do not define inline schemas for every request and response body; extract them to components/schemas with descriptive names for reuse and clarity
- Do not mix naming conventions (camelCase and snake_case) within the same API; pick one convention and enforce it with a linter rule
- Do not skip providing enum descriptions; raw enum values like "PENDING", "ACTIVE", "SUSPENDED" need documentation explaining what each state means and what transitions are valid
अक्सर पूछे जाने वाले सवाल
कोड से पहले spec क्यों?
Spec frontend, backend और दूसरे उपभोक्ताओं के बीच अनुबंध का काम करता है, तो सब पहले ही आकार पर सहमत होते हैं।
API को version कैसे दें?
स्किल URL path या header में साफ़ versions सुझाती है, ताकि बदलावों से मौजूदा क्लाइंट न टूटें।
endpoints के अलावा spec में क्या चाहिए?
हर path, parameter, property और response का विवरण, ताकि spec पढ़ने योग्य दस्तावेज़ भी बने।
जानकारी
लेखक का मूल विवरण
OpenAPI/Swagger expert for API specification design, validation, and code generation
repo: RightNow-AI/openfang
लोकप्रियता
- GitHub स्टार
- 18k
- रैंकिंग में स्थान
- #10696
- लाइसेंस
- Apache-2.0
- अपडेट की गई
- 2/7/2026
कमेंट
- …
इस repository की और skills
browser-automation
18kयह आपके एजेंट को Playwright से वेब ब्राउज़र नियंत्रित करना सिखाती है, बटन, फ़ॉर्म और लिंक खोजने के लिए CSS selectors का उपयोग करते हुए।
clip-hand-skill
18kयह आपके एजेंट को वीडियो क्लिप बनाने में मदद करती है: वीडियो डाउनलोड करना, उसकी बोली ट्रांसक्राइब करना, subtitle फ़ाइलें बनाना और ffmpeg से क्लिप काटना।
collector-hand-skill
18kयह आपके एजेंट को किसी विषय या कंपनी पर सार्वजनिक जानकारी जुटाने, मुख्य entities निकालने, बदलाव ट्रैक करने और भावना का अंदाज़ा लगाने में मदद करती है।
infisical-sync-skill
18kयह आपके एजेंट को API के ज़रिए Infisical vault में secrets पढ़ने और अपडेट करने में मदद करती है, login के चरणों और साफ़ error संभालने के साथ।
मिलती-जुलती skills
api-connector-builder
280kयह आपके एजेंट को मौजूदा pattern के हिसाब से नए API connections बनाने देता है। जब बिना कोई नया तरीका बनाए एक और integration जोड़ना हो, तब इसका इस्तेमाल करें।
api-design
280kयह आपके एजेंट को best practices के हिसाब से REST APIs डिज़ाइन करने में मदद करता है। यह तय करने में काम आता है कि APIs आपस में कैसे बात करें, errors कैसे दिखें, और data को कैसे व्यवस्थित करें।
backend-patterns
280kआपके एजेंट को server-side architecture patterns और database optimization में मदद करता है। server पर चलने वाला code बनाने या review करने के लिए उपयोगी है।