home / skills / a5c-ai / babysitter / smithy-sdk-generator

This skill helps generate enterprise-grade SDKs using AWS Smithy, producing waiters, paginators, retries, and multi-language clients.

npx playbooks add skill a5c-ai/babysitter --skill smithy-sdk-generator

Review the files below or copy the command above to add this skill to your agents.

Files (2)
SKILL.md
2.0 KB
---
name: smithy-sdk-generator
description: AWS Smithy-based SDK generation for enterprise-grade APIs
allowed-tools:
  - Read
  - Write
  - Edit
  - Glob
  - Grep
  - Bash
---

# Smithy SDK Generator Skill

## Overview

This skill leverages AWS Smithy to generate enterprise-grade SDKs with AWS-style patterns including waiters, paginators, and automatic retries. Smithy provides a protocol-agnostic approach to API modeling.

## Capabilities

- Design Smithy models with traits for rich API semantics
- Generate SDKs with AWS-style patterns (waiters, paginators, retries)
- Implement custom code generation plugins
- Support multiple protocols (REST, RPC, etc.)
- Configure middleware and interceptor chains
- Generate comprehensive API documentation
- Implement client-side validation from constraints

## Target Processes

- SDK Code Generation Pipeline
- SDK Architecture Design
- Multi-Language SDK Strategy

## Integration Points

- AWS Smithy core and build plugins
- smithy-typescript for TypeScript SDK generation
- smithy-go for Go SDK generation
- smithy-rs for Rust SDK generation
- Custom code generators

## Input Requirements

- Smithy model files (.smithy)
- Trait configurations for behaviors
- Target language specifications
- Custom template overrides (if any)
- Protocol selection (restJson1, awsJson1_1, etc.)

## Output Artifacts

- Generated SDK source code
- API documentation
- Waiter configurations
- Paginator implementations
- Client configuration options
- Build artifacts per target language

## Usage Example

```yaml
skill:
  name: smithy-sdk-generator
  context:
    modelDirectory: ./model
    targetLanguages:
      - typescript
      - python
      - go
    protocol: restJson1
    generateWaiters: true
    generatePaginators: true
    customTraits: ./traits
```

## Best Practices

1. Use semantic traits to enrich API behavior
2. Define clear resource hierarchies
3. Implement proper pagination patterns
4. Add waiter definitions for async operations
5. Use validation constraints for input validation
6. Document all operations and shapes thoroughly

Overview

This skill generates enterprise-grade SDKs from AWS Smithy models using AWS-style patterns like waiters, paginators, and automatic retries. It targets multi-language output and integrates with Smithy toolchains to produce ready-to-use client libraries and documentation. The focus is deterministic, repeatable SDK generation for production APIs.

How this skill works

You provide Smithy model files, trait configurations, target language(s), and protocol choices. The skill parses models, applies semantic traits, and runs codegen pipelines (with optional custom plugins) to emit SDK source, documentation, waiters, paginators, and build artifacts. It can inject middleware/interceptor chains and client-side validation based on model constraints.

When to use it

  • Building language-specific SDKs from a single API model
  • Standardizing SDK behavior across services (retries, pagination, waiters)
  • Onboarding new client languages quickly (TypeScript, Go, Rust, Python)
  • Automating SDK releases as part of CI/CD pipelines
  • Enforcing deterministic, model-driven API surface and docs

Best practices

  • Model rich semantics with Smithy traits to capture API behavior and errors
  • Define clear resources and pagination patterns to simplify client usage
  • Add waiter definitions for long-running operations and async workflows
  • Use validation constraints in shapes to enable client-side checks and reduce runtime errors
  • Create and version custom codegen plugins and template overrides for consistent output

Example use cases

  • Generate TypeScript and Go SDKs from a single Smithy model for multi-platform clients
  • Add paginators and waiters automatically to support large-list operations and async tasks
  • Create custom middleware chains for metrics, tracing, and authorization across generated clients
  • Integrate generation step into CI to produce reproducible SDK artifacts and API docs on each release
  • Prototype and validate API contract changes at model level before implementation

FAQ

Which input files do I need?

Provide .smithy model files, trait configurations, protocol selection, and any custom templates or plugin configs.

Which languages are supported?

Out of the box it targets smithy-typescript, smithy-go, and smithy-rs; custom generators can add more languages.