Author a skill
A skill is one row in the Control Plane plus its child files. You create the skill from its
SKILL.md, then attach the files the instructions refer to:
| Part | Stored as | The agent reaches it with | Example |
|---|---|---|---|
SKILL.md |
The skill row (skill_md_content) |
skills__load |
Inputs, outputs and workflow of affordability-check |
| Scripts | agent_skill_scripts |
skills__run_script (output only) |
affordability.py |
| Resources | agent_skill_resources |
skills__read_resource |
policy.md |
| Templates and assets | agent_skill_assets |
skills__render_template |
report.html |
In the Admin UI this is AI Estate → Resources → Skills → Configuration → New Skill. The skill panel has one tab per part: Basic Info, Metadata & Tags, Access Control, SKILL.md, Resources, Scripts and Assets.

All admin calls on this page go to the Control Plane (:5050) with an admin token from
POST /v1/admin-users/tenant/login:
ADMIN_TOKEN=$(curl -s -X POST http://localhost:5050/v1/admin-users/tenant/login \ -H "Content-Type: application/json" \ -d '{"username": "admin", "password": "Admin123!", "tenant_id": "default"}' | jq -r .access_token)Write the SKILL.md
Section titled “Write the SKILL.md”SKILL.md follows the agentskills.io layout: YAML frontmatter,
then Markdown instructions written for the model. This is the demo skill’s file, shortened:
---name: affordability-checkdescription: Deterministic affordability assessment for a consumer loan application. Computes the annuity installment, debt-to-income ratios and disposable income, and classifies the application as comfortable, tight or unaffordable under the Borealis affordability policy.version: 1.0.0tags: [credit, affordability, policy, deterministic, borealis-demo]---
# Affordability Check
## Inputs
Pass these as the `args` of `skills__run_script`. The runner delivers them tothe script as `{"input_params": {...}}` on stdin.
| Field | Type | Required | Meaning ||---|---|---|---|| `monthly_income_eur` | number | yes | Net monthly income || `requested_amount_eur` | number | yes | Loan principal requested || `term_months` | integer | yes | Repayment term in months |
## Workflow
1. Run [affordability.py](scripts/affordability.py) with the inputs above.2. Read `affordability_class` from its output and carry it into the decision.3. Consult [policy.md](references/policy.md) if you need to explain a result.Write it so it stays portable: say “run affordability.py”, not “call skills__run_script”.
When an agent loads the skill, the gateway prepends a protocol preamble that maps “run a
script” to skills__run_script and “read a file” to skills__read_resource
(what skills__load returns). The model uses the
manifest names, not the link paths, so scripts/affordability.py in the Markdown and
affordability.py in the manifest is fine.
The fields the create call validates:
| Field | Rule | Example |
|---|---|---|
name |
2 to 64 characters, lowercase a-z, digits and hyphens, starts with a letter, ends with a letter or digit |
affordability-check |
description |
1 to 1024 characters. This is what L1 discovery shows (trimmed to 240 characters in the initialize catalog) |
Deterministic affordability assessment for a consumer loan application (...) |
skill_md_content |
Not empty, at most 500,000 characters. The spec recommends under 5,000 tokens | The whole file, frontmatter included |
version |
major.minor.patch (default 1.0.0). name + version is unique per tenant |
1.0.0 |
disclosure_mode |
progressive (default and the supported path), execute or both (legacy) |
progressive |
group_ids |
Resource groups to assign. Empty or omitted assigns none | ["group-01M61N376V2RR6J2TV7Q7EVRET"] |
allow_local_export |
Lets group members download the bundle (default false) |
false |
license |
Optional, at most 100 characters | Apache-2.0 |
compatibility |
Optional list of compatible agent identifiers | ["claude-code"] |
allowed_tools |
Optional list of tool names. Returned only by the deprecated REST execute | ["crm__get_account"] |
metadata |
Optional gateway extensions, see below | {"category": "credit", "tags": ["policy"]} |
Create the skill
Section titled “Create the skill”curl -s -X POST http://localhost:5050/v1/admin/agent-skills \ -H "Authorization: Bearer $ADMIN_TOKEN" -H "Content-Type: application/json" \ -d "$(jq -n --rawfile md SKILL.md '{ name: "affordability-check", description: "Deterministic affordability assessment for a consumer loan application (annuity installment, DTI, disposable income; comfortable / tight / unaffordable).", skill_md_content: $md, version: "1.0.0" }')"import pathlib, httpx
cp = httpx.Client(base_url="http://localhost:5050", headers={"Authorization": f"Bearer {ADMIN_TOKEN}"})r = cp.post("/v1/admin/agent-skills", json={ "name": "affordability-check", "description": "Deterministic affordability assessment for a consumer loan application " "(annuity installment, DTI, disposable income; comfortable / tight / unaffordable).", "skill_md_content": pathlib.Path("SKILL.md").read_text(), "version": "1.0.0",})r.raise_for_status()skill_id = r.json()["skill"]["id"] # skill-01M61N3A7RB6CWZ8CM8PCEP4SNimport { readFile } from "node:fs/promises";
const r = await fetch("http://localhost:5050/v1/admin/agent-skills", { method: "POST", headers: { Authorization: `Bearer ${ADMIN_TOKEN}`, "Content-Type": "application/json" }, body: JSON.stringify({ name: "affordability-check", description: "Deterministic affordability assessment for a consumer loan application " + "(annuity installment, DTI, disposable income; comfortable / tight / unaffordable).", skill_md_content: await readFile("SKILL.md", "utf8"), version: "1.0.0", }),});const skillId = (await r.json()).skill.id;201 Created. The skill starts in draft:
{ "skill": { "id": "skill-01M61N3A7RB6CWZ8CM8PCEP4SN", "tenant_id": "default", "name": "affordability-check", "description": "Deterministic affordability assessment for a consumer loan application (annuity installment, DTI, disposable income; comfortable / tight / unaffordable).", "version": "1.0.0", "status": "draft", "enabled": true, "allow_local_export": false, "disclosure_mode": "progressive", "metadata": null, "skill_md_content": "---\nname: affordability-check\n...", "skill_md_hash": "d5f232e70787452441247d374c5f551bfcaff57c425e90b06b900de7ae0d974c", "validation_errors": null, "execution_count": 0, "group_ids": [], "groups": [], "created_by": "admin", "created_at": "2026-10-28T16:22:09.400146+00:00" }, "auto_bound_server_group_ids": []}A second skill with the same name and version is refused with 400.
Metadata
Section titled “Metadata”metadata is a free-form object. The gateway reads these keys from it:
| Key | Effect | Example |
|---|---|---|
approval_required |
Every run of this skill is parked for approval (see execution modes). Shown in the portal as “Approval required” | true |
category |
Filter in the catalog and the Admin UI | "credit" |
tags |
Filter in the catalog | ["policy", "deterministic"] |
icon_name |
A Lucide icon name for the Admin UI | "calculator" |
cost_estimate_usd |
Shown in the catalog and the portal (“~$0.05/run”) | 0.05 |
rate_limit_tier |
standard, premium or enterprise, informational |
"standard" |
required_mcp_servers, required_llm_models |
Informational dependency lists | ["crm-server"] |
Add scripts
Section titled “Add scripts”A script is one file the agent can run with skills__run_script. It runs in the
skill runner, never in the gateway and never on the agent’s machine.
curl -s -X POST http://localhost:5050/v1/admin/agent-skills/$SKILL_ID/scripts \ -H "Authorization: Bearer $ADMIN_TOKEN" -H "Content-Type: application/json" \ -d "$(jq -n --rawfile src scripts/affordability.py '{ filename: "affordability.py", language: "python", execution_mode: "sandbox", description: "Borealis affordability policy (stdlib only).", script_content: $src, args_schema: { type: "object", required: ["monthly_income_eur", "monthly_expenses_eur", "existing_debt_monthly_eur", "requested_amount_eur", "term_months"], properties: { monthly_income_eur: {type: "number"}, monthly_expenses_eur: {type: "number"}, existing_debt_monthly_eur: {type: "number"}, requested_amount_eur: {type: "number"}, term_months: {type: "integer"}, annual_rate_pct: {type: "number"} } } }')"r = cp.post(f"/v1/admin/agent-skills/{skill_id}/scripts", json={ "filename": "affordability.py", "language": "python", "execution_mode": "sandbox", "description": "Borealis affordability policy (stdlib only).", "script_content": pathlib.Path("scripts/affordability.py").read_text(), "args_schema": {"type": "object", "properties": {"monthly_income_eur": {"type": "number"}, "term_months": {"type": "integer"}}},})await fetch(`http://localhost:5050/v1/admin/agent-skills/${skillId}/scripts`, { method: "POST", headers: { Authorization: `Bearer ${ADMIN_TOKEN}`, "Content-Type": "application/json" }, body: JSON.stringify({ filename: "affordability.py", language: "python", execution_mode: "sandbox", description: "Borealis affordability policy (stdlib only).", script_content: await readFile("scripts/affordability.py", "utf8"), }),});201 Created:
{ "script": { "id": "ass-01M61N3A9YW9BR6ACNKTK9AN2G", "skill_id": "skill-01M61N3A7RB6CWZ8CM8PCEP4SN", "filename": "affordability.py", "description": "Borealis affordability policy (stdlib only).", "language": "python", "execution_mode": "sandbox", "script_hash": "9c1f...", "args_schema": {"type": "object", "properties": {"...": "..."}}, "script_content": "#!/usr/bin/env python3\n...", "approved_by": null, "approved_at": null }}| Field | Values | Example |
|---|---|---|
filename |
1 to 255 characters, unique within the skill. Use a bare name, see the caution below | affordability.py |
language |
python (python3), javascript (node), typescript (tsx), bash (bash). Default python |
python |
execution_mode |
sandbox (default), trusted, disabled. See the sandbox |
sandbox |
args_schema |
JSON Schema for the script’s args. It is published in the manifest so the model knows what to pass |
{"type": "object", "properties": {...}} |
description |
Up to 1024 characters, shown in the manifest | Borealis affordability policy (stdlib only). |
script_content |
The source, up to 5,000,000 characters |
The script contract
Section titled “The script contract”The runner gives the script its args in two places, as the same JSON object:
- on stdin:
{"input_params": {"monthly_income_eur": 2400.0, "term_months": 72}} - in the
SKILL_INPUTenvironment variable, with the same value
Whatever the script prints on stdout, trimmed, is the tool result the agent gets. A
non-zero exit makes the result an error (isError: true) whose text is the runner’s error
or the script’s stderr. Read the input defensively and print exactly one result:
import json, os, sys
def _read_input(): raw = sys.stdin.read() if not sys.stdin.isatty() else "" if not raw.strip(): raw = os.environ.get("SKILL_INPUT", "") payload = json.loads(raw) if raw.strip() else {} return payload.get("input_params", payload) if isinstance(payload, dict) else {}
def main(): try: result = assess(_read_input()) except (ValueError, json.JSONDecodeError) as exc: result = {"error": str(exc), "policy_version": POLICY_VERSION} sys.stdout.write(json.dumps(result, sort_keys=True) + "\n") return 0The demo script always exits 0 and reports bad input as {"error": ...} so the agent reads
“could not assess” as data, never as “affordable”. The working directory is the run’s
session workspace: the skill’s resources and
assets are copied in by name, so open("policy.md") works, and files a script writes are
there for the next script in the same session.
Add resources
Section titled “Add resources”Resources are reference files the instructions point at: documentation, forms, schemas,
examples. The agent reads them with skills__read_resource.
curl -s -X POST http://localhost:5050/v1/admin/agent-skills/$SKILL_ID/resources \ -H "Authorization: Bearer $ADMIN_TOKEN" -H "Content-Type: application/json" \ -d "$(jq -n --rawfile c references/policy.md '{ filename: "policy.md", resource_type: "reference", mime_type: "text/markdown", content: $c}')"{ "resource": { "id": "asr-01M61N3AC75NHAC8AN4QVV4V2Q", "skill_id": "skill-01M61N3A7RB6CWZ8CM8PCEP4SN", "filename": "policy.md", "resource_type": "reference", "content_hash": "3b0e...", "mime_type": "text/markdown", "size_bytes": 3636, "content": "# Borealis Consumer Finance AB: Affordability Policy\n..." }}| Field | Values | Example |
|---|---|---|
filename |
1 to 255 characters, unique within the skill | policy.md |
resource_type |
reference (default), form, schema, template, example, asset |
reference |
content |
Text, up to 5,000,000 characters | |
mime_type |
Returned to the model as mimeType |
text/markdown |
Add templates and assets
Section titled “Add templates and assets”Assets are files the agent renders with skills__render_template, or data a script reads
from its workspace. Rendering substitutes {{name}} and {{ name }} with the call’s vars;
string values are inserted verbatim, other values as JSON, and unknown placeholders stay
as they are.
curl -s -X POST http://localhost:5050/v1/admin/agent-skills/$SKILL_ID/assets \ -H "Authorization: Bearer $ADMIN_TOKEN" -H "Content-Type: application/json" \ -d '{"filename": "summary.md", "asset_type": "template", "mime_type": "text/markdown", "description": "Underwriter summary of one assessment.", "content": "Application {{application_id}}: **{{affordability_class}}** (DTI after {{dti_after}}).", "vars_schema": {"type": "object", "properties": { "application_id": {"type": "string"}, "affordability_class": {"type": "string"}, "dti_after": {"type": "number"}}}}'{ "asset": { "id": "asa-01M61P0Q8C3Z1Y5W7V9T2R4N6K", "skill_id": "skill-01M61N3A7RB6CWZ8CM8PCEP4SN", "filename": "summary.md", "description": "Underwriter summary of one assessment.", "asset_type": "template", "mime_type": "text/markdown", "encoding": "utf-8", "vars_schema": {"type": "object", "properties": {"...": "..."}}, "content": "Application {{application_id}}: **{{affordability_class}}** (DTI after {{dti_after}})." }}| Field | Values | Example |
|---|---|---|
asset_type |
template, image, data (default) |
template |
content |
Text, or base64 for binary (up to 10,000,000 characters) | |
encoding |
utf-8 (default) or base64 |
utf-8 |
vars_schema |
JSON Schema for the vars, published in the manifest |
{"type": "object", ...} |
Check what the agent will see
Section titled “Check what the agent will see”The manifest is the L3 allowlist. It is built from the child rows: scripts in disabled
mode are left out, and anything not listed cannot be read, run or rendered.
curl -s http://localhost:5050/v1/admin/agent-skills/$SKILL_ID/manifest \ -H "Authorization: Bearer $ADMIN_TOKEN"{ "skill_id": "skill-01M61N3A7RB6CWZ8CM8PCEP4SN", "name": "affordability-check", "version": "1.0.0", "disclosure_mode": "progressive", "manifest": { "resources": [ {"path": "policy.md", "kind": "reference", "mime": "text/markdown", "bytes": 3636} ], "scripts": [ {"name": "affordability.py", "language": "python", "execution_mode": "sandbox", "args_schema": null, "description": "Borealis affordability policy (stdlib only)."} ], "templates": [] }}That is the live manifest of the demo skill: it was provisioned without an args_schema,
so the model takes the inputs from the SKILL.md table instead.
Next: validate and publish it.

