writing-openapi-specs
Reference guide for OpenAPI specification best practices, naming conventions, and expressing complex REST API patterns like polymorphism, enums, file uploads…
Skill by speakeasy-api
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/speakeasy-api-writing-openapi-specs
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: backend, writing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/writing-openapi-specs
What's inside
- Skill name
writing-openapi-specs- Description
- Reference guide for OpenAPI specification best practices, naming conventions, and expressing complex REST API patterns like polymorphism, enums, file uploads, and server-sent events. Use when writing or improving OpenAPI specs to ensure they follow established conventions and generate quality SDKs.
- License
- Apache-2.0
- Instructions
- 434 lines in SKILL.md · view on GitHub
Files (9)
- SKILL.md
- components.md · reference/
- examples.md · reference/
- operations.md · reference/
- parameters.md · reference/
- request-bodies.md · reference/
- responses.md · reference/
- schemas.md · reference/
- security.md · reference/
SKILL.md (first lines)
# Writing OpenAPI Specs
Reference for OpenAPI best practices and conventions. This skill provides guidance on taste, conventions, and grey areas not covered by the OpenAPI specification itself.
## When to Use This Skill
- Writing a new OpenAPI specification
- Improving operation naming and organization
- Expressing complex data types (enums, polymorphism, nullable)
- Handling file uploads, streaming, or server-sent events
- Making specs more code-gen friendly
- Understanding reusability patterns (components vs inline)
## Core Principles
### Naming Conventions
**Operation IDs**: Use lowercase with underscores, following `resource_action` pattern:
```yaml
# Good
operationId: users_list
operationId: users_get
operationId: users_create
# Avoid
operationId: GetApiV1Users # Auto-generated, not semantic
```
**Component Names**: Use PascalCase for schemas, parameters, and other reusable components:
```yaml
components:
schemas:
UserProfile: # PascalCase
OrderHistory: # PascalCase
parameters:
PageLimit: # PascalCase
```
**Tags**: Use lowercase with hyphens for machine-friendly tags:
```yaml
tags:
- name: user-management
description: Operations for managing users
- name: order-processing
description: Operations for processing orders
```
For more details, see [reference/operations.md](reference/operations.md) and [reference/components.md](reference/components.md).
### Documentation Standards
**Use CommonMark**: All `description` fields support CommonMark syntax for rich formatting:
```yaml
description: |
Retrieves a user by ID.
## Authorization
Requires `users:read` scope.
## Rate Limits
- 100 requests per minute per API key
- 1000 requests per hour per IP
```
**Be Specific**: Provide actionable information, not generic descriptions:
```yaml
# Good
description: Returns a paginated list of active users, ordered by creation date (newest first)
# Avoid
description: Gets users
```
**Use `examples` over `example`**: The plural `examples` field provides better SDK generation:
```yaml
# Good
examples:
basic_user:
value:
id: 123
name: "John Doe"
admin_user:
value:
id: 456
name: "Jane Admin"
role: admin
# Avoid single example
example:
id: 123
name: "John Doe"
```
For more details, see [reference/examples.md](reference/examples.md).
### Reusability
**Create components for**:
- Schemas used in multiple operations
- Common parameters (pagination, filtering)
- Common responses (errors, success patterns)
- Security schemes
**Keep inline for**:
- Operation-specific request bodies
- Unique response shapes
- One-off parameters
```yaml
# Reusable schema
components:
schemas:
User:From speakeasy-api/sdk-generation-skills, Apache-2.0.
More from speakeasy-api/sdk-generation-skills
- 0.487score
start-new-sdk-project
speakeasy-api
Use when generating a new SDK from an OpenAPI spec.
SkillDFreshness: D★ 18Claude Code +9 - 0.487score
configure-sdk-options
speakeasy-api
Use when CONFIGURING an existing SDK - NOT for initial generation.
SkillDFreshness: D★ 18Claude Code +9 - 0.487score
customize-sdk-hooks
speakeasy-api
Use when implementing SDK code hooks for custom logic (not spec configuration or runtime overrides).
SkillDFreshness: D★ 18Claude Code +9 - 0.487score
diagnose-generation-failure
speakeasy-api
Use when SDK generation failed or seeing errors.
SkillDFreshness: D★ 18Claude Code +9 - 0.487score
extract-openapi-from-code
speakeasy-api
Use when extracting or generating an OpenAPI spec from existing API code.
SkillDFreshness: D★ 18Claude Code +9 - 0.487score
generate-mcp-server
speakeasy-api
Use when generating an MCP server from an OpenAPI spec with Speakeasy.
SkillDFreshness: D★ 18Claude Code +9 - 0.487score
generate-terraform-provider
speakeasy-api
Use when generating a Terraform provider from an OpenAPI spec with Speakeasy.
SkillDFreshness: D★ 18Claude Code +9 - 0.487score
improve-sdk-naming
speakeasy-api
Use when you want AI-powered suggestions for SDK naming improvements via the `speakeasy suggest` command (not manual overlay creation).
SkillDFreshness: D★ 18Claude Code +9 - 0.487score
manage-openapi-overlays
speakeasy-api
Use when creating, applying, or validating overlay files including x-speakeasy extensions.
SkillDFreshness: D★ 18Claude Code +9 - 0.487score
orchestrate-multi-repo-sdks
speakeasy-api
Use when each language SDK lives in a separate repository.
SkillDFreshness: D★ 18Claude Code +9 - 0.487score
orchestrate-multi-target-sdks
speakeasy-api
Use when generating SDKs for multiple languages from a single OpenAPI spec, or multiple SDK variants from different sources.
SkillDFreshness: D★ 18Claude Code +9 - 0.487score
setup-sdk-testing
speakeasy-api
Use when setting up SDK testing, configuring contract tests, writing Arazzo test workflows, or running integration tests.
SkillDFreshness: D★ 18Claude Code +9
Signals
- Stars
- 18
- Forks
- 6
- Open issues
- 0
- Last commit (this folder)
- Jan 23, 2026 (9 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- Apache-2.0
- Website
- www.speakeasy.com/docs
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from speakeasy-api
- 0.487score
configure-sdk-options
speakeasy-api
Use when CONFIGURING an existing SDK - NOT for initial generation.
SkillDFreshness: D★ 18Claude Code +9 - 0.487score
customize-sdk-hooks
speakeasy-api
Use when implementing SDK code hooks for custom logic (not spec configuration or runtime overrides).
SkillDFreshness: D★ 18Claude Code +9 - 0.487score
diagnose-generation-failure
speakeasy-api
Use when SDK generation failed or seeing errors.
SkillDFreshness: D★ 18Claude Code +9 - 0.487score
extract-openapi-from-code
speakeasy-api
Use when extracting or generating an OpenAPI spec from existing API code.
SkillDFreshness: D★ 18Claude Code +9 - 0.487score
generate-mcp-server
speakeasy-api
Use when generating an MCP server from an OpenAPI spec with Speakeasy.
SkillDFreshness: D★ 18Claude Code +9 - 0.487score
setup-sdk-testing
speakeasy-api
Use when setting up SDK testing, configuring contract tests, writing Arazzo test workflows, or running integration tests.
SkillDFreshness: D★ 18Claude Code +9
Cite this page
writing-openapi-specs skill. Agent Mart. https://agentmart.dev/skills/speakeasy-api-writing-openapi-specs (last updated 2026-10-24)