speakeasy-api/agent-skills/configure-sdk-options
Claude Code and agent skill by speakeasy-api/agent-skills
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Checking that the SKILL.md file is still in the repository.
Use when CONFIGURING an existing SDK - NOT for initial generation. Covers gen.yaml configuration for all languages: TypeScript, Python, Go, Java, C#, PHP, Ruby. Also covers runtime overrides (retries, timeouts, server selection) in application code. Triggers on "configure SDK", "gen.yaml", "SDK options", "SDK config", "SDK configuration", "runtime override", "SDK client config", "override timeout", "per-call config". For NEW SDK generation, use start-new-sdk-project instead.
Install
npx vskill@latest install speakeasy-api/agent-skills/configure-sdk-optionsSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
Configure SDK Options
Configure gen.yaml options for an existing Speakeasy SDK. Supports TypeScript, Python, Go, Java, C#, PHP, and Ruby.
For new SDK projects: Usestart-new-sdk-projectskill instead. This skill is for configuring an existing SDK.
Language-Specific Guides
For comprehensive configuration details, see the language-specific guides:
| Language | Guide | Key Features | |
|---|---|---|---|
| TypeScript | content/languages/typescript.md | Zod validation, React Query, standalone functions, dual module format | |
| Python | content/languages/python.md | Pydantic models, async modes (both/split), uv/poetry support | |
| Go | content/languages/go.md | Response formats, interface generation, K8s integration | |
| Java | content/languages/java.md | Builder pattern, Gradle customization, Maven Central publishing | |
| C# | content/languages/csharp.md | Async/await, cancellation tokens, DI integration, NuGet | |
| PHP | content/languages/php.md | Laravel integration, Guzzle config, Packagist publishing | |
| Ruby | content/languages/ruby.md | Sorbet typing, Rails integration, RubyGems publishing |
These guides include detailed configuration options, code examples, framework integrations, and publishing instructions.
When to Use
- Configuring language-specific gen.yaml options on an existing SDK
- Setting up SDK hooks, async patterns, or publishing
- Configuring runtime behavior (retries, timeouts, server selection) in application code
- User says: "configure SDK", "gen.yaml options", "SDK config", "runtime override", "per-call config"
- User asks about: Zod, Pydantic, NuGet, PyPI, npm, Maven Central, Packagist, RubyGems
Inputs
| Input | Required | Description | |
|---|---|---|---|
| Existing SDK | Yes | SDK with .speakeasy/workflow.yaml already created | |
| Target language | Yes | TypeScript, Python, Go, Java, C#, PHP, or Ruby |
Outputs
| Output | Description | |
|---|---|---|
| Updated gen.yaml | Language-specific configuration | |
| Hook files | Custom hooks if enabled |
Prerequisites
You must have an existing SDK with .speakeasy/workflow.yaml. If not, run:
Common Configuration (All Languages)
These options apply to all SDK targets in gen.yaml:
TypeScript Configuration
| Feature | Notes | |
|---|---|---|
| Zod validation | Automatic for all models | |
| Tree-shaking | Use moduleFormat: dual + standalone functions | |
| JSR publishing | Create jsr.json, run deno publish | |
| npm publishing | Standard npm publish |
Standalone functions for tree-shaking:
Python Configuration
| Feature | Notes | |
|---|---|---|
| Pydantic models | Automatic for all models | |
Async mode both | sdk.method() and sdk.method_async() | |
Async mode split | SDK() and AsyncSDK() constructors | |
| PyPI publishing | uv publish or poetry publish |
Async patterns:
Go Configuration
| Feature | Notes | |
|---|---|---|
| Interfaces | Generate with ifacemaker | |
| Mocks | Generate with mockery | |
| K8s integration | Add kubebuilder markers, run controller-gen |
Interface generation for testing:
Java Configuration
| Feature | Notes | |
|---|---|---|
| Builder pattern | Automatic for all classes | |
| Build customization | Use build-extras.gradle (preserved) | |
| Maven Central | ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository |
Client usage:
C# Configuration
| Feature | Notes | |
|---|---|---|
| Async/await | All operations async by default | |
| SSE streaming | EventStream<T> support | |
| NuGet publishing | dotnet pack -c Release && dotnet nuget push |
Async with cancellation:
PHP Configuration
| Feature | Notes | |
|---|---|---|
| PHP 8.2+ | Required minimum version | |
| Guzzle | HTTP client (configurable timeout) | |
| Packagist | Tag release, register on Packagist.org |
Security callback for token refresh:
Ruby Configuration
| Feature | Notes | |
|---|---|---|
| Sorbet typing | Optional, enable with typingStrategy: sorbet | |
| Faraday | HTTP client | |
| RubyGems | gem build && gem push |
SDK Hooks (All Languages)
Enable custom hooks with enableCustomCodeRegions: true. Hook files are preserved across regeneration.
| Language | Hook Location | |
|---|---|---|
| TypeScript | src/hooks/ | |
| Python | src/<pkg>/_hooks/ | |
| Go | internal/hooks/ | |
| Java | src/main/java/.../hooks/ | |
| C# | src/.../Hooks/ | |
| PHP | src/Hooks/ | |
| Ruby | lib/.../sdk_hooks/ |
See customize-sdk-hooks skill for detailed hook implementation.
Runtime Overrides
Runtime behavior can be configured at SDK instantiation or per-call. These override gen.yaml defaults.
Server Selection
Define server IDs in OpenAPI spec, then select at runtime:
| Language | SDK Constructor | Custom URL | |
|---|---|---|---|
| TypeScript | new SDK({ server: "sandbox" }) | new SDK({ serverURL: "..." }) | |
| Python | SDK(server="sandbox") | SDK(server_url="...") | |
| Go | SDK.New(SDK.WithServer("sandbox")) | SDK.WithServerURL("...") |
Retry Overrides
Override retry behavior per-call (spec defaults set via x-speakeasy-retries):
TypeScript:
Python:
Go:
Timeout Overrides
Set global timeout on SDK constructor, or per-call:
| Language | Global | Per-call | |
|---|---|---|---|
| TypeScript | new SDK({ timeoutMs: 30000 }) | sdk.op({}, { timeoutMs: 60000 }) | |
| Python | SDK(timeout_ms=30000) | sdk.op(timeout_ms=60000) | |
| Go | SDK.WithTimeoutMs(30000) | operations.WithTimeoutMs(60000) |
Pagination Usage
SDK auto-generates pagination helpers when x-speakeasy-pagination is set in spec:
Decision Framework
| Situation | Action | |
|---|---|---|
| Need tree-shaking (TS) | Set moduleFormat: dual, use standalone functions | |
| Need async/sync (Python) | Set asyncMode: both (default) | |
| Need separate async client | Set asyncMode: split (Python) | |
| Need interfaces for testing (Go) | Use ifacemaker + mockery | |
| Need custom build config (Java) | Edit build-extras.gradle | |
| Need runtime retry override | Pass retries config in per-call options | |
| Need runtime timeout override | Set timeoutMs on constructor or per-call | |
| Need server switching | Use x-speakeasy-server-id in spec, select at runtime |
What NOT to Do
- Do NOT use this skill for initial SDK generation - use
start-new-sdk-project - Do NOT edit generated files outside custom code regions
- Do NOT modify files in
src/that aren't in preserved directories (hooks, extra)
Troubleshooting
| Language | Issue | Solution | |
|---|---|---|---|
| TypeScript | Bundle too large | Use standalone functions | |
| Python | Async pagination blocking | Enable fixFlags.asyncPaginationSep2025: true | |
| Go | Interface not generated | Ensure struct is exported (capitalized) | |
| Java | Gradle sync fails | Run ./gradlew --refresh-dependencies | |
| C# | Async deadlock | Use await not .Result | |
| PHP | PHP version error | Requires PHP 8.2+ | |
| Ruby | Sorbet errors | Run bundle exec tapioca gems | |
| All | Retries not working | Ensure x-speakeasy-retries at document root or operation level | |
| All | Server ID not recognized | Add x-speakeasy-server-id to each server entry | |
| All | Pagination next() undefined | Add x-speakeasy-pagination to the list operation |
After Making Changes
After modifying gen.yaml configuration, prompt the user to regenerate the SDK:
Configuration complete. Would you like to regenerate the SDK now withspeakeasy run?
If the user confirms, run:
Changes to gen.yaml only take effect after regeneration.
Related Skills
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/configure-sdk-options/SKILL.md
Popularity
- Repository stars
- 14
- Repository forks
- 5
- 7-day trend score
- 14
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 3 May 2026, 5 months ago.
Extension points
hookPre/post lifecycle hooks
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/speakeasy-api/agent-skills/configure-sdk-options)