sdk-tf-generation-best-practices

from speakeasy-api/skills

Agent Skills for SDK generation and OpenAPI tooling with Speakeasy CLI

2 stars0 forksUpdated Jan 26, 2026
npx skills add https://github.com/speakeasy-api/skills --skill sdk-tf-generation-best-practices

SKILL.md

sdk-tf-generation-best-practices

Comprehensive best-practices reference for generating SDKs and Terraform providers with Speakeasy. Covers the full lifecycle: OpenAPI spec preparation, code-first extraction, generation workflows, language-specific guides, customization, and testing.

When to Use

  • Generating an SDK from an OpenAPI spec
  • Generating a Terraform provider from an OpenAPI spec
  • Generating an MCP server from an OpenAPI spec
  • Extracting an OpenAPI spec from existing code (FastAPI, Flask, Django, Spring Boot, NestJS, Hono, Rails, Laravel)
  • Customizing SDK generation (hooks, auth, error handling, retries, pagination)
  • Fixing OpenAPI validation errors or applying overlays
  • Testing generated SDKs (integration, contract, Arazzo)
  • Understanding language-specific SDK patterns (TypeScript, Python, Go, Java, C#, Ruby, PHP)
  • User says: "generate SDK", "SDK best practices", "terraform provider", "generate MCP server", "SDK customization", "SDK testing"

How to Use

This skill contains detailed guides in the content/ subdirectory relative to this file. Read the specific guide for the user's task rather than trying to answer from this index alone.

To find the right guide, use the routing table below or the decision tree.

Quick Routing Table

What are you trying to do?

GoalStart Here
Generate an SDK from an OpenAPI speccontent/plans/sdk-generation.md
Generate a Terraform providercontent/plans/tf-provider-generation.md
Extract OpenAPI from existing codecontent/code-first/[framework].md
Fix OpenAPI validation errorscontent/spec-first/validation.md
Customize SDK generationcontent/sdk-customization/
Generate multiple SDK variants (Azure, GCP, etc.)content/sdk-customization/multi-target-sdks.md
Set up a multi-SDK monorepocontent/plans/sdk-generation.md#advanced-multi-sdk-monorepos
Use overlay recipes (open enums, global headers)content/spec-first/overlays.md#overlay-recipes
Use multi-overlay workflowscontent/spec-first/overlays.md#multi-overlay-workflow-patterns
Track overlay changes with metadatacontent/spec-first/overlays.md#overlay-metadata-tracking
Implement custom security (HMAC, signatures)content/spec-first/overlays.md#custom-security-schemes-via-overlay
Add SDK hooks (user-agent, telemetry)content/sdk-customization/hooks.md
Implement HTTP signature authenticationcontent/sdk-customization/hooks.md#custom-security-hook-http-signature-authentication
Configure SDK retries, timeouts, paginationcontent/sdk-customization/runtime-configuration.md
Configure SDK authentication and securitycontent/sdk-customization/authentication-config.md
Customize SDK error handlingcontent/sdk-customization/error-handling.md
Persist custom code changes across regenerationscontent/sdk-customization/custom-code.md
Generate MCP server for AI assistantscontent/sdk-customization/mcp-server.md
Orchestrate multi-repo SDK generationcontent/sdk-customization/multi-repo-workflows.md
Understand SDK language specificscontent/sdk-languages/[language].md
Add custom utilities to Python SDKscontent/sdk-languages/python.md#extending-the-sdk-with-sidecar-utilities
Publish Java SDK to Maven Centralcontent/sdk-languages/java.md#maven-central-publishing
Add custom code to TypeScript SDKscontent/sdk-languages/typescript.md#custom-code-regions
Publish TypeScript SDK to JSR (Deno)content/sdk-languages/typescript.md#jsr-deno-publishing
Configure Ruby SDK with Sorbet typingcontent/sdk-languages/ruby.md#sorbet-type-checking
Publish Ruby SDK to RubyGemscontent/sdk-languages/ruby.md#rubygems-publishing
Configure PHP SDK with Laravel integrationcontent/sdk-languages/php.md#laravel-integration
Publish PHP SDK to Packagistcontent/sdk-languages/php.md#publishing-to-packagist
Generate Go SDK with interfaces for testingcontent/sdk-languages/go.md#interface-generation
Use Go SDK in Kubernetes operatorscontent/sdk-languages/go.md#kubernetes-operator-integration
Set up SDK integration testscontent/sdk-testing/integration-testing.md
Configure Arazzo API testingcontent/sdk-testing/arazzo-testing.md
Disable tests for specific endpointscontent/sdk-testing/arazzo-testing.md#disabling-tests-via-overlay
Run AI-powered contract testscontent/sdk-testing/contract-testing.md
Fix ResponseValidationError at runtimecontent/sdk-testing/contract-testing.md
Validate spec matches live APIcontent/spec-first/validation.md#dynamic-validation-contract-testing

Directory Structure

content/
├── INDEX.md                    # This index (SKILL.md)
├── plans/                      # Decision trees for workflows
│   ├── sdk-generation.md       # Full SDK generation workflow
│   └── tf-provider-generation.md
├── 

...
Read full content

Repository Stats

Stars2
Forks0
LicenseApache License 2.0