agent-builder

agent-builder is a skill for Claude Code, Codex from ballerina-platform/ballerina-vscode. It costs 0 tokens per session (5,961 once invoked), scanned A, original, Apache-2.0.

A guide for writing Ballerina code that defines AI agents, their instructions, tools, subagents, and triggers. Ballerina is a programming language designed for networked applications and services.

In plain words
What is it for?
It helps build agents, add tools, require human approval for tool use, connect subagents, and expose agents through chat or messaging services.
Why use it?
It prevents agent code from compiling while still being unreadable to the product's visual agent editor. It explains the required source layout and naming patterns so the editor can represent the agent correctly.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents.

Good fit It helps build agents, add tools, require human approval for tool use, connect subagents, and expose agents through chat or messaging services.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ballerina-platform/ballerina-vscode/agent-builder
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add ballerina-platform/ballerina-vscode --skill agent-builder
Clone the repo
git clone --depth 1 https://github.com/ballerina-platform/ballerina-vscode

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for agent-builder

README.md
[![agentmods](https://agentmods.dev/badge/skills/ballerina-platform/ballerina-vscode/agent-builder/github.svg)](https://agentmods.dev/skills/ballerina-platform/ballerina-vscode/agent-builder)
Your own site
<a href="https://agentmods.dev/skills/ballerina-platform/ballerina-vscode/agent-builder"><img src="https://agentmods.dev/badge/skills/ballerina-platform/ballerina-vscode/agent-builder/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for agent-builder

Your own site · 80×15
<a href="https://agentmods.dev/skills/ballerina-platform/ballerina-vscode/agent-builder"><img src="https://agentmods.dev/badge/skills/ballerina-platform/ballerina-vscode/agent-builder.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,961 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.05961
Opus 5.5 $0.00000 $0.02384
Sonnet 5.5 $0.00000 $0.01192
Haiku 4.5 $0.00000 $0.00596

Measured today against content hash 7abae1e0789e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

agent-builder scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

and they have to test it with another client, such as curl.
packages/ballerina-extension/src/features/ai/agent/skills/agent-builder/SKILL.md · 516 lines

How it starts

The opening of the file, as written. The whole thing — 516 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Agent Builder

The agent diagram is not generated from a model, it is parsed directly out of the source you write. Code that compiles but does not match the shapes below still renders as an incomplete or empty agent, and the user cannot then edit it from the low-code side. Follow every rule.

<...> marks a placeholder to substitute from the user's request. Never emit it literally.

Derive identifiers from the agent's purpose in camelCase, and keep the family consistent: <agent>Agent, <agent>Model, <agent>Listener. Service paths are the exception, they are kebab-case, written <agent-name>.

System prompt: always inline

The system prompt MUST be an inline mapping constructor in the ai:Agent construction. A prompt assigned to a separate variable and referenced by name is not read at all, the agent card renders with no role and no instructions.

Both role and instructions MUST use the string backtick template so multi-line text survives a round trip.

Correct:

final ai:Agent <agent>Agent = check new (
    systemPrompt = {
        role: string `<short role name>`,
        instructions: string `<first line of instructions>
<continuation line, starting at column 0>
<continuation line, starting at column 0>`
    }, model = <agent>Model, tools = [<toolName>, <toolName>]
);

Do not indent the continuation lines of instructions to match the surrounding code, the leading whitespace is part of the string and is shown to the user in the prompt editor. Start every continuation line at column 0, as above.

Model provider: declare the concrete type

Every ai component is identified in the diagram by its declared type, so always declare the concrete class. An abstract type renders as an unresolved node.

final ai:Wso2ModelProvider <agent>Model = check ai:getDefaultModelProvider();

ai:Wso2ModelProvider not ai:ModelProvider; ai:Wso2EmbeddingProvider not ai:EmbeddingProvider; ai:InMemoryVectorStore not ai:VectorStore. When the user names a provider (OpenAI, Azure, Anthropic, Ollama, …) declare that provider's own class, same rule.

Read the full file on GitHub · 516 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today Changed · +8 lines 7abae1e0789e
  2. 3d ago First seen · 508 lines · 0 tokens per session scan A 6e11288cc99a

Subscribe to this mod's changes

agent-builder is a skill published in the GitHub repository ballerina-platform/ballerina-vscode (49 stars, last pushed today), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 5,961 tokens. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-26.

Related

Other skills, from other repositories

omh-rust

This is an OMH rust workflow skill, projected for Agent Skills hosts (Claude Code, Codex, Cursor, opencode, OpenClaw, pi).

rlaope/oh-my-hermes · 74 tokens

erlang-otp-behaviors

Use when oTP behaviors including genserver for stateful processes, genstatem for state machines, supervisors for fault tolerance, genevent for event handling, and building robust, production-ready Erlang applications with proven patterns.

benchflow-ai/skillsbench · 52 tokens

axiom-concurrency

Use when writing ANY async code, actors, or threads in an Apple-platform app, or seeing ANY concurrency error. Covers Swift 6 concurrency, @MainActor, Sendable, data races, async/await patterns.

CharlesWiltgen/Axiom · 49 tokens

haskell-pro

Expert Haskell engineer specializing in advanced type systems, pure functional design, and high-reliability software. Use PROACTIVELY for type-level programming, concurrency, and architecture guidance.

rmyndharis/antigravity-skills · 41 tokens

splitting-oversized-modules

Split an oversized Python module (a thousand-plus-line logic.py, models.py, api.py, or its test file) into a package of one module per concern, mechanically and provably without changing behavior. Use on a request to split / break up / decompose a god module or move functions out of one, once a human has agreed to…

PostHog/posthog · 197 tokens

migrate-better-result-3

Migrate a TypeScript codebase from better-result 2.x to 3.0. Use when upgrading better-result across the TaggedError syntax, removed Result serialization helpers, recovery inference, matching, or retry APIs.

dmmulroy/better-result · 52 tokens