/oagen:generate-sdkfrom oagen
Orchestrates end-to-end SDK generation for a target language, handling both backwards-compatible and fresh scenarios by sequencing sub-skills.
Ships in oagen. 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.
Orchestrate the end-to-end workflow for generating an SDK for a target language. This skill does not implement anything itself — it determines the right scenario, sequences the correct skills, and tracks progress across steps.
ruby, python, node, go)A (backwards-compatible with existing SDK) or B (fresh, no existing SDK)Emitters, extractors, smoke tests, and their unit tests all live in the emitter project, not in the oagen core repo. The emitter project depends on @workos/oagen for types and shared utilities.
Sub-skills use subagents (via the built-in Explore agent type) to keep the main context lean. Read-heavy exploration — studying existing SDKs, reading reference implementations — is delegated to isolated agents that return only structured summaries. This prevents context rot during the write-heavy generation steps that follow.
Each sub-skill documents where it uses subagents:
/generate-emitter — Step 1a (SDK exploration) and Steps 3-5 (reference emitter reading)/generate-extractor — Prerequisites (SDK exploration)/generate-smoke-test — Prerequisites (reference smoke script reading) and Step 2 (SDK SERVICE_MAP)/verify-compat — Step 1 (baseline extraction spot-check)Collect these values via AskUserQuestion. If any were provided as arguments, skip the corresponding question.
language — target language (e.g., ruby, python, php, node)scenario — which workflow to use:
A. Backwards compatible — There's a published SDK with consumers who depend on its public API. The generated SDK must match the existing surface.
B. Fresh — No existing SDK to preserve, or you're intentionally replacing one. No compat constraints.
sdk_path (Scenario A only) — path to the existing SDK. Validate the path exists (look for package.json, Gemfile, go.mod, pyproject.toml, or similar).project — emitter project path (e.g., ../oagen-emitters/node). Create if needed:
mkdir -p {project}/src/{language} && mkdir -p {project}/test/{language}
spec — path to the OpenAPI spec (e.g., ../openapi.yaml)Store all values and pass them to all sub-skill invocations.
Step 1: /generate-emitter {language} {project} sdk_path={sdk_path} — study existing SDK, scaffold emitter
Step 2: /generate-extractor {language} sdk_path={sdk_path} — scaffold extractor
Step 3: /verify-compat {language} sdk_path={sdk_path} — extract baseline, verify
Step 4: /generate-smoke-test {language} — smoke tests against output dir
Step 5: /verify-smoke-test {language} — iterate until clean
Step 6: /integrate {language} sdk_path={sdk_path} — merge into live SDK
Step 1: /generate-emitter {project} {language} — scaffold emitter
Step 2: /generate-smoke-test {language} — wire-level HTTP parity tests
Step 3: /verify-smoke-test {language} — run smoke tests
Lifecycle note: Scenario B is a one-time bootstrap. Once the generated SDK ships, it becomes the live SDK. All future spec updates follow Scenario A — use
--targetto integrate into the live SDK and--api-surfaceto preserve backwards compatibility.
Confirm with the user, then invoke the first skill.
Invoke each skill in order using the Skill tool, passing project through. After each skill, validate:
# After /generate-emitter — design doc, entry point, and tests
ls {project}/docs/sdk-architecture/{language}.md
ls {project}/src/{language}/index.ts
cd {project} && npx vitest run test/{language}/ 2>&1 | tail -5
# After /generate-extractor — extractor registered with hints
grep -l "{language}Extractor\|{language}_extractor" {project}/src/plugin.ts {project}/src/index.ts
grep -l "hints" {project}/src/compat/extractors/{language}.ts
# After /verify-compat — handled by the skill itself
# After /generate-smoke-test — script exists
ls {project}/smoke/sdk-{language}.ts
# After /verify-smoke-test — handled by the skill itself
# After /integrate — changes visible in live SDK
cd {sdk_path} && git diff --stat
For Scenario A: After /generate-emitter, also verify the design doc references real SDK patterns:
grep -c "existing SDK\|from src/" {project}/docs/sdk-architecture/{language}.md
If a skill fails or the user wants to pause, note where they stopped. They can resume by running the remaining skills individually.
Run the full validation suite:
cd {project} && npx vitest run # emitter project
npx tsc --noEmit # oagen core type check
npx tsup # oagen core build
Then present the summary:
=== {language} SDK support: COMPLETE ===
Scenario: {A/B}
Skills completed:
[x] /generate-emitter {language}
[x] /generate-extractor {language} (Scenario A only)
[x] /verify-compat {language} (Scenario A only)
[x] /integrate {language} (Scenario A only)
[x] /generate-smoke-test {language}
Validation:
Emitter tests: {N} passed, {N} failed
Type check: PASS/FAIL
Build: PASS/FAIL
Only include this next section in the output if this is Scenario A:
This skill produces, via its sub-skills:
src/plugin.ts)smoke/sdk-{language}.ts{project}/sdk/What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Generated from the plugin's indexed repository (workos/oagen) — no native marketplace selected
npx claudepluginhub p/workos-oagen9 skills in this plugin
/check-emitter-parityAudit an emitter's coverage of IR fields and produce a structured gap analysis. Use when checking if an emitter handles all IR types, after updating oagen, or verifying emitter completeness. Also triggers for "IR coverage", "emitter audit", "field coverage", "parity check"./generate-emitterScaffold a new language emitter for oagen, implementing the Emitter interface with idiomatic target-language code generation. Use this skill whenever the user wants to add a new target language, generate SDKs for a new language, add Go/Python/Kotlin/Java/etc. support, create an emitter, or asks about code generation for a language — even if they don't use the word "emitter" explicitly. Also triggers when the user mentions "add language support" or "new SDK target"./generate-extractorScaffold a new language extractor for oagen's compat system, implementing the Extractor interface to extract a live SDK's public API surface. Use when the user wants to add backwards-compatibility support, build an extractor, check for breaking changes or regressions, or asks about extracting an API surface for any language — even if they don't use the word "extractor" explicitly. Also triggers for "compat support", "API surface analysis", or "public surface extraction"./generate-smoke-testCreate a smoke test script for a new SDK language that verifies wire-level HTTP parity against the OpenAPI spec and live API baseline. Use when adding smoke tests for a new language, verifying a generated SDK against the real API, or checking HTTP request/response correctness. Also triggers for "integration test", "wire-level test", "HTTP parity", or "end-to-end SDK test"./integrateIntegrate generated SDK code into a live SDK by running `oagen generate --target`. Required for every Scenario A generation cycle — initial setup and ongoing spec updates. Use when the user wants to merge generated code into an existing SDK or integrate emitter output into a live codebase./review-operationsReview resolved operation names from the OpenAPI spec. Runs the resolution algorithm with hints applied and outputs a review table for human approval. Use when reviewing operation names, checking for unhinted operations, auditing method naming, or after spec changes. Also triggers for "operation names", "method names", "hint map", "operation review", "unhinted operations".Other plugins' skills for the same job