Ballerina logo

Ballerina

Organization
ballerina-platform
ballerina

Writes, runs, tests, debugs, and deploys Ballerina programs and integrations. Use when the user asks to write, create, implement, update, or fix Ballerina code; create or set up a new Ballerina project or package; build an HTTP service, API, GraphQL service, or integration in Ballerina; run, test, or build a Ballerina project; add a library or dependency; debug, diagnose, or explain a Ballerina compile error, runtime panic, stack trace, or failing integration; work with a .bal file, Ballerina.toml, Dependencies.toml, or Config.toml; run a bal command; generate Ballerina code from an OpenAPI or proto specification; deploy a Ballerina service to Docker, Kubernetes, or a GraalVM native image; or when the user does not have Ballerina installed and needs help setting it up.

Overview

Publisherballerina-platform
Repositoryskills
Skill nameballerina
Stars
28
Forks
4
Bundled files
23
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 23 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by ballerina-platform on GitHub. Read the source before you install it.

Installation

Install the Ballerina AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/ballerina-platform/skills/tree/main/skills/ballerina
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ballerina-platform/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/skills/ballerina .claude/skills/ballerina
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Ballerina in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Ballerina on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Ballerina is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Creating a New Project

When the user asks to create a new project, service, or program from scratch:

bash
bal new <project-name>   # scaffolds main.bal + Ballerina.toml
cd <project-name>
  • Read the generated Ballerina.toml to understand the package (name, org, version)
  • For a workspace (multiple packages in one repo), see code-rules.md and the workspace rules it routes to

Writing Ballerina Code

Step 1 — Read existing code and plan file layout: Read .bal files and Ballerina.toml to understand the project and its existing layout. Place new code in the file that fits its concern rather than everything in main.bal (see code-rules.md for file organization).

Step 2 — Discover libraries if needed: If the task needs an external connector or library you don't know, invoke the library agent — give it the full task (including auth and trigger/event details) so its first summary already covers the client or listener constructor and the auth/connection config you'll need. Add the returned import to your .bal file; bal build resolves the dependency from Central. Trust the summary's API shapes — don't bal pull or read package source to double-check them; if a detail is genuinely missing, ask the library agent rather than guessing.

  • Need several libraries? Invoke the library agent for each in parallel (multiple agent calls in one step, or run them in the background) — the lookups are independent. Meanwhile keep doing other independent work (scaffold the project, read existing .bal files, plan the file layout), and fold in each summary as it returns. Don't block on one lookup before starting the next.
  • When both a ballerinax/* connector (with its own listener) and a standalone trigger.* package cover the same events, always prefer the connector — trigger.* packages are being superseded (don't judge by modified date).
  • No library agent available? Use bal directly: bal search <keyword>, then bal pull <org/name> and read its sources under ~/.ballerina/repositories/central.ballerina.io/bala/<org>/<name>/<version>/<platform>/modules/<name>/ — glob both <version> and <platform> (any for pure-Ballerina packages, otherwise a JDK target such as java21, java17 or java11), and grep for the symbol rather than assuming a filename.

Step 3 — Write the code: Strictly follow the rules in code-rules.md — check your code against them as you write. That file covers every Ballerina program and ends with a table routing to domain rules (rules/http.md, rules/messaging.md, rules/sql.md, rules/workspace.md, rules/tests.md); read the ones your task touches before writing that part, and only those. If the Ballerina language server (LSP) is available, use it while writing — hover to confirm a symbol's type/signature, goToDefinition/goToImplementation to inspect an API's real shape, documentSymbol/workspaceSymbol to locate declarations. It provides navigation/intelligence; bal build in Step 4 is the error check. Key rules:

  • Use records for all data — never json or map<json> directly
  • Descriptive identifiers — no single letters or bare abbreviations; two-word camelCase is the norm
  • Named arguments for every function/method call

Step 4 — Validate: Run bal build. Fix every error before moving on. Repeat until clean. If an error is about a library's own API (wrong method, listener, or service signature), re-consult the library agent's API summary — or ask it for the specific detail you're missing — rather than re-guessing.

For langlib API quick reference: langlib-reference.md

Running and Testing

  • Test request → bal test; otherwise → bal run
  • Always run bal build first — if errors, stop and report each one with file and line number
  • A service started with bal run does not exit on its own — stop it when done
  • On test: fix failures and re-run until clean

When the program needs a broker, database, or other server, see rules/integration-testing.md before calling the work done.

Ballerina Not Installed

If a bal command fails because Ballerina is not installed, read setup.md for installation instructions.

Errors and Unexpected Behavior

When bal build reports an error, a program panics at runtime, or behavior is unexpected, read troubleshooting/index.md to find the matching topic file. Do not preload every troubleshooting file — the index is a router that points to the one relevant file for the symptom.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Ballerina AI skill do?

Writes, runs, tests, debugs, and deploys Ballerina programs and integrations. Use when the user asks to write, create, implement, update, or fix Ballerina code; create or set up a new Ballerina project or package; build an HTTP service, API, GraphQL service, or integration in Ballerina; run, test, or build a Ballerina project; add a library or dependency; debug, diagnose, or explain a Ballerina compile error, runtime panic, stack trace, or failing integration; work with a .bal file, Ballerina.toml, Dependencies.toml, or Config.toml; run a bal command; generate Ballerina code from an OpenAPI...

Why use Ballerina on TypingMind?

Because you install it once and use it with any model. Ballerina is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Ballerina in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/ballerina-platform/skills/tree/main/skills/ballerina. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Ballerina?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Ballerina?

As many as you like. As long as a model supports skills, you can use Ballerina with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Ballerina AI skill free?

Yes. It is published on GitHub by ballerina-platform under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇