/speakeasy:orchestrate-multi-repo-sdksfrom speakeasy
Orchestrates SDK generation across separate language repositories with PR-triggered cross-repo workflows and automated PR reconciliation.
Ships in speakeasy. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Manage SDK generation when each language SDK lives in its own repository (e.g., myapi-typescript, myapi-python, myapi-go).
┌─────────────────────────────────────────────────────────┐
│ API Spec Repository │
├─────────────────────────────────────────────────────────┤
│ PR opened │ PR merged/closed │ Main push │
│ ↓ │ ↓ │ ↓ │
│ kick-off │ reconcile-prs │ sync │
└───────────────┴──────────────────────┴──────────────────┘
│ │ │
▼ ▼ ▼
┌──────────────┐ ┌──────────────┐ ┌──────────────┐
│ typescript │ │ python-sdk │ │ go-sdk │
│ SDK PR │ │ SDK PR │ │ SDK PR │
└──────────────┘ └──────────────┘ └──────────────┘
Triggers SDK generation in each language repo when spec PR opens:
# .github/workflows/kick-off-generation.yaml
name: Kick Off SDK Generation
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
trigger_sdk_repos:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- repo: myapi-typescript
- repo: myapi-python
- repo: myapi-go
steps:
- name: Trigger SDK generation
env:
GH_TOKEN: ${{ secrets.SDK_REPOS_PAT }}
run: |
gh workflow run sdk_generation.yaml \
--repo "your-org/${{ matrix.repo }}" \
--field feature_branch="${{ github.head_ref }}"
Auto-merge or close SDK PRs when spec PR closes:
# .github/workflows/reconcile-prs.yaml
name: Reconcile SDK PRs
on:
pull_request:
types: [closed]
jobs:
manage_sdk_prs:
runs-on: ubuntu-latest
strategy:
matrix:
repo: [myapi-typescript, myapi-python, myapi-go]
steps:
- name: Manage SDK PR
env:
GH_TOKEN: ${{ secrets.SDK_REPOS_PAT }}
run: |
branch="${{ github.event.pull_request.head.ref }}"
was_merged="${{ github.event.pull_request.merged }}"
pr_number=$(gh pr list --repo "your-org/${{ matrix.repo }}" \
--head "$branch" --json number --jq '.[0].number')
if [[ -n "$pr_number" ]]; then
if [[ "$was_merged" == "true" ]]; then
gh pr merge "$pr_number" --repo "your-org/${{ matrix.repo }}" \
--squash --delete-branch
else
gh pr close "$pr_number" --repo "your-org/${{ matrix.repo }}"
fi
fi
Each SDK repo needs a dispatchable workflow:
# .github/workflows/sdk_generation.yaml (in each SDK repo)
name: SDK Generation
on:
workflow_dispatch:
inputs:
feature_branch:
description: 'Feature branch from spec repo'
required: false
jobs:
generate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Create branch
if: inputs.feature_branch != ''
run: git checkout -b "${{ inputs.feature_branch }}"
- name: Generate SDK
run: speakeasy run -y
env:
SPEAKEASY_API_KEY: ${{ secrets.SPEAKEASY_API_KEY }}
- name: Create PR
if: inputs.feature_branch != ''
run: |
git add -A && git commit -m "chore: regenerate SDK" || exit 0
git push -u origin "${{ inputs.feature_branch }}"
gh pr create --title "SDK update" --body "Auto-generated" || true
| Secret | Where | Purpose |
|---|---|---|
SPEAKEASY_API_KEY | All repos | Speakeasy CLI auth |
SDK_REPOS_PAT | Spec repo | PAT with repo scope for SDK repos |
Report SDK generation status back to spec PR:
- name: Update PR comment
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
marker="<!-- sdk-${{ matrix.repo }}-status -->"
comment="$marker
### ${{ matrix.repo }} SDK
| Status | PR |
|--------|-----|
| ✅ Success | [View PR](url) |"
gh api "repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments" \
-f body="$comment"
| Aspect | Multi-Repo | Monorepo |
|---|---|---|
| Isolation | Independent versioning | Shared versioning |
| CI Complexity | Higher | Lower |
| Best For | Different teams/cadences | Unified releases |
| Issue | Solution |
|---|---|
| PAT permissions | Ensure repo + actions scope |
| Branch not found | SDK repo must have workflow on main |
| PR not created | Check if branch already has PR |
start-new-sdk-project - SDK repo setuporchestrate-multi-target-sdks - Single repo, multiple targetsWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
14 skills in this plugin
/configure-sdk-optionsUse 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./customize-sdk-hooksUse when implementing SDK code hooks for custom logic (not spec configuration or runtime overrides).
Covers SDK lifecycle hooks: BeforeRequest, AfterSuccess, AfterError for custom headers,
telemetry, HMAC signing, and request/response transformation.
Triggers on "SDK hooks", "add hooks", "BeforeRequestHook", "custom logic in SDK",
"telemetry hook", "SDK middleware", "intercept requests", "HMAC signing hook",
"custom code in hooks directory".
/diagnose-generation-failureUse when SDK generation failed or seeing errors. Triggers on "generation failed", "speakeasy run failed", "SDK build error", "workflow failed", "Step Failed", "why did generation fail"Claude Code refuses to install this plugin
.claude-plugin/plugin.json: skills: Invalid string: must start with "./"
Checked against Claude Code 2.1.332's install rules. The listing below is what the repository ships; Claude Code cannot install it as published.
Other plugins' skills for the same job