Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

generate-connector-spec

БесплатноБез исполняемых скриптовНе проверен

Generate the connector spec YAML file defining connection parameters and external options allowlist.

databrickslabsот databrickslabs★ 74 звезды на GitHub

Об этом скилле

Generate Connector Spec YAML

Goal

Generate a connector spec YAML file for the {{source_name}} connector that defines the connector specification including connection parameters and external options allowlist.

Output Contract

Produce a YAML file following the template at templates/connector_spec_template.yaml as src/databricks/labs/community_connector/sources/{{source_name}}/connector_spec.yaml.

Requirements

Connection Parameters Structure

The template supports two structure options based on the connector's authentication complexity:

Option A: Single Authentication Method (Simple Case)

Use a flat parameters list directly under connection when the connector has only one way to authenticate:

connection:
  parameters:
    - name: api_key
      type: string
      required: true
      description: API key for authentication.

Option B: Multiple Authentication Methods

Use auth_methods when the connector supports multiple ways to authenticate (e.g., API key vs. OAuth, or service account vs. API secret). Shared parameters go in parameters at the connection level:

connection:
  auth_methods:
    - name: api_token
      description: Authenticate using email and API token.
      parameters:
        - name: email
          type: string
          required: true
          description: User email address.
        - name: api_token
          type: string
          required: true
          description: API token for authentication.

    - name: oauth
      description: Authenticate using OAuth 2.0.
      parameters:
        - name: access_token
          type: string
          required: true
          description: OAuth 2.0 access token.

  # Shared parameters (apply to all authentication methods)
  parameters:
    - name: subdomain
      type: string
      required: true
      description: Your account subdomain.

Determining Which Structure to Use

  • Analyze the connector's __init__ method in src/databricks/labs/community_connector/sources/{{source_name}}/{{source_name}}.py.
  • Look for conditional logic that checks for mutually exclusive credentials (e.g., "if username and secret ... elif api_secret ...").
  • If the connector accepts multiple authentication approaches, use Option B with auth_methods.
  • If there's only one way to authenticate, use Option A with flat parameters.

OAuth 2.0 Connections (the oauth block)

If the source authenticates via OAuth 2.0, add a connection.oauth block. This makes the connector use a Unity Catalog COMMUNITY connection in an OAuth auth mode instead of static credentials. The connection layer (UC, or the labs authenticate tool for local dev) runs the OAuth flow and injects an access token into the connector's options at query time — the user only supplies their OAuth app's client_id + client_secret, never a token.

This is where the OAuth flow is chosen. Selecting the right auth mode (m2m vs u2m vs u2m_per_user) is a research/build-time decision you make here from the source's supported grant types and the connector's intended access pattern. Once it is recorded in oauth.flow, the rest of the lifecycle (connection creation, deployment, end-user docs) just follows the spec — no one re-picks the mode downstream.

connection:
  parameters:
    - name: client_id
      type: string
      required: true
      secret: true
      description: OAuth 2.0 client ID for the provider app.
    - name: client_secret
      type: string
      required: true
      secret: true
      description: OAuth 2.0 client secret issued alongside the client_id.

  oauth:
    flow: u2m                  # m2m | u2m | u2m_per_user — maps to the connection auth mode
    pkce: true                 # set false for a confidential client that doesn't need PKCE
    scopes: "read"             # space-separated scopes requested at consent
    authorization_url: "https://provider/oauth/authorize"   # u2m / u2m_per_user
    token_url: "https://provider/oauth/token"
    extra_auth_params:         # provider knobs folded into the authorize request (optional)
      access_type: offline
      prompt: consent

Choosing the flow

flow selects the auth mode and maps to the CLI's --auth-type / UC's community_oauth_flow. Pick from the grant types the source's API supports:

  • m2m — the standard OAuth 2.0 client-credentials grant. No human and no browser: the connection posts client_id + client_secret (and scopes) to the token_url and gets back an app-level access token. Choose this when the source authenticates the application rather than an end user — service-to-service APIs, admin/tenant-wide tokens, anything with a "client credentials" or "server-to-server" grant. Only token_url (and optionally scopes) is needed; authorization_url / pkce / extra_auth_params do not apply.
  • u2m — authorization-code flow where one human authorizes once at connection creatio
Полный SKILL.md на GitHub

Установить generate-connector-spec в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл generate-connector-spec?

Generate the connector spec YAML file defining connection parameters and external options allowlist.

Как установить скилл generate-connector-spec?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл generate-connector-spec запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить generate-connector-spec с