AL API development patterns for Business Central. An agent skill from javiarmesto/ALDC-AL-Development-Collection.

MITAuto-check passedBackend & APIs

Install Skill API

skills CLI
$ npx skills add javiarmesto/ALDC-AL-Development-Collection --skill skill-api -a claude-code

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

GitHub CLI
$ gh skill install javiarmesto/ALDC-AL-Development-Collection skill-api --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/javiarmesto/ALDC-AL-Development-Collection.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/skill-api .claude/skills/skill-api && 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
skill-api
GitHub stars
109
Token cost
~3.5k tokens
SKILL.md length
684 words
Files
2 (incl. references)
Skills in repo
14
Repo updated
First seen
Licence
MIT

At a glance

AL API development patterns for Business Central. An agent skill from javiarmesto/ALDC-AL-Development-Collection.

  • Works in 5 steps: Design API Contract → Implement API Pages → Optimize for Performance → …
  • Creating OData/REST API pages
  • SKILL.md covers Purpose, When to Load, Core Patterns and XML Documentation for Public…, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Skill API is an agent skill from javiarmesto/ALDC-AL-Development-Collection. AL API development patterns for Business Central. Use when creating OData/REST API pages, HttpClient integrations, webhook implementations, or any external system integration via API.

Its SKILL.md is about 3.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/api-advanced-patterns.md`).

It sits in Backend & APIs, covering Webhooks and REST APIs. The repository describes itself as: AL development toolkit for Business Central with specialist agents, skills and review workflows for Copilot, Claude Code and Codex. The licence is MIT.

When your agent uses it

  • Creating OData/REST API pages
  • HttpClient integrations
  • Webhook implementations
  • Any external system integration via API

Example prompts

  • “/skill-api”

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Design API Contract
  2. Implement API Pages
  3. Optimize for Performance
  4. Generate Permission Sets
  5. Test

What it can do on your machine

Read from SKILL.md and the folder at commit 161c3e3. 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

    No scripts in the folder and no shell commands in SKILL.md (its code samples are al and http).

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

  • Network

    Links to these hosts (documentation or services it may open):

    • learn.microsoft.com

    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

Skill API loads about 3.5k tokens when it runs, and up to ~4.6k if it reads all its reference files. Until then it costs about 48 tokens; SKILL.md has 684 words of instructions outside code blocks.

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

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); files beside SKILL.md are not scanned.

SKILL.md

The full file from javiarmesto/ALDC-AL-Development-Collection at commit 161c3e3, republished under its MIT licence (© javiarmesto). 684 words, ~3,489 tokens.

Download SKILL.mdSave it as .claude/skills/skill-api/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
skill-api
description
AL API development patterns for Business Central. Use when creating OData/REST API pages, HttpClient integrations, webhook implementations, or any external system integration via API.

Skill: AL API Development

Purpose

Design and implement RESTful API pages for Business Central: API page v2.0 patterns, OData conventions, versioning, bound/unbound actions, webhooks, header-lines navigation, and performance-optimized endpoints.

When to Load

This skill should be loaded when:

  • A new API page (PageType = API) needs to be designed or implemented
  • Existing BC data must be exposed to external consumers (Power Platform, mobile apps, 3rd-party)
  • Custom bound or unbound actions are needed on API endpoints
  • An API versioning strategy or deprecation plan is required
  • Webhook subscriptions need to be configured for change notifications
  • API performance or filtering needs optimization

Core Patterns

Pattern 1: API Page v2.0 (Standard CRUD Endpoint)
al
page 50100 "Contoso Sales Orders API"
{
    APIVersion = 'v2.0';
    APIPublisher = 'contoso';
    APIGroup = 'sales';

    EntityCaption = 'Sales Order';
    EntitySetCaption = 'Sales Orders';
    EntityName = 'salesOrder';               // singular — used in URL for single entity
    EntitySetName = 'salesOrders';           // plural — used in URL for collection

    PageType = API;
    SourceTable = "Sales Header";
    SourceTableView = where("Document Type" = const(Order));
    DelayedInsert = true;                    // required — defers insert until all fields set
    ODataKeyFields = SystemId;               // required — use SystemId for stable GUIDs

    layout
    {
        area(Content)
        {
            repeater(Group)
            {
                field(id; Rec.SystemId)
                {
                    Caption = 'Id';
                    Editable = false;
                }
                field(number; Rec."No.")
                {
                    Caption = 'Number';
                    Editable = false;
                }
                field(orderDate; Rec."Order Date")
                {
                    Caption = 'Order Date';
                }
                field(customerNumber; Rec."Sell-to Customer No.")
                {
                    Caption = 'Customer Number';
                }
                field(customerName; Rec."Sell-to Customer Name")
                {
                    Caption = 'Customer Name';
                    Editable = false;
                }
                field(totalAmountIncludingVAT; Rec."Amount Including VAT")
                {
                    Caption = 'Total Amount Including VAT';
                    Editable = false;
                }
                field(status; Rec.Status)
                {
                    Caption = 'Status';
                    Editable = false;
                }
                field(lastModifiedDateTime; Rec.SystemModifiedAt)
                {
                    Caption = 'Last Modified Date Time';
                    Editable = false;
                }
            }
        }
    }
}

Resulting endpoint:

GET  /api/contoso/sales/v2.0/companies({companyId})/salesOrders
GET  /api/contoso/sales/v2.0/companies({companyId})/salesOrders({id})
POST /api/contoso/sales/v2.0/companies({companyId})/salesOrders
PATCH /api/contoso/sales/v2.0/companies({companyId})/salesOrders({id})
DELETE /api/contoso/sales/v2.0/companies({companyId})/salesOrders({id})

Property rules:

  • ODataKeyFields = SystemId — always use SystemId for stable, immutable keys
  • DelayedInsert = true — mandatory on API pages (lets BC set defaults before committing)
  • SourceTableView — pre-filter the source if the table serves multiple document types
  • Field names use camelCase (OData convention): customerNumber, not Customer_Number
  • Editable = false on computed/system fields to prevent consumer confusion
Pattern 2: Header-Lines with Navigation Property

Expose parent-child relationships via part subpages:

al
// Add inside the header API page's repeater:
part(salesOrderLines; "Contoso Sales Order Lines API")
{
    Caption = 'Lines';
    EntityName = 'salesOrderLine';
    EntitySetName = 'salesOrderLines';
    SubPageLink = "Document Type" = field("Document Type"),
                  "Document No." = field("No.");
}
al
// Lines API page (subpage)
page 50101 "Contoso Sales Order Lines API"
{
    APIVersion = 'v2.0';
    APIPublisher = 'contoso';
    APIGroup = 'sales';

    EntityCaption = 'Sales Order Line';
    EntitySetCaption = 'Sales Order Lines';
    EntityName = 'salesOrderLine';
    EntitySetName = 'salesOrderLines';

    PageType = API;
    SourceTable = "Sales Line";
    DelayedInsert = true;
    ODataKeyFields = SystemId;

    layout
    {
        area(Content)
        {
            repeater(Group)
            {
                field(id; Rec.SystemId) { Editable = false; }
                field(lineNumber; Rec."Line No.") { Editable = false; }
                field(lineType; Rec.Type) { Caption = 'Type'; }
                field(itemNumber; Rec."No.") { Caption = 'Item Number'; }
                field(description; Rec.Description) { Caption = 'Description'; }
                field(quantity; Rec.Quantity) { Caption = 'Quantity'; }
                field(unitPrice; Rec."Unit Price") { Caption = 'Unit Price'; }
                field(lineAmount; Rec."Line Amount") { Caption = 'Line Amount'; Editable = false; }
            }
        }
    }
}

Consumer usage:

http
# Get order with lines expanded
GET /salesOrders({id})?$expand=salesOrderLines

# Get lines for a specific order
GET /salesOrders({id})/salesOrderLines

# Add a line to an order
POST /salesOrders({id})/salesOrderLines
{ "lineType": "Item", "itemNumber": "ITEM-001", "quantity": 10 }
Pattern 3: Bound Actions (Operate on Entity)

Bound actions trigger business logic on a specific entity:

al
// Inside the API page's actions area:
actions
{
    area(Processing)
    {
        // POST /salesOrders({id})/Microsoft.NAV.post
        action(post)
        {
            ApplicationArea = All;
            Caption = 'Post';

            trigger OnAction()
            var
                SalesPost: Codeunit "Sales-Post";
            begin
                Rec.TestField(Status, Rec.Status::Released);
                SalesPost.Run(Rec);
            end;
        }

        // POST /salesOrders({id})/Microsoft.NAV.release
        action(release)
        {
            ApplicationArea = All;
            Caption = 'Release';

            trigger OnAction()
            var
                ReleaseSalesDoc: Codeunit "Release Sales Document";
            begin
                ReleaseSalesDoc.PerformManualRelease(Rec);
            end;
        }

        // POST /salesOrders({id})/Microsoft.NAV.reopen
        action(reopen)
        {
            ApplicationArea = All;
            Caption = 'Reopen';

            trigger OnAction()
            var
                ReleaseSalesDoc: Codeunit "Release Sales Document";
            begin
                ReleaseSalesDoc.PerformManualReopen(Rec);
            end;
        }
    }
}

Consumer call:

http
POST /salesOrders({id})/Microsoft.NAV.post
Content-Type: application/json
Pattern 4: Unbound Actions (Standalone Operations)

Unbound actions are not tied to a specific entity — use a virtual/dummy source table:

al
page 50102 "Contoso Utility API"
{
    APIVersion = 'v2.0';
    APIPublisher = 'contoso';
    APIGroup = 'utilities';

    EntityName = 'utilityFunction';
    EntitySetName = 'utilityFunctions';

    PageType = API;
    SourceTable = "Company Information";    // read-only singleton as base
    SourceTableTemporary = true;
    InsertAllowed = false;
    ModifyAllowed = false;
    DeleteAllowed = false;

    layout
    {
        area(Content)
        {
            repeater(Group)
            {
                field(companyName; Rec.Name) { Editable = false; }
            }
        }
    }
    actions
    {
        area(Processing)
        {
            // POST /utilityFunctions/Microsoft.NAV.calculateShipping
            action(calculateShipping)
            {
                ApplicationArea = All;
                Caption = 'Calculate Shipping';

                trigger OnAction()
                var
                    ShippingMgt: Codeunit "Contoso Shipping Management";
                    Weight: Decimal;
                    DestCode: Code[20];
                begin
                    Evaluate(Weight, GetActionContext().GetText('weight'));
                    DestCode := CopyStr(GetActionContext().GetText('destinationCode'), 1, 20);
                    SetActionResponse(CreateJsonResponse(
                        ShippingMgt.CalculateCost(Weight, DestCode)));
                end;
            }
        }
    }
}

When you need versioning/deprecation, webhooks, or trigger-level error handling, load references/api-advanced-patterns.md.

XML Documentation for Public Procedures

Any public procedure that other modules call carries XML doc comments. This covers API pages (above), and equally the library codeunits invoked by API logic or by other codeunits — anything outside the unit's own boundary.

al
/// <summary>
/// Evaluates whether the customer qualifies as VIP based on sales volume
/// and persists the result on Customer."VIP Customer".
/// </summary>
/// <param name="CustomerNo">The customer number to evaluate. Exits silently if blank or not found.</param>
procedure EvaluateCustomer(CustomerNo: Code[20])
begin
    // ...
end;
  • <summary> (required) — what the procedure does and why a caller would invoke it.
  • <param name="..."> (required for each non-trivial parameter) — what value to pass and constraints.
  • <returns> (required when there is a return value) — what the value means.
  • local and internal procedures: doc is optional.

This surface is what IntelliSense presents to consumers and what AL's missing-documentation diagnostics flag.

Workflow

Step 1: Design API Contract

Before implementing, define:

  1. Resource model — entities, relationships, navigation properties
  2. Operations — which HTTP methods per resource (GET/POST/PATCH/DELETE)
  3. Actions — custom operations (bound: per entity, unbound: global)
  4. Filtering — which fields consumers can $filter on (add corresponding keys)
  5. Versioning — initial version and deprecation plan
  6. Authentication — OAuth 2.0 scope, permission sets needed

Document in .github/plans/{req_name}.architecture.md or a dedicated API design section. PAUSE — wait for user approval before implementing.

Show full SKILL.md (285 more words)Show less
Step 2: Implement API Pages
  1. Create header API page (Pattern 1)
  2. Create subpage(s) for lines/children (Pattern 2)
  3. Add bound actions for entity operations (Pattern 3)
  4. Add unbound actions if needed (Pattern 4)
  5. Add error handling triggers (Pattern 7)
  6. Build: al_build
Step 3: Optimize for Performance

Add keys for filterable fields:

al
tableextension 50100 "Contoso Sales Header Ext" extends "Sales Header"
{
    keys
    {
        key(APICustomerDate; "Sell-to Customer No.", "Order Date") { }
        key(APIStatus; Status, "Order Date") { }
    }
}

Key OData query patterns:

  • Projection: ?$select=number,customerNumber — reduces payload
  • Filtering: ?$filter=customerNumber eq 'C00001' and orderDate ge 2025-01-01 — server-side
  • Expansion: ?$expand=salesOrderLines — inline children
  • Delta links: initial GET returns @odata.deltaLink; subsequent call with $deltatoken returns only changes
  • Pagination: ?$top=50&$skip=100
Step 4: Generate Permission Sets

Create role-based permission sets (full access + read-only) for the API pages. Follow skill-permissions.md for the hierarchy pattern. Minimum: one set granting X on all API pages + RIMD on table data, one read-only set with R only.

Step 5: Test
  • Test CRUD operations (create, read, update, delete)
  • Test bound actions (post, release, reopen)
  • Test $filter, $select, $expand query options
  • Test error responses (missing required fields, blocked customer, invalid state)
  • Test permission sets (read-only user cannot POST/PATCH/DELETE)
  • Test If-Match / ETag for optimistic concurrency on PATCH and DELETE

References

Constraints

  • This skill covers API page design, implementation patterns, and OData conventions
  • Do NOT modify base BC objects — create API pages as extensions only
  • Do NOT expose internal implementation details (codeunit internals, temp tables) in API responses
  • Do NOT skip APIVersion — every API page MUST have an explicit version
  • Do NOT create breaking changes on stable versions — use beta for previewing changes, then promote
  • Do NOT skip error handling — OnInsertRecord, OnModifyRecord, OnDeleteRecord must validate
  • Permission set hierarchy → skill-permissions.md | Performance deep-dive → skill-performance.md | API testing → skill-testing.md

© javiarmesto, MIT. 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 1 other file (references) in skills/skill-api of javiarmesto/ALDC-AL-Development-Collection.

  • SKILL.md
  • references/api-advanced-patterns.md

Open the folder on GitHubat commit 161c3e3

Compare with similar skills

Skill API 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.

Skill API compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Skill API this skilljaviarmesto/ALDC-AL-Development-Collection109—~3.5kAutomated safety check: PassMIT
API Patternsdilolabs/nosia2131 repos~2.5kAutomated safety check: PassMIT
Loops APIopeninary/openinary412—~1.1kAutomated safety check: PassAGPL-3.0
Verifygregluffy/HomeLabInfo102—~424Automated safety check: PassGPL-3.0
Frappe Core APIImpertio-Studio/Frappe_Claude_Skill_Package1871 repos~3.2kAutomated safety check: PassMIT
Lemon Squeezy Integrationpockethost/pockethost1.4k—~1.1kAutomated safety check: PassMIT

Similar skills

  • API Patterns

    dilolabs/nosia

    Builds REST APIs using respondto blocks with Jbuilder templates following the 37signals same-controllers-different-formats philosophy.

    213 GitHub starsUsed in 1 repo~2.5k tokens
    Backend & APIsAuto-check passed
  • Loops API

    openinary/openinary

    A skill your agent uses whenever the user wants to integrate Loops from application code, backend services, webhook handlers, or server-side automation.

    412 GitHub stars~1.1k tokensUpdated 3 days ago
    Backend & APIsAuto-check passed
  • Verify

    gregluffy/HomeLabInfo

    Build, run, and drive the HomeLabInfo backend to verify changes at its real surfaces (REST API, UDP DHCP listener, outgoing webhooks).

    102 GitHub stars~424 tokensUpdated 2 mo ago
    Backend & APIsAuto-check passed
  • Frappe Core API

    Impertio-Studio/Frappe_Claude_Skill_Package

    A skill your agent uses when building ERPNext/Frappe API integrations (v14/v15/v16) including REST API, RPC API, authentication, webhooks, and rate limiting.

    187 GitHub starsUsed in 1 repo~3.2k tokens
    Backend & APIsAuto-check passed
  • Lemon Squeezy Integration

    pockethost/pockethost

    Full Lemon Squeezy integration — REST API, @lemonsqueezy/lemonsqueezy.js server SDK, Lemon.js checkout overlays, webhooks, customdata, and subscriptions.

    1.4k GitHub stars~1.1k tokensUpdated 10 days ago
    Backend & APIsAuto-check passed
  • Bigcommerce API

    qdhenry/Claude-Command-Suite

    BigCommerce API expert for building integrations, apps, headless storefronts, and automations.

    1.3k GitHub stars~1.5k tokensUpdated 7 mo ago
    Backend & APIsAuto-check passed

More from javiarmesto/ALDC-AL-Development-Collection

All 14 skills in this repo
  • Skill Agent Instructions

    javiarmesto/ALDC-AL-Development-Collection

    Generate, review, and optimize natural language instructions for Business Central agents (Designer or SDK).

    109 GitHub stars~2.8k tokensUpdated yesterday
    Auto-check passed
  • Skill Copilot

    javiarmesto/ALDC-AL-Development-Collection

    AL Copilot capability development for Business Central. An agent skill from javiarmesto/ALDC-AL-Development-Collection.

    109 GitHub stars~3.5k tokensUpdated yesterday
    Auto-check passed
  • Skill Migrate

    javiarmesto/ALDC-AL-Development-Collection

    AL version migration for Business Central. An agent skill from javiarmesto/ALDC-AL-Development-Collection.

    109 GitHub stars~3k tokensUpdated yesterday
    Auto-check passed
  • Skill Agent Task Patterns

    javiarmesto/ALDC-AL-Development-Collection

    Agent SDK task integration patterns for Business Central. An agent skill from javiarmesto/ALDC-AL-Development-Collection.

    109 GitHub stars~4.2k tokensUpdated yesterday
    Auto-check passed
  • Skill Agent Toolkit

    javiarmesto/ALDC-AL-Development-Collection

    Build, configure, and integrate Business Central agents using the AI Development Toolkit and Agent SDK.

    109 GitHub stars~4.4k tokensUpdated yesterday
    Auto-check passed
  • Skill Debug

    javiarmesto/ALDC-AL-Development-Collection

    AL debugging and diagnostics for Business Central. An agent skill from javiarmesto/ALDC-AL-Development-Collection.

    109 GitHub stars~2.5k tokensUpdated yesterday
    Auto-check passed

Categories

Questions about Skill API

What does Skill API do?

AL API development patterns for Business Central. An agent skill from javiarmesto/ALDC-AL-Development-Collection. Skill API is an agent skill from javiarmesto/ALDC-AL-Development-Collection. AL API development patterns for Business Central.

When should I use Skill API?

Skill API fits situations like: creating OData/REST API pages; httpClient integrations; webhook implementations; any external system integration via API.

How do I install Skill API in Claude Code?

Run `npx skills add javiarmesto/ALDC-AL-Development-Collection --skill skill-api -a claude-code`. Or copy the skill folder (skills/skill-api in javiarmesto/ALDC-AL-Development-Collection) into .claude/skills/skill-api in your project. Claude Code loads it when a task matches its description.

How do I install Skill API in Codex?

Run `npx skills add javiarmesto/ALDC-AL-Development-Collection --skill skill-api -a codex`. Or copy the skill folder (skills/skill-api in javiarmesto/ALDC-AL-Development-Collection) into .agents/skills/skill-api in your project. Codex loads it when a task matches its description.

Can I use Skill API 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 javiarmesto/ALDC-AL-Development-Collection --skill skill-api -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/skill-api, .gemini/skills/skill-api, .github/skills/skill-api and .opencode/skills/skill-api in your project.

What does Skill API need to run?

SKILL.md names no scripts, command-line tools or credentials: Skill API is instructions for the agent only.

Does Skill API access the network?

SKILL.md names 1 domain. As links in the text: learn.microsoft.com. This is read from the text; nothing was executed.

Is Skill API 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. Review the folder before installing.

What licence does Skill API use?

Skill API is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Skill API use?

About 3.5k tokens (SKILL.md is roughly 14k 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 1.1k tokens, read only when the agent opens those files.

What are the alternatives to Skill API?

Skills that share tags, products or a category with Skill API: API Patterns (dilolabs/nosia, 213 stars), Loops API (openinary/openinary, 412 stars), Verify (gregluffy/HomeLabInfo, 102 stars) and Frappe Core API (Impertio-Studio/Frappe_Claude_Skill_Package, 187 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Skill API?

javiarmesto (a GitHub user) maintains it in javiarmesto/ALDC-AL-Development-Collection, which has 109 GitHub stars. The repository holds 14 skills in this directory. The repository was last updated on October 6, 2026.

Source: javiarmesto/ALDC-AL-Development-Collection on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.