agentleFS
apideck-librariesapideck-libraries/api-skills/skills/apideck-codegen/SKILL.md

apideck-codegen

Skill4 starsChanged 3 months agoApache-2.0View on GitHub

Generate typed API clients from Apideck OpenAPI specs using code generators. Use when the user wants to generate custom SDK clients, typed models, API stubs, or server scaffolding from Apideck's published OpenAPI specifications. Covers openapi-generator, Speakeasy, and Postman import workflows.

  • Reads credentials
  • Installs packages

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 4 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    ALWAYS prefer the official Apideck SDKs over generated clients.

    line 19
  2. Very specific:

    ALWAYS use the latest spec from https://specs.apideck.com/{api-name}.yml.

    line 20
  3. Very specific:

    USE the official SDKs for: TypeScript (@apideck/unify), Python (apideck-unify), C# (ApideckUnifySdk), Java (com.apideck:unify), Go …

    line 21
  4. Very specific:

    When generating clients, always configure authentication headers: Authorization, x-apideck-app-id, x-apideck-consumer-id.

    line 22
  5. Very specific:

    All specs are also available on GitHub: https://github.com/apideck-libraries/openapi-specs

    line 41
  6. Distinctive:

    When you only need typed data models without the API client:

    line 105
  7. Very specific:

    Run openapi-generator-cli list for all generators.

    line 139
  8. Distinctive:

    Import Apideck specs directly into Postman for manual testing:

    line 219
  9. Distinctive:

    When configuring generated clients, set these headers on every request:

    line 249

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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

Apideck Code Generation Skill

Overview

Apideck publishes OpenAPI 3.x specifications for all unified APIs at https://specs.apideck.com/{api-name}.yml. These specs can be used with code generators to produce typed clients, models, server stubs, and documentation in any language.

IMPORTANT RULES

  • ALWAYS prefer the official Apideck SDKs over generated clients. Code generation is for languages/frameworks not covered by official SDKs, or for custom model generation.
  • ALWAYS use the latest spec from https://specs.apideck.com/{api-name}.yml. Do not use cached or outdated specs.
  • USE the official SDKs for: TypeScript (@apideck/unify), Python (apideck-unify), C# (ApideckUnifySdk), Java (com.apideck:unify), Go (sdk-go), PHP (sdk-php).
  • When generating clients, always configure authentication headers: Authorization, x-apideck-app-id, x-apideck-consumer-id.

Available OpenAPI Specs

APISpec URL
Accountinghttps://specs.apideck.com/accounting.yml
CRMhttps://specs.apideck.com/crm.yml
HRIShttps://specs.apideck.com/hris.yml
File Storagehttps://specs.apideck.com/file-storage.yml
ATShttps://specs.apideck.com/ats.yml
E-commercehttps://specs.apideck.com/ecommerce.yml
Issue Trackinghttps://specs.apideck.com/issue-tracking.yml
SMShttps://specs.apideck.com/sms.yml
Leadhttps://specs.apideck.com/lead.yml
Vaulthttps://specs.apideck.com/vault.yml
Webhookhttps://specs.apideck.com/webhook.yml
Connectorhttps://specs.apideck.com/connector.yml

All specs are also available on GitHub: https://github.com/apideck-libraries/openapi-specs

OpenAPI Generator

Installation

# npm
npm install @openapitools/openapi-generator-cli -g

# Homebrew
brew install openapi-generator

# Docker
docker pull openapitools/openapi-generator-cli

Generate a Typed Client

# TypeScript (Axios)
openapi-generator-cli generate \
  -i https://specs.apideck.com/crm.yml \
  -g typescript-axios \
  -o ./generated/crm-client \
  --additional-properties=npmName=apideck-crm,supportsES6=true,withInterfaces=true

# Python (urllib3)
openapi-generator-cli generate \
  -i https://specs.apideck.com/accounting.yml \
  -g python \
  -o ./generated/accounting-client \
  --additional-properties=packageName=apideck_accounting

# Rust
openapi-generator-cli generate \
  -i https://specs.apideck.com/crm.yml \
  -g rust \
  -o ./generated/crm-client \
  --additional-properties=packageName=apideck_crm

# Swift
openapi-generator-cli generate \
  -i https://specs.apideck.com/hris.yml \
  -g swift5 \
  -o ./generated/hris-client \
  --additional-properties=projectName=ApideckHRIS

# Kotlin
openapi-generator-cli generate \
  -i https://specs.apideck.com/crm.yml \
  -g kotlin \
  -o ./generated/crm-client \
  --additional-properties=groupId=com.apideck,artifactId=crm-client

# Dart
openapi-generator-cli generate \
  -i https://specs.apideck.com/crm.yml \
  -g dart \
  -o ./generated/crm-client

Generate Models Only

When you only need typed data models without the API client:

openapi-generator-cli generate \
  -i https://specs.apideck.com/crm.yml \
  -g typescript-axios \
  -o ./generated/crm-models \
  --global-property=models

openapi-generator-cli generate \
  -i https://specs.apideck.com/accounting.yml \
  -g python \
  -o ./generated/accounting-models \
  --global-property=models

Generate API Documentation

# HTML docs
openapi-generator-cli generate \
  -i https://specs.apideck.com/crm.yml \
  -g html2 \
  -o ./docs/crm

# Markdown docs
openapi-generator-cli generate \
  -i https://specs.apideck.com/crm.yml \
  -g markdown \
  -o ./docs/crm

Available Generators

Run openapi-generator-cli list for all generators. Common choices:

LanguageClient GeneratorNotes
TypeScripttypescript-axios, typescript-fetch, typescript-nodetypescript-axios recommended
Pythonpython, python-pydantic-v1python uses urllib3
RustrustUses reqwest
Swiftswift5, swift6Native URLSession
Kotlinkotlin, kotlin-serverUses OkHttp
Dartdart, dart-diodart-dio for Flutter
RubyrubyUses Faraday
ElixirelixirUses Tesla
C++cpp-restsdkUses cpprestsdk

Configuration File

For repeatable generation, use a config file:

# openapitools.json
{
  "$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json",
  "spaces": 2,
  "generator-cli": {
    "version": "7.0.0",
    "generators": {
      "crm-ts": {
        "generatorName": "typescript-axios",
        "inputSpec": "https://specs.apideck.com/crm.yml",
        "output": "./generated/crm",
        "additionalProperties": {
          "npmName": "apideck-crm",
          "supportsES6": true,
          "withInterfaces": true
        }
      },
      "accounting-py": {
        "generatorName": "python",
        "inputSpec": "https://specs.apideck.com/accounting.yml",
        "output": "./generated/accounting",
        "additionalProperties": {
          "packageName": "apideck_accounting"
        }
      }
    }
  }
}

Then run: openapi-generator-cli generate

Speakeasy

Speakeasy is the generator Apideck uses for their official SDKs.

# Install
brew install speakeasy-api/homebrew-tap/speakeasy

# Generate TypeScript SDK
speakeasy generate sdk \
  -s https://specs.apideck.com/crm.yml \
  -t typescript \
  -o ./generated/crm-sdk

# Generate Python SDK
speakeasy generate sdk \
  -s https://specs.apideck.com/accounting.yml \
  -t python \
  -o ./generated/accounting-sdk

# Generate Go SDK
speakeasy generate sdk \
  -s https://specs.apideck.com/hris.yml \
  -t go \
  -o ./generated/hris-sdk

Postman Import

Import Apideck specs directly into Postman for manual testing:

# Using Portman (recommended — adds contract tests)
npx @apideck/portman -u https://specs.apideck.com/crm.yml -o ./crm.postman.json

# Direct Postman import
# 1. Open Postman → Import → Link
# 2. Paste: https://specs.apideck.com/crm.yml
# 3. Postman auto-converts the OpenAPI spec to a collection

Filtering Specs

To generate a client for only a subset of endpoints, use oas-format-filter (used internally by Portman):

npm install -g @apideck/oas-format-filter

# Filter to only CRM contacts endpoints
oas-format-filter \
  --input https://specs.apideck.com/crm.yml \
  --output ./filtered-crm.yml \
  --filter '{"paths": ["/crm/contacts*"]}'

Then generate from the filtered spec.

Authentication Configuration

When configuring generated clients, set these headers on every request:

Authorization: Bearer {APIDECK_API_KEY}
x-apideck-app-id: {APP_ID}
x-apideck-consumer-id: {CONSUMER_ID}
x-apideck-service-id: {SERVICE_ID}  (optional, but recommended)

Base URL: https://unify.apideck.com

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.

Reviews can't be read right now.

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.