APIMatic SDK Skill

Let your AI coding assistant generate, validate, and publish APIMatic SDKs.

The apimatic-sdk skill turns your AI coding assistant into a guided SDK builder. Describe what you want, and the agent signs you in to the APIMatic CLI, generates the SDK, and publishes to a package registry or GitHub, all from within Claude Code, Cursor, or Codex.

What the skill does

AreaWhat the skill covers
SetupChecks for Node.js 24 and APIMatic CLI v2 (and offers to upgrade from v1), signs you in through the browser with an API key fallback
Project setupCreates the src directory with your API definition in src/spec/
SDK generationGenerating SDKs in C#, Python, and TypeScript with the right flags for destination, API version, and stability
Validation and transformationRunning apimatic api validate when generation reports errors in your API definition, and apimatic api transform to convert formats
CustomizationAdding custom code in new files so it survives regeneration, and recording each change in the SDK README
PublishingListing publishing profiles and publishing to NuGet, PyPI, npm, or GitHub

If you ask for a Java, PHP, Ruby, or Go SDK, the skill tells you the language isn't available yet and offers C#, Python, or TypeScript instead.

When the agent uses this skill

The agent activates apimatic-sdk automatically when you ask about:

  • Generating or downloading an SDK with the APIMatic CLI
  • Adding custom code to a generated SDK
  • Validating or converting your API definition before generating
  • Publishing an SDK, or listing publishing profiles

Use the skill

After you install the skill, open your project in Claude Code, Cursor, or Codex and describe what you want.

Example prompts

Generating an SDK:

"I have an OpenAPI definition at ./spec.yaml. Generate a TypeScript SDK for it."

Adding custom code:

"Add a helper to my Python SDK that retries rate-limited calls, without editing the generated files."

Publishing:

"Publish version 1.2.0 of my TypeScript SDK to npm and GitHub using my publishing profile."

What happens behind the scenes

For a first-time generation, the agent:

  1. Checks for Node.js 24 and APIMatic CLI v2, and installs or upgrades the CLI if needed.
  2. Signs you in through the browser, with an API key fallback.
  3. Sets up src/spec/ with your API definition if you're starting from scratch.
  4. Asks for the language and destination.
  5. Runs apimatic sdk generate with the chosen language and flags.
  6. Shows you the CLI output and where the SDK was written, for example ./sdk/typescript.

For later requests (regenerating, adding custom code, or publishing), the agent runs the right commands without asking again for details you've already given.

Adding custom code

The SDK generator has no configuration settings, so every change to a generated SDK is a code change. Regenerating an SDK overwrites the generated files, so any edits you make to them are lost.

Whether you or the agent add the code, the skill follows these guidelines:

  • Put custom logic in new files. Regeneration doesn't touch files it didn't generate.
  • Don't edit generated files. If a change can't live in a new file, expect to reapply it after every regeneration.
  • Describe every customization in the SDK's README.md, so future developers know what you added and why.

See Create an SDK with the CLI.

Publishing an SDK

The agent publishes only when you explicitly ask it to. A request like "generate an SDK for npm" stops at generation.

To publish, the agent:

  1. Lists your publishing profiles with apimatic publishing profile list and asks you to pick one. If you don't have one yet, it explains how to create one in the Publishing Center on the APIMatic Dashboard.
  2. Runs apimatic sdk publish with your profile ID, language, semantic version, and publish type: package for NuGet, PyPI, or npm, sourcecode for GitHub, or both.
  3. Shows you the link to the publishing logs, whether publishing succeeded or failed.

A successful publish also records the release in the languages block of src/apimatic.json, so an APIMatic portal built from the same project shows the install command, package, and repository on that language's SDK card.

If you plan to build a Context Plugin, ask the agent to publish with source code (sourcecode), because the plugin references your SDK repositories.

See Publish SDKs.

Troubleshooting

Sign-in fails

Check that your APIMatic account is active and your API key is correct. If browser sign-in doesn't work, ask the agent to sign in with an API key instead. You can create one in the APIMatic Dashboard under Account > API Keys.

In CI or containers, keep the key in a secret and pass it to the command, for example --auth-key="$APIMATIC_API_KEY". The CLI doesn't read the key from an environment variable on its own. sdk publish has no --auth-key flag, so sign in first with apimatic auth login --auth-key=....

The CLI refuses to run

The APIMatic CLI needs Node.js 24 or later. npm lets the install finish on older versions, but the CLI won't start. Install Node.js 24 from nodejs.org and try again.

Generation reports errors in the API definition

The agent runs apimatic api validate and explains the errors. Blocking issues and errors must be fixed before an SDK can be generated; warnings don't block generation but can lower SDK quality. See Validate & Lint.

An SDK already exists at the destination

The agent asks whether to overwrite it, then re-runs the command with --force, or uses a different destination.

Publishing stays queued for a long time

Don't cancel or re-run the command. The queued state is normal and resolves on its own. Act only if the CLI exits with an error.

On this page