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-practicesSKILL.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?
| Goal | Start Here |
|---|---|
| Generate an SDK from an OpenAPI spec | content/plans/sdk-generation.md |
| Generate a Terraform provider | content/plans/tf-provider-generation.md |
| Extract OpenAPI from existing code | content/code-first/[framework].md |
| Fix OpenAPI validation errors | content/spec-first/validation.md |
| Customize SDK generation | content/sdk-customization/ |
| Generate multiple SDK variants (Azure, GCP, etc.) | content/sdk-customization/multi-target-sdks.md |
| Set up a multi-SDK monorepo | content/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 workflows | content/spec-first/overlays.md#multi-overlay-workflow-patterns |
| Track overlay changes with metadata | content/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 authentication | content/sdk-customization/hooks.md#custom-security-hook-http-signature-authentication |
| Configure SDK retries, timeouts, pagination | content/sdk-customization/runtime-configuration.md |
| Configure SDK authentication and security | content/sdk-customization/authentication-config.md |
| Customize SDK error handling | content/sdk-customization/error-handling.md |
| Persist custom code changes across regenerations | content/sdk-customization/custom-code.md |
| Generate MCP server for AI assistants | content/sdk-customization/mcp-server.md |
| Orchestrate multi-repo SDK generation | content/sdk-customization/multi-repo-workflows.md |
| Understand SDK language specifics | content/sdk-languages/[language].md |
| Add custom utilities to Python SDKs | content/sdk-languages/python.md#extending-the-sdk-with-sidecar-utilities |
| Publish Java SDK to Maven Central | content/sdk-languages/java.md#maven-central-publishing |
| Add custom code to TypeScript SDKs | content/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 typing | content/sdk-languages/ruby.md#sorbet-type-checking |
| Publish Ruby SDK to RubyGems | content/sdk-languages/ruby.md#rubygems-publishing |
| Configure PHP SDK with Laravel integration | content/sdk-languages/php.md#laravel-integration |
| Publish PHP SDK to Packagist | content/sdk-languages/php.md#publishing-to-packagist |
| Generate Go SDK with interfaces for testing | content/sdk-languages/go.md#interface-generation |
| Use Go SDK in Kubernetes operators | content/sdk-languages/go.md#kubernetes-operator-integration |
| Set up SDK integration tests | content/sdk-testing/integration-testing.md |
| Configure Arazzo API testing | content/sdk-testing/arazzo-testing.md |
| Disable tests for specific endpoints | content/sdk-testing/arazzo-testing.md#disabling-tests-via-overlay |
| Run AI-powered contract tests | content/sdk-testing/contract-testing.md |
| Fix ResponseValidationError at runtime | content/sdk-testing/contract-testing.md |
| Validate spec matches live API | content/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
├──
...
Repository
speakeasy-api/skillsParent repository
Repository Stats
Stars2
Forks0
LicenseApache License 2.0