customize-sdk-hooks

Official

Extend SDKs with custom lifecycle hooks.

Authorspeakeasy-api
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill enables developers to inject custom logic into generated SDKs by implementing lifecycle hooks, enabling advanced customization without altering API specs.

Core Features & Use Cases

  • Configure and implement BeforeRequest, AfterSuccess, and AfterError hooks to modify requests, transform responses, and capture telemetry.
  • Add custom headers, signing, or middleware logic in the SDK without touching generated code each cycle.
  • Use cases include injecting correlation IDs, custom authentication headers, and per-operation telemetry for observability.

Quick Start

  1. Ensure you have a Speakeasy-generated SDK with a src/hooks directory.
  2. Create a new hook implementation file under src/hooks/ (e.g., custom_headers.ts) that implements the appropriate hook interface.
  3. Register your hook in src/hooks/registration.ts and regenerate the SDK with the Speakeasy CLI.
  4. Call your SDK as usual and verify the hooks execute during the request lifecycle.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: customize-sdk-hooks
Download link: https://github.com/speakeasy-api/skills/archive/main.zip#customize-sdk-hooks

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.