agentleFS
speakeasy-apispeakeasy-api/sdk-generation-skills/skills/start-new-sdk-project/SKILL.md

start-new-sdk-project

Skill17 starsChanged 10 months agoApache-2.0View on GitHub

Use when generating a new SDK from an OpenAPI spec. This is the PRIMARY skill for SDK generation. Triggers on "create SDK", "generate SDK", "new SDK", "quickstart", "TypeScript SDK", "Python SDK", "Go SDK", "Java SDK", "generate TypeScript", "generate Python", "generate Go", "make SDK", "build SDK", "SDK from OpenAPI", "SDK from spec", "initialize SDK project".

  • Reads credentials

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run speakeasy auth login to authenticate interactively, or set the SPEAKEASY_API_KEY environment variable.

    line 47
  2. Very specific:

    Add more targets to .speakeasy/workflow.yaml for multi-language support

    line 138
  3. Very specific:

    Run speakeasy run to regenerate after spec or config changes

    line 139

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

start-new-sdk-project

Always use speakeasy quickstart to initialize a new SDK project. This is the ONLY correct command for new projects - it creates both the SDK and the essential .speakeasy/workflow.yaml configuration file.

⚠️ Never use speakeasy generate sdk for new projects - it does not create the workflow file needed for maintainable SDK development.

When to Use

  • Generating any SDK from an OpenAPI spec (TypeScript, Python, Go, Java, etc.)
  • Starting a brand new SDK project
  • No .speakeasy/workflow.yaml exists yet
  • First-time Speakeasy setup
  • User says: "generate SDK", "TypeScript SDK", "Python SDK", "Go SDK", "create SDK", "new SDK"

Inputs

InputRequiredDescription
OpenAPI specYesLocal file, URL, or registry source
Target languageYestypescript, python, go, java, csharp, php, ruby, kotlin, terraform
SDK nameYes (non-interactive)PascalCase name (e.g., AcmeSDK)
Package nameYes (non-interactive)Package identifier (e.g., acme-sdk)

Outputs

OutputLocation
Workflow config.speakeasy/workflow.yaml
Generated SDKOutput directory (default: current dir)

Prerequisites

For non-interactive environments (CI/CD, automation), set:

export SPEAKEASY_API_KEY="<your-api-key>"

Run speakeasy auth login to authenticate interactively, or set the SPEAKEASY_API_KEY environment variable.

Command

speakeasy quickstart --skip-interactive --output console -s <schema> -t <target> -n <name> -p <package-name>

Flags

FlagShortDescription
--skip-interactiveRequired for automation. Skips all prompts
--schema-sOpenAPI spec source (see Schema Sources below)
--target-tTarget language (see Supported Targets)
--name-nSDK name in PascalCase (e.g., MyCompanySDK)
--package-name-pPackage name (language variants auto-inferred)
--out-dir-oOutput directory (default: current dir)
--outputOutput format: summary, console, mermaid. Use console for automation
--init-gitInitialize git repo (omit to skip in non-interactive mode)

Schema Sources

The --schema flag accepts multiple source types:

TypeFormatExample
Local filePath./api/openapi.yaml
URLHTTP(S)https://api.example.com/openapi.json
Registry sourcesource-namemy-api
Registry source (tagged)source-name@tagmy-api@latest
Registry source (full)org/workspace/source@tagacme/prod/my-api@v2

Registry sources are OpenAPI specs you manage in your Speakeasy workspace. Use speakeasy pull --list --format json to see available sources. This lets you generate SDKs from specs managed in Speakeasy without needing local files.

Supported Targets

LanguageTarget Flag
TypeScripttypescript
Pythonpython
Gogo
Javajava
C#csharp
PHPphp
Rubyruby
Kotlinkotlin
Terraformterraform

Example

# From local OpenAPI file
speakeasy quickstart --skip-interactive --output console \
  -s ./api/openapi.yaml \
  -t typescript \
  -n "AcmeSDK" \
  -p "acme-sdk"

# From URL
speakeasy quickstart --skip-interactive --output console \
  -s "https://api.example.com/openapi.json" \
  -t python \
  -n "AcmeSDK" \
  -p "acme-sdk"

# From registry source (managed in your Speakeasy workspace)
speakeasy quickstart --skip-interactive --output console \
  -s "my-api@latest" \
  -t go \
  -n "AcmeSDK" \
  -p "acme-sdk"

# With custom output directory and git init
speakeasy quickstart --skip-interactive --output console \
  -s ./api/openapi.yaml \
  -t python \
  -n "AcmeSDK" \
  -p "acme-sdk" \
  -o ./sdks/python \
  --init-git

What It Creates

  1. Workflow configuration: .speakeasy/workflow.yaml
  2. Generated SDK: Full SDK in the output directory, ready to use

Next Steps After Quickstart

  1. Review the generated SDK in the output directory
  2. Add more targets to .speakeasy/workflow.yaml for multi-language support
  3. Run speakeasy run to regenerate after spec or config changes

Essential CLI Commands

CommandPurpose
speakeasy quickstart ...Initialize new SDK project
speakeasy run -y --output consoleRegenerate SDK from workflow
speakeasy lint openapi --non-interactive -s spec.yamlValidate OpenAPI spec
speakeasy auth loginAuthenticate with Speakeasy
speakeasy pull --list --format jsonList registry sources

What NOT to Do

  • Do NOT use speakeasy generate sdk for new projects. This low-level command generates code but does NOT create .speakeasy/workflow.yaml. Without a workflow file, you lose:
    • Reproducible builds via speakeasy run
    • Multi-target SDK generation
    • CI/CD integration
    • Version tracking and upgrade paths
  • Do NOT skip --skip-interactive in automated environments. The command will hang waiting for user input.
  • Do NOT omit --output console in automated environments. You need structured output to verify success.

quickstart vs generate sdk

CommandCreates workflow.yamlUse case
speakeasy quickstart✅ YesNew projects - Always use this
speakeasy generate sdk❌ NoOne-off generation (rare, advanced use only)

Always use quickstart for new SDK projects. The workflow file it creates is essential for maintainable SDK development.

Troubleshooting

ErrorCauseSolution
Workflow already exists.speakeasy/workflow.yaml already presentRun speakeasy run to regenerate the existing SDK instead
UnauthorizedMissing or invalid API keyRun speakeasy auth login or set SPEAKEASY_API_KEY
Schema not foundInvalid path, URL, or source nameVerify path exists or use speakeasy pull --list for sources

Related Skills

  • diagnose-generation-failure - When generation fails
  • manage-openapi-overlays - Customize spec with overlays
  • configure-sdk-options - Language-specific gen.yaml configuration for all supported languages

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.