Token导航 LogoToken导航

Agent Skill · 开发规范

sdk-tf-generation-best-practices(SDK TF generation 最佳实践)

sdk-tf-generation-best-practices 用于补充开发规范相关能力,适合在 Codex、Claude、Cursor、Gemini CLI 中需要让 Agent 承接开发规范相关任务时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

sdk-tf-generation-best-practices 是开发规范类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为执行命令;许可证为 MIT,暂无第三方扫描结果,按安装量在开发规范类的 1,265 个 Skill 里排第 731。

总安装 533周安装 22GitHub Stars 公开资料未说明下载 174核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:sdk-tf-generation-best-practices(SDK TF generation 最佳实践)
来源仓库:https://github.com/speakeasy-api/skills
仓库路径:skills/sdk-tf-generation-best-practices
安装命令:
npx skills add speakeasy-api/skills --skill "sdk-tf-generation-best-practices"
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

AgentSkills.tonpx skills
npx skills add speakeasy-api/skills --skill "sdk-tf-generation-best-practices"

这个 Skill 是做什么的

开发规范类 Skill 用来统一代码风格、目录结构和评审口径,产出多为检查清单或改写建议。

sdk-tf-generation-best-practices 用于补充开发规范相关能力,适合在 Codex、Claude、Cursor、Gemini CLI 中需要让 Agent 承接开发规范相关任务时使用。适用于 SDK 生成、Terraform 配置和开发流程标准化场景。

通过 npx skills add speakeasy-api/skills --skill "sdk-tf-generation-best-practices" 安装,需确认权限范围。建议结合原始 README 核验具体用法,注意维护状态和命令执行权限。使用前请检查是否会触发文件读写或外部服务调用,确保符合安全策略。

来源仓库内路径:skills/sdk-tf-generation-best-practices

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add speakeasy-api/skills --skill "sdk-tf-generation-best-practices";命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要执行命令,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

sdk-tf-generation-best-practices 怎么安装?

在终端执行 npx skills add speakeasy-api/skills --skill "sdk-tf-generation-best-practices"。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

sdk-tf-generation-best-practices 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

sdk-tf-generation-best-practices 需要什么权限?

权限级别是执行命令。安装流程涉及命令执行,可能通过 npx skills add speakeasy-api/skills --skill "sdk-tf-generation-best-practices" 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

sdk-tf-generation-best-practices 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

sdk-tf-generation-best-practices 用的人多吗?

公开数据是累计安装 533 次,近一周安装 22 次,下载 174 次。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

sdk-tf-generation-best-practices 安全吗?

没有查到第三方扫描结果,安全性无法从公开资料判断,安装前请自行审查源码、依赖和命令行为。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 许可证明确为 MIT,商用和分发边界好判断。

先想清楚的地方

  • 需要执行命令,装到常用环境前要先评估影响面。
  • 没有第三方扫描结果,安全性只能靠自己读源码判断。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理开发规范类任务、又不想每次都手写提示词的人。

不太适合

  • 不能接受 Skill 在你机器上执行命令的人。
  • 要求有安全扫描结论才肯安装的团队。
  • 需要厂商级技术支持和 SLA 的生产系统。

开发规范类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
vercel-react-best-practices

Vercel React 最佳实践 · Codex、Claude

8,490,72025,918操作浏览器MIT通过
web-design-guidelines

网页设计指南 · Codex、Claude

6,686,01625,885需要联网MIT有提醒
remotion-best-practices

Remotion 最佳实践 · Codex、Claude

6,505,6323,027操作浏览器MIT有提醒
supabase-postgres-best-practices

Supabase Postgres 最佳实践 · Codex、Claude

3,175,5232,030需要联网MIT通过
next-best-practices

Next.js 最佳实践 · Codex、Claude

1,848,240841操作浏览器MIT通过
sdk-tf-generation-best-practices

SDK TF generation 最佳实践 · 本页

533—执行命令MIT未收录

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

name
sdk-tf-generation-best-practices
description
>-
license
Apache-2.0

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)
  • Upgrading or bumping the Speakeasy CLI version in workflow.yaml
  • Regenerating an SDK after spec or version changes
  • Customizing SDK README documentation
  • Adding examples to an OpenAPI spec via overlays
  • Testing generated SDK endpoints
  • User says: "generate SDK", "regenerate SDK", "update SDK", "SDK best practices", "terraform provider", "generate MCP server", "SDK customization", "SDK testing", "test my SDK", "upgrade speakeasy", "bump version", "SDK readme", "SDK documentation", "add examples to spec"

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.

These guides are also accessible via the Speakeasy CLI:

speakeasy agent context [path]

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
Upgrade Speakeasy version in workflow.yamlcontent/plans/sdk-generation.md#version-management
Bump pinned speakeasyVersion to latestcontent/plans/sdk-generation.md#version-management
Regenerate SDK after spec or version changecontent/plans/sdk-generation.md
Customize SDK README with documentationcontent/sdk-customization/readme-customization.md
Add branding, examples, or guides to SDK READMEcontent/sdk-customization/readme-customization.md
Add examples to OpenAPI spec via overlaycontent/spec-first/overlays.md#add-examples
Add API-response-based examples to speccontent/spec-first/overlays.md#add-examples
Test SDK against live APIcontent/sdk-testing/integration-testing.md
Run contract tests for generated SDKcontent/sdk-testing/contract-testing.md

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
├── code-first/                 # Extract OpenAPI from code
│   ├── fastapi.md
│   ├── flask.md
│   ├── django.md
│   ├── spring-boot.md
│   ├── nestjs.md
│   ├── hono.md
│   ├── rails.md
│   └── laravel.md
├── spec-first/                 # OpenAPI validation and fixes
│   ├── validation.md
│   ├── overlays.md             # OpenAPI overlays and recipes
│   ├── security-schemes.md
│   ├── pagination.md
│   └── schemas.md
├── sdk-languages/              # Language-specific SDK guides
│   ├── python.md
│   ├── typescript.md           # TS: code regions, extra modules, Zod
│   ├── go.md                   # Go: hooks, interfaces, mocks, K8s
│   ├── java.md
│   ├── csharp.md
│   ├── ruby.md                 # Ruby: Sorbet typing, RubyGems publishing
│   └── php.md
├── sdk-customization/          # Cross-language SDK customization
│   ├── hooks.md                # SDK hooks (UA, telemetry, custom security)
│   ├── runtime-configuration.md # Retries, timeouts, pagination, servers
│   ├── authentication-config.md # Global/per-op security, env vars
│   ├── error-handling.md       # Custom error classes and schemas
│   ├── custom-code.md          # Persist changes across regenerations
│   ├── multi-target-sdks.md    # Multiple variants from one repo
│   ├── multi-repo-workflows.md # Cross-repo SDK orchestration (CI/CD)
│   ├── mcp-server.md           # MCP server for AI assistant integration
│   └── readme-customization.md # SDK README branding
├── sdk-testing/                # SDK testing patterns
│   ├── integration-testing.md  # Integration test infrastructure
│   ├── arazzo-testing.md       # Arazzo API testing format
│   └── contract-testing.md     # AI-powered contract testing
├── terraform/                  # Terraform provider specifics
│   ├── crud-mapping.md
│   ├── customization.md
│   ├── testing-guide.md
│   └── publishing.md
└── CLI_REFERENCE.md            # Canonical CLI command documentation

Decision Tree: Where to Start

START
  │
  ├─ Do you have an OpenAPI/Swagger spec?
  │    │
  │    ├─ YES ──► Is the spec valid?
  │    │           │
  │    │           ├─ YES ──► What do you want to generate?
  │    │           │           │
  │    │           │           ├─ SDK ──► plans/sdk-generation.md
  │    │           │           └─ Terraform Provider ──► plans/tf-provider-generation.md
  │    │           │
  │    │           └─ NO/UNSURE ──► spec-first/validation.md
  │    │
  │    └─ NO ──► Do you have API code?
  │               │
  │               ├─ YES ──► What framework?
  │               │           ├─ FastAPI ──► code-first/fastapi.md
  │               │           ├─ Flask ──► code-first/flask.md
  │               │           ├─ Django ──► code-first/django.md
  │               │           ├─ Spring Boot ──► code-first/spring-boot.md
  │               │           ├─ NestJS ──► code-first/nestjs.md
  │               │           ├─ Hono ──► code-first/hono.md
  │               │           ├─ Rails ──► code-first/rails.md
  │               │           └─ Laravel ──► code-first/laravel.md
  │               │
  │               └─ NO ──► Cannot proceed without spec or code

Troubleshooting Tree

PROBLEM
  │
  ├─ Getting ResponseValidationError at runtime?
  │    │
  │    └─ SDK types don't match server responses
  │         ├─ Run contract tests to identify all mismatches
  │         │    → sdk-testing/contract-testing.md
  │         └─ Fix spec or create overlay to correct types
  │              → spec-first/validation.md#dynamic-validation-contract-testing
  │
  ├─ SDK doesn't match live API behavior?
  │    │
  │    ├─ Spec may have drifted from API
  │    │    → Run contract tests to detect drift
  │    │       sdk-testing/contract-testing.md
  │    │
  │    └─ Third-party spec may be inaccurate
  │         → Validate with contract testing before trusting
  │            sdk-testing/contract-testing.md
  │
  ├─ Type mismatch errors in generated SDK?
  │    │
  │    ├─ At compile time ──► Check spec schema definitions
  │    │                       spec-first/validation.md
  │    │
  │    └─ At runtime ──► Server returns unexpected types
  │                      → Contract testing required
  │                         sdk-testing/contract-testing.md
  │
  └─ Enum value not recognized?
       │
       └─ API returned value not in spec enum
            ├─ Add missing value to spec/overlay
            │    → spec-first/overlays.md
            └─ Or use open enums for anti-fragility
                 → spec-first/overlays.md#overlay-recipes

Working with Large OpenAPI Documents

OpenAPI specs can be thousands of lines. Do not load the full spec into context. Use yq (YAML) or jq (JSON) to extract only the sections you need.

# List all paths
yq '.paths | keys' spec.yaml

# Inspect a specific endpoint
yq '.paths["/users/{id}"]' spec.yaml

# List all schema names
yq '.components.schemas | keys' spec.yaml

# Inspect a specific schema
yq '.components.schemas.User' spec.yaml

# Check server URLs
yq '.servers' spec.yaml

# List all operationIds
yq '[.paths[][].operationId // empty] | unique' spec.yaml

# For JSON specs, use jq
jq '.paths | keys' spec.json
jq '.components.schemas.User' spec.json
Note: If yq/jq aren't available, use targeted grep searches instead of copying the full spec into context: ``bash grep -n 'operationId:' spec.yaml grep -n 'x-speakeasy-entity' spec.yaml ``

Common Workflows

Workflow A: First-Time SDK Generation

  1. Read content/plans/sdk-generation.md
  2. Run speakeasy quickstart --skip-interactive --output console -s spec.yaml -t python -o ./sdk
  3. SDK generated in output directory

Workflow B: Existing Codebase → SDK

  1. Identify framework in content/code-first/
  2. Extract OpenAPI spec
  3. Validate with speakeasy lint openapi --non-interactive -s spec.yaml
  4. Fix issues using content/spec-first/ guides
  5. Generate SDK via content/plans/sdk-generation.md

Workflow C: SDK Customization

  1. Ensure gen.yaml exists (from quickstart)
  2. Read content/sdk-customization/ guides
  3. Modify gen.yaml
  4. Regenerate with speakeasy run -y --output console

Workflow D: Multi-Target SDK (Azure, GCP, etc.)

  1. Read content/sdk-customization/multi-target-sdks.md
  2. Configure multiple sources in workflow.yaml
  3. Set up target outputs to packages/ subdirectories
  4. Create CI workflows per target

Workflow E: SDK Extensions (Hooks, Custom Methods)

  1. For persistent changes anywhere → content/sdk-customization/custom-code.md
  2. For cross-cutting concerns → content/sdk-customization/hooks.md
  3. For predefined extension points → content/sdk-languages/typescript.md#custom-code-regions
  4. For complex logic → content/sdk-languages/typescript.md#extra-modules-pattern

Workflow F: Upgrade and Regenerate

  1. Check current speakeasyVersion in .speakeasy/workflow.yaml
  2. Update speakeasyVersion to latest or a specific version → content/plans/sdk-generation.md#version-management
  3. Regenerate with speakeasy run → content/plans/sdk-generation.md
  4. Test the regenerated SDK → content/sdk-testing/integration-testing.md or content/sdk-testing/contract-testing.md
  5. Commit changes

Essential CLI Commands

CommandPurpose
speakeasy quickstart --skip-interactive --output console -s spec.yaml -t python -o ./sdkNon-interactive SDK setup
speakeasy run -y --output consoleRegenerate SDK from gen.yaml
speakeasy lint openapi --non-interactive -s spec.yamlValidate OpenAPI spec
speakeasy auth loginAuthenticate with Speakeasy

Getting Help

  • Authentication issues: Run speakeasy auth login
  • Validation errors: See content/spec-first/validation.md
  • Unsupported feature: Check language guide in content/sdk-languages/
  • CLI errors: See content/CLI_REFERENCE.md or run speakeasy --help

Providing Feedback

If you encounter missing documentation, unclear instructions, or incorrect examples in this agent context, submit feedback directly:

# General feedback
speakeasy agent feedback -m "Description of the issue or suggestion"

# Feedback about a specific document
speakeasy agent feedback -m "Description of the issue" --context-path "path/to/document.md"

Feedback helps improve these documents for all agents. Submit feedback when:

  • A guide is missing steps needed to complete a task
  • An example does not work as documented
  • A CLI command behaves differently than described
  • You cannot find documentation for a supported feature

Related Skills

  • start-new-sdk-project - Quick interactive setup with speakeasy quickstart
  • regenerate-sdk - Re-run generation after config changes
  • validate-openapi-spec - Lint and validate OpenAPI specs
  • diagnose-generation-failure - Troubleshoot failed generation runs
  • create-openapi-overlay - Create overlays for spec customization
  • fix-validation-errors-with-overlays - Fix lint errors with overlays

平台分布

Claude Code

29.23%
按下载量换算51

windsurf

22.18%
按下载量换算39

OpenCode

15.76%
按下载量换算27

Cursor

12.55%
按下载量换算22

Codex

7.01%
按下载量换算12

github-copilot

2.88%
按下载量换算5

安全审计

暂无安全审计结果可展示。

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add speakeasy-api/skills --skill "sdk-tf-generation-best-practices" 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills