Agent skill

Generating Connectors

by ballerina-platform in ballerina-platform/ballerina-library

Generates a complete Ballerina connector from an OpenAPI specification.

Apache-2.0Auto-check passedBackend & APIs

Install Generating Connectors

skills CLI
$ npx skills add ballerina-platform/ballerina-library --skill generating-connectors -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ballerina-platform/ballerina-library generating-connectors --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ballerina-platform/ballerina-library.git skills-src && mkdir -p .claude/skills && cp -r skills-src/agent-skills/skills/generating-connectors .claude/skills/generating-connectors && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
generating-connectors
GitHub stars
141
Token cost
~2.6k tokens
SKILL.md length
629 words
Files
46 (incl. scripts, references)
Skills in repo
3
Repo updated
First seen
Licence
Apache-2.0

At a glance

Generates a complete Ballerina connector from an OpenAPI specification.

  • Works in 4 steps: Print the welcome banner → Read and follow stages/00-setup.md to… → After setup, execute stages in order,… → …
  • The user wants to create
  • SKILL.md covers How This Skill Works, Quick Reference, Entry Point Instructions and Shared State, plus 3 more sections
  • Runs Python and Shell scripts from its folder

What it does

Generating Connectors is an agent skill from ballerina-platform/ballerina-library. Generates a complete Ballerina connector from an OpenAPI specification. Use when the user wants to create, generate, or build a Ballerina connector from an OpenAPI or Swagger spec; run the connector creation pipeline; generate a Ballerina client from an API spec; or produce connector tests, examples, and documentation.

Its SKILL.md is about 2.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 48 other files, including scripts and reference files (for example `evals/README.md`, `evals/run_trigger_eval.sh` and `evals/train_queries.json`).

It sits in Backend & APIs, covering OpenAPI specifications. It works with OpenAPI. The repository describes itself as: The Ballerina Library. The licence is Apache-2.0.

When your agent uses it

  • The user wants to create
  • Build a Ballerina connector from an OpenAPI
  • Run the connector creation pipeline
  • Generate a Ballerina client from an API spec

Example prompts

  • “Use the generating-connectors skill to generate a complete Ballerina connector from an OpenAPI specification”
  • “/generating-connectors”

Requirements

  • Python 3
  • A Bash shell

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Print the welcome banner
  2. Read and follow stages/00-setup.md to collect all configuration. Do this before loading any other stage file.
  3. After setup, execute stages in order, respecting EXCLUDED_STAGES
  4. When any stage runs bal build and it fails, read references/fix-procedure.md and invoke it immediately in that stage's context before…

What it can do on your machine

Read from SKILL.md and the folder at commit f62995c. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 10 files in scripts/ (Python and Shell, from the files we listed), which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Generating Connectors loads about 2.6k tokens when it runs, and up to ~4.7k if it reads all its reference files. Until then it costs about 86 tokens; SKILL.md has 629 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~86
When it runs · the whole SKILL.md, loaded when a task matches
~2.6k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~4.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from ballerina-platform/ballerina-library at commit f62995c, republished under its Apache-2.0 licence (© ballerina-platform). 629 words, ~2,576 tokens.

Download SKILL.mdSave it as .claude/skills/generating-connectors/SKILL.md (or your agent's skills folder). This skill also uses 45 other files; get the full folder from GitHub.
name
generating-connectors
description
Generates a complete Ballerina connector from an OpenAPI specification. Use when the user wants to create, generate, or build a Ballerina connector from an OpenAPI or Swagger spec; run the connector creation pipeline; generate a Ballerina client from an API spec; or produce connector tests, examples, and documentation.

Generating Ballerina Connectors Skill

An AI-assisted pipeline for generating and maintaining Ballerina connectors from OpenAPI specifications. Mirrors the bal connector openapi workflow with interactive guidance, "2+1" prompting, and LLM reasoning applied only where it adds value.


How This Skill Works

This skill orchestrates five pipeline stages in sequence:

Setup → Sanitize → Client → Tests → Examples → Docs

Each stage is defined in a dedicated file under stages/. Load only the active stage's file into context — do not preload all stages.

Compilation errors are fixed inline within each stage using the reusable fix procedure (references/fix-procedure.md). Any stage that runs bal build will invoke this procedure automatically on failure — no separate fix stage.

Scripts in scripts/ handle all deterministic operations. Run them via Bash — do not reimplement their logic inline.


Quick Reference

StageFileSkippable?Key output
0. Setupstages/00-setup.mdNoConfiguration, validated spec
1. Sanitizestages/01-sanitize.mdYes (sanitize)aligned_ballerina_openapi.yaml, sanitations.md
2. Clientstages/02-client.mdYes (client)client.bal, types.bal — build + auto-fix inline
3. Testsstages/03-tests.mdYes (tests)tests/test.bal, mock server — build + auto-fix inline
4. Examplesstages/04-examples.mdYes (examples)regenerate safely, or retain + validate existing packages when excluded
5. Docsstages/05-docs.mdYes (docs)README.md, Module.md, Ballerina.toml keywords

Entry Point Instructions

When this skill is invoked:

  1. Print the welcome banner:

    ╔══════════════════════════════════════════╗
    ║       Ballerina Connector Generator      ║
    ╚════════════════════════════════ ᵥ₀․₄․₀ ══╝
    
    I'll guide you through generating a Ballerina connector from your OpenAPI spec.
    This involves up to 5 stages: sanitize → client → tests → examples → docs.
  2. Read and follow stages/00-setup.md to collect all configuration. Do this before loading any other stage file.

  3. After setup, execute stages in order, respecting EXCLUDED_STAGES:

    for stage in [sanitize, client, tests, examples, docs]:
      if stage not in EXCLUDED_STAGES:
        Read the corresponding stage file
        Follow its instructions completely
        If INTERACTIVE_MODE: pause and confirm before next stage
      elif stage == examples:
        Read `stages/04-examples.md` and follow its retained-example validation path
  4. When any stage runs bal build and it fails, read references/fix-procedure.md and invoke it immediately in that stage's context before proceeding.


Shared State

These variables are set in Setup (stage 00) and used by all subsequent stages:

VariableDescription
PYTHON_CMDResolved Python 3 command for this machine (python3/python/py) — determined once in Setup Step 0
SPEC_PATHAbsolute or relative path to the input OpenAPI spec
BALLERINA_DIRDirectory containing (or to contain) Ballerina.toml — where client.bal, types.bal, utils.bal, tests/, README.md, Module.md are generated
SPEC_DIRUser-confirmed path for the aligned spec, sanitations.md, and stable operation-ID/schema-name decisions in ai-mappings.json (default: ./docs/spec)
EXAMPLE_DIRUser-confirmed path for generated examples (default: ./examples); retained examples use this default even when generation is excluded
BAL_ORGBallerina package org (read from Ballerina.toml or collected from user)
BAL_PACKAGEBallerina package name (read from Ballerina.toml or collected from user)
LICENSE_PATHPath to the user-provided license file, or empty if not provided
TAGSList of OpenAPI tags to filter (or empty for all)
OPERATIONSList of operation IDs to filter (or empty for all)
USE_REMOTEBoolean — generate remote vs resource methods (connector-tool default: false)
INTERACTIVE_MODEBoolean — pause after each stage (connector-tool default: false)
EXCLUDED_STAGESList of stage names to skip — valid values: sanitize, client, tests, examples, docs
SPEC_METADATAJSON from parse_openapi_spec.py on the original spec (Stage 00) — the only spec representation in LLM context
ALIGNED_SPEC_METADATAJSON from parse_openapi_spec.py on ALIGNED_SPEC, the post-flatten/align spec (Stage 01 onward) — authoritative for path keys, operationIds, and generated schema names
Show full SKILL.md (164 more words)Show less

Core Principles

Context hygiene: Never inject the raw OpenAPI spec into the LLM context. Always use the structured JSON output from scripts/parse_openapi_spec.py. When fixing code errors, read only the specific lines indicated by scripts/parse_errors.py.

Deterministic first: Use scripts for everything that doesn't require reasoning. Only use the LLM for: spec enhancement (naming, descriptions), code error repair, and content generation (examples, docs).

"2+1" prompting: For every required input, always offer exactly two contextual defaults plus a "custom value" option. See stages/00-setup.md for the pattern.

Transparency: Print a clear status line before each sub-step. Use ✓ for success, ⚠ for warnings, ✗ for failures.


Reference Files

  • references/workflows.md — Stage sequencing rules, error handling, final summary format
  • references/fix-procedure.md — Reusable compilation error fixer (invoked inline by client, tests, examples stages)
  • templates/readme_template.md — Connector README scaffold for stage 05

Scripts Reference

All scripts are in <skill-root>/scripts/ and are pure Python (.py) — no shell scripts, so they run identically on macOS/Linux/Windows. Invoke them with <PYTHON_CMD> (resolved once in Setup Step 0), not a hardcoded python3.

bash
# Check environment (bal, PyYAML) — run first in setup, after PYTHON_CMD is resolved
<PYTHON_CMD> scripts/check_environment.py

# Find OpenAPI spec candidates in CWD — use before prompting for spec path
<PYTHON_CMD> scripts/find_spec_files.py

# Find an existing Ballerina.toml nested below CWD — use before prompting for output dir
<PYTHON_CMD> scripts/find_ballerina_toml.py

# Initialise a Ballerina package in the output dir (bal new . + remove main.bal)
<PYTHON_CMD> scripts/init_ballerina_package.py "<output-dir>"

# Validate spec file (YAML/JSON validity + required fields)
<PYTHON_CMD> scripts/validate_spec.py "<spec-path>"

# Extract structured spec metadata — the only spec representation in LLM context
<PYTHON_CMD> scripts/parse_openapi_spec.py "<spec-path>"

# Convert YAML spec to JSON — writes <same-name>.json, prints output path
<PYTHON_CMD> scripts/convert_yaml_to_json.py "<spec.yaml>"

# Locate aligned/flattened spec output in a spec directory
<PYTHON_CMD> scripts/find_spec_output.py "<spec-dir>"

# Read Ballerina.toml package fields → JSON {org, name, version, distribution, keywords, description}
<PYTHON_CMD> scripts/parse_ballerina_toml.py "<Ballerina.toml>"

# Write/replace the keywords array in Ballerina.toml's [package] section
<PYTHON_CMD> scripts/write_ballerina_keywords.py "<Ballerina.toml>" "<keyword1>" "<keyword2>" ...

# Generate/merge sanitations.md from a structural diff of original vs aligned spec
<PYTHON_CMD> scripts/generate_sanitations.py "<original-spec>" "<aligned-spec>" "<out.md>" --template "<template>" --module-name "<PC>" --cli-command "<cmd>"

# Analyse client.bal → JSON {apiCount, numExamples, configType, methods:[...]}
<PYTHON_CMD> scripts/analyze_client.py "<client.bal>"

# Generate service stub from spec → tests/mock_service.bal
# 3rd/4th args optional (empty string when unset): operation filter + license header
<PYTHON_CMD> scripts/generate_mock_stub.py "<aligned-spec>" "<output-dir>" "<SELECTED_OPERATIONS>" "<LICENSE_PATH>"

# Run any bal command in a working directory — prints stderr to a temp file and its path on failure
<PYTHON_CMD> scripts/run_bal_command.py --cwd "<working-dir>" <command> [<argument>...]

# Parse compilation errors from bal build stderr → JSON error array
<PYTHON_CMD> scripts/parse_errors.py "<stderr-file-or-stdin>"

# Reuse and persist stable AI operation-ID decisions across regeneration runs
<PYTHON_CMD> scripts/operation_id_mappings.py prepare "<aligned-spec>" "<ai-mappings.json>" "<candidate.json>"
<PYTHON_CMD> scripts/operation_id_mappings.py apply "<aligned-spec>" "<candidate.json>" "<decisions.json>" "<ai-mappings.json>"

# Scan an aligned spec for duplicate operationIds — non-fatal warnings
<PYTHON_CMD> scripts/check_duplicate_operation_ids.py "<aligned-spec>"

# Reuse and persist stable AI schema-name decisions; schema-less specs are supported
<PYTHON_CMD> scripts/schema_mappings.py prepare "<aligned-spec>" "<ai-mappings.json>" "<candidate.json>"
<PYTHON_CMD> scripts/schema_mappings.py apply "<aligned-spec>" "<candidate.json>" "<decisions.json>" "<ai-mappings.json>"

# Collect/apply missing request-body and API-key descriptions
<PYTHON_CMD> scripts/spec_descriptions.py prepare "<aligned-spec>" "<requests.json>"
<PYTHON_CMD> scripts/spec_descriptions.py apply "<aligned-spec>" "<requests.json>" "<decisions.json>"

# Normalize and resolve a unique snake_case example name
<PYTHON_CMD> scripts/example_names.py resolve "<examples-dir>" "<suggested-name>" "<fallback-name>"

# Capture and compare client/types source snapshots for semantic-version advice
<PYTHON_CMD> scripts/client_version_summary.py capture "<ballerina-dir>" "<baseline.json>"
<PYTHON_CMD> scripts/client_version_summary.py diff "<ballerina-dir>" "<baseline.json>"

# Scan or safely clean generated example packages only
<PYTHON_CMD> scripts/manage_examples.py <scan|cleanup> "<examples-dir>"

© ballerina-platform, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 45 other files (scripts, references) in agent-skills/skills/generating-connectors of ballerina-platform/ballerina-library.

  • SKILL.md
  • evals/README.md
  • evals/run_trigger_eval.sh
  • evals/train_queries.json
  • evals/trigger_queries.json
  • evals/validation_queries.json
  • references/fix-procedure.md
  • references/workflows.md
  • scripts/analyze_client.py
  • scripts/check_duplicate_operation_ids.py
  • scripts/check_environment.py
  • scripts/client_version_summary.py
  • scripts/convert_yaml_to_json.py
  • scripts/example_names.py
  • scripts/find_ballerina_toml.py
  • scripts/find_spec_files.py
  • scripts/find_spec_output.py
  • scripts/generate_mock_stub.py
  • … and 28 more

Open the folder on GitHubat commit f62995c

Compare with similar skills

Generating Connectors next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Generating Connectors compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Generating Connectors this skillballerina-platform/ballerina-library141—~2.6kAutomated safety check: PassApache-2.0
ToolJet Marketplace Plugin BuilderToolJet/ToolJet41k—~2.1kAutomated safety check: PassAGPL-3.0
Step Partsearthtojake/text-to-cad19k1 repos~1.5kAutomated safety check: PassMIT
OpenAPI to MCP Servermcp-use/mcp-use11k—~5.2kAutomated safety check: PassApache-2.0
Use Yaakmountain-loop/yaak19k—~1.9kAutomated safety check: PassMIT
API DesignerJeffallan/claude-skills12k1 repos~2kAutomated safety check: PassMIT

Similar skills

  • Turns an API description, such as an OpenAPI file or a Postman collection, into a connector plugin for ToolJet's marketplace and checks it with the repo's validator.

    41k GitHub stars~2.1k tokensUpdated today
    Backend & APIsAuto-check passed
  • Step Parts

    earthtojake/text-to-cad

    Find, evaluate, and download common purchasable CAD parts from step.parts, including named off-the-shelf actuators, servos, motors, electronics boards, connectors, screws, bolts, nuts, washers…

    19k GitHub starsUsed in 1 repo~1.5k tokens
    Backend & APIsAuto-check passed
  • OpenAPI to MCP Server

    mcp-use/mcp-use

    Turns an OpenAPI or Swagger spec into an MCP server with the mcp-use TypeScript SDK, mapping each operation to a tool, wiring auth, testing and deploying.

    11k GitHub stars~5.2k tokensUpdated today
    Backend & APIsAuto-check passed
  • Use Yaak

    mountain-loop/yaak

    A skill your agent uses when the user mentions Yaak, a Yaak workspace, or the yaak command, or asks to call, hit, or smoke test HTTP/REST endpoints, save or organize API requests for reuse or manual…

    19k GitHub stars~1.9k tokensUpdated 2 days ago
    Backend & APIsAuto-check passed
  • API Designer

    Jeffallan/claude-skills

    Designs REST and GraphQL APIs from resource modeling to an OpenAPI 3.1 contract, with versioning, pagination and RFC 7807 error handling.

    12k GitHub starsUsed in 1 repo~2k tokens
    Backend & APIsAuto-check passed
  • CLI Creator

    huangruiteng/CS-Notes

    Build a composable CLI for Codex from API docs, an OpenAPI spec, existing curl examples, an SDK, a web app, an admin tool, or a local script.

    4k GitHub starsUsed in 2 repos~2.7k tokens
    Backend & APIsAuto-check passed

More from ballerina-platform/ballerina-library

  • Generate Connector Docs

    ballerina-platform/ballerina-library

    Generate the full WSO2 Integrator connector documentation set — overview, setup guide, action reference, and a validated example guide with six low-code UI screenshots and a preserved sample project…

    141 GitHub stars~4.3k tokensUpdated today
    Auto-check passed
  • Making Graalvm Compatible

    ballerina-platform/ballerina-library

    Makes a Ballerina library GraalVM-compatible by running the native build/test workflow, sourcing reachability metadata, and marking the package compatible.

    141 GitHub stars~3k tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about Generating Connectors

What does Generating Connectors do?

Generates a complete Ballerina connector from an OpenAPI specification. Generating Connectors is an agent skill from ballerina-platform/ballerina-library. Generates a complete Ballerina connector from an OpenAPI specification.

When should I use Generating Connectors?

Generating Connectors fits situations like: the user wants to create; build a Ballerina connector from an OpenAPI; run the connector creation pipeline; generate a Ballerina client from an API spec.

How do I install Generating Connectors in Claude Code?

Run `npx skills add ballerina-platform/ballerina-library --skill generating-connectors -a claude-code`. Or copy the skill folder (agent-skills/skills/generating-connectors in ballerina-platform/ballerina-library) into .claude/skills/generating-connectors in your project. Claude Code loads it when a task matches its description.

How do I install Generating Connectors in Codex?

Run `npx skills add ballerina-platform/ballerina-library --skill generating-connectors -a codex`. Or copy the skill folder (agent-skills/skills/generating-connectors in ballerina-platform/ballerina-library) into .agents/skills/generating-connectors in your project. Codex loads it when a task matches its description.

Can I use Generating Connectors in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ballerina-platform/ballerina-library --skill generating-connectors -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/generating-connectors, .gemini/skills/generating-connectors, .github/skills/generating-connectors and .opencode/skills/generating-connectors in your project.

What does Generating Connectors need to run?

Going by SKILL.md and its folder, Generating Connectors needs Python and a shell for the scripts in its folder. Our summary lists: Python 3; A Bash shell.

Does Generating Connectors access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Generating Connectors safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Generating Connectors use?

Generating Connectors is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Generating Connectors use?

About 2.6k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.1k tokens, read only when the agent opens those files.

What are the alternatives to Generating Connectors?

Skills that share tags, products or a category with Generating Connectors: ToolJet Marketplace Plugin Builder (ToolJet/ToolJet, 41k stars), Step Parts (earthtojake/text-to-cad, 19k stars), OpenAPI to MCP Server (mcp-use/mcp-use, 11k stars) and Use Yaak (mountain-loop/yaak, 19k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Generating Connectors?

ballerina-platform (a GitHub organization) maintains it in ballerina-platform/ballerina-library, which has 141 GitHub stars. The repository holds 3 skills in this directory. The repository was last updated on October 9, 2026.

Source: ballerina-platform/ballerina-library on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.