openapi-schema
Skill2 starsChanged 43 days agoMITView on GitHub
Create OpenAPI 3.1.0 schema files for OpenAI Custom GPTs Actions. Use when the user needs to (1) Generate OpenAPI schemas for GPT actions/API integrations, (2) Convert API documentation to OpenAPI format, (3) Validate or fix existing OpenAPI schemas for GPT compatibility, (4) Add authentication configurations (API Key, OAuth 2.0), (5) Create schemas for specific HTTP methods (GET, POST, PUT, DELETE), (6) Structure request/response models for GPT consumption.
In this repository41 other files it gives its agents.
- skills/web-asset-generator/CLAUDE.mdCLAUDE.md
- academic-writingSkill
- agent-os-childSkill
- agy-pSkill
- amazon-uk-scraperSkill
- artifact-variationsSkill
- audio-transcription-workflowSkill
- capture-dashboardSkill
- claude-channelsSkill
- claude-pSkill
- code-documenterSkill
- context7-docsSkill
- context7-searchSkill
- deep-researchSkill
- docx-draftSkill
- grill-meSkill
- handoffSkill
- long-horizon-waiting-strategiesSkill
- opencode-pluginSkill
- pi-extensionSkill
- pi-web-ui-internal-api-orchestrationSkill
- pptx-draftSkill
- saas-idea-finderSkill
- scraping-redditSkill
- scraping-twitterSkill
- secret-scanningSkill
- socialmedia-optimizationSkill
- systematic-debuggingSkill
- test-driven-developmentSkill
- text-to-speechSkill
- thematic-analysisSkill
- transcribe-audioSkill
- video-deep-understandingSkill
- video-useSkill
- web-asset-generatorSkill
- web-crawlingSkill
- web-create-assetsSkill
- web-data-acquisitionSkill
- webfetch-skillSkill
- youtube-captionSkill
- youtube-searchSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 7 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Create OpenAPI 3.1.0 schemas that enable Custom GPTs to call external REST APIs via the Actions protocol.
- Very specific: line 19
OpenAPI Version: Must use 3.1.0 (not 3.0.x or 2.0)
- Distinctive: line 108
Must use Authorization Code Grant with PKCE
- Distinctive: line 330
Before using a schema:
- Distinctive: line 341
Test schemas before deployment:
- Distinctive: line 343
Test API calls in Postman/Insomnia
- Distinctive: line 344
Use OpenAI's "Actions GPT" to help validate
- Distinctive: line 345
Test each endpoint individually in GPT editor
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
OpenAPI Schema Creator for OpenAI Actions
Create OpenAPI 3.1.0 schemas that enable Custom GPTs to call external REST APIs via the Actions protocol.
Quick Start
To create a schema, you need:
- API endpoint(s) - URL, method, parameters
- Authentication type - None, API Key, or OAuth 2.0
- Request/response structure - JSON models
Core Requirements
- OpenAPI Version: Must use
3.1.0(not 3.0.x or 2.0) - File Formats: YAML (preferred) or JSON - both fully supported
- Max File Size: 1 MB
- Max Endpoints: 30 per action slot, 10 slots per GPT
Schema Structure
Minimal Valid Schema
openapi: 3.1.0
info:
title: My API
description: What this API does
version: 1.0.0
servers:
- url: https://api.example.com
paths:
/endpoint:
get:
operationId: uniqueOperationName
summary: Brief description
description: Detailed description for GPT
responses:
'200':
description: Success
content:
application/json:
schema:
type: objectCritical Elements for GPT Actions
| Element | Purpose | Tips |
operationId | Unique identifier | Use camelCase, no spaces |
description | GPT decision guidance | Be specific about when to use |
summary | Brief context | Max 300 characters |
parameters | Input collection | Use enums for fixed values |
Authentication Patterns
No Authentication
# Simply omit security sections
paths:
/public/data:
get:
operationId: getPublicData
security: [] # Explicitly no authAPI Key
components:
securitySchemes:
ApiKeyAuth:
type: apiKey
in: header # or query
name: X-API-Key
security:
- ApiKeyAuth: []
paths:
/private/data:
get:
operationId: getPrivateData
security:
- ApiKeyAuth: []OAuth 2.0
components:
securitySchemes:
OAuth2:
type: oauth2
flows:
authorizationCode:
authorizationUrl: https://auth.example.com/authorize
tokenUrl: https://auth.example.com/token
scopes:
read: Read access
write: Write accessOAuth Requirements:
- Must use Authorization Code Grant with PKCE
- Redirect URLs to register:
https://chat.openai.com/aip/{g-YOUR-GPT-ID}/oauth/callbackandhttps://chatgpt.com/aip/{g-YOUR-GPT-ID}/oauth/callback - TLS 1.2+ required on port 443
Common Patterns
GET with Query Parameters
paths:
/search:
get:
operationId: searchItems
parameters:
- name: query
in: query
required: true
schema:
type: string
description: Search term
- name: limit
in: query
schema:
type: integer
default: 10
description: Max results to return
responses:
'200':
description: Search resultsPOST with JSON Body
paths:
/items:
post:
operationId: createItem
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- name
properties:
name:
type: string
description:
type: string
tags:
type: array
items:
type: string
responses:
'201':
description: Item createdFile Upload
paths:
/upload:
post:
operationId: uploadFile
requestBody:
content:
multipart/form-data:
schema:
type: object
properties:
file:
type: string
format: binary
description:
type: string
responses:
'200':
description: Upload successfulReturning Files to GPT
paths:
/documents/{id}:
get:
operationId: getDocument
parameters:
- name: id
in: path
required: true
schema:
type: string
responses:
'200':
description: Document data
content:
application/json:
schema:
type: object
properties:
openaiFileResponse:
type: array
items:
type: object
properties:
name:
type: string
mime_type:
type: string
content:
type: string
format: byte # Base64-encodedBest Practices
1. Description Writing
Descriptions are critical - GPT uses them to decide when to call actions:
# Good - specific and actionable
description: Fetches current weather conditions for a given city. Use when the user asks about temperature, precipitation, or weather forecasts.
# Bad - vague
description: Gets weather data2. Response Design
Return raw data, NOT natural language:
# Good - structured data
{
"temperature": 72,
"condition": "sunny",
"humidity": 45
}
# Bad - pre-formatted text
{
"message": "The weather is sunny with 72 degrees and 45% humidity"
}3. Use Enums for Fixed Values
parameters:
- name: unit
in: query
schema:
type: string
enum: ["celsius", "fahrenheit", "kelvin"]
description: Temperature unit4. Consequential Actions
Control confirmation behavior with extension:
paths:
/delete-account:
post:
operationId: deleteAccount
x-openai-isConsequential: true # Always promptsDefault behavior:
- GET:
false(shows "Always allow") - POST/PUT/DELETE:
true(always prompts)
Limitations & Constraints
| Limit | Value |
| Description/summary per endpoint | 300 chars |
| Parameter description | 700 chars |
| Endpoints per action slot | 30 |
| Action slots per GPT | 10 |
| OpenAPI file size | 1 MB |
| Request/Response payload | < 100K chars |
| Request timeout | 45 seconds |
| Max files per request | 10 |
| Max file size | 10 MB |
| TLS Version | 1.2+ |
| Port | 443 only |
Data Types & Formats
OpenAPI 3.1.0 supports these formats:
type: string
format: date-time # ISO 8601
type: string
format: date # YYYY-MM-DD
type: string
format: email
type: string
format: uri
type: string
format: uuid
type: number
format: float
type: number
format: double
type: integer
format: int32
type: integer
format: int64Complex Schema Examples
See references/examples.md for complete working examples of:
- Weather API with nested endpoints
- CRUD operations with authentication
- File upload/download
- Pagination patterns
- Error response handling
Validation Checklist
Before using a schema:
- Uses
openapi: 3.1.0 - All
operationIdvalues are unique - All path parameters have
required: true - Descriptions are specific and actionable
- Authentication is properly configured
- Response schemas match actual API responses
- File size is under 1 MB
Testing
Test schemas before deployment:
- Validate syntax with Swagger Editor or similar
- Test API calls in Postman/Insomnia
- Use OpenAI's "Actions GPT" to help validate
- Test each endpoint individually in GPT editor
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

