AL event-driven architecture for Business Central. An agent skill from javiarmesto/ALDC-AL-Development-Collection.

MITAuto-check passedBackend & APIs

Install Skill Events

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

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

GitHub CLI
$ gh skill install javiarmesto/ALDC-AL-Development-Collection skill-events --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-events .claude/skills/skill-events && 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-events
GitHub stars
109
Token cost
~2.5k tokens
SKILL.md length
658 words
Files
1
Skills in repo
14
Repo updated
First seen
Licence
MIT

At a glance

AL event-driven architecture for Business Central. An agent skill from javiarmesto/ALDC-AL-Development-Collection.

  • Works in 4 steps: Discover Events → Design Event Architecture → Implement → …
  • Creating EventSubscribers
  • SKILL.md covers Purpose, When to Load, Core Patterns and Workflow, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Skill Events is an agent skill from javiarmesto/ALDC-AL-Development-Collection. AL event-driven architecture for Business Central. Use when creating EventSubscribers, IntegrationEvents, BusinessEvents, or implementing publisher/subscriber patterns in extensions.

Its SKILL.md is about 2.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Backend & APIs, covering Event-driven systems. 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 EventSubscribers
  • IntegrationEvents
  • Implementing publisher/subscriber patterns in extensions

Example prompts

  • “/skill-events”

Workflow steps

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

  1. Discover Events
  2. Design Event Architecture
  3. Implement
  4. Verify

What it can do on your machine

Read from SKILL.md and the folder at commit 4f99d7d. 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).

    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 Events loads about 2.5k tokens when it runs. Until then it costs about 49 tokens; SKILL.md has 658 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~49
When it runs · the whole SKILL.md, loaded when a task matches
~2.5k

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 4f99d7d, republished under its MIT licence (© javiarmesto). 658 words, ~2,546 tokens.

Download SKILL.mdSave it as .claude/skills/skill-events/SKILL.md (or your agent's skills folder).
name
skill-events
description
AL event-driven architecture for Business Central. Use when creating EventSubscribers, IntegrationEvents, BusinessEvents, or implementing publisher/subscriber patterns in extensions.

Skill: AL Event-Driven Architecture

Purpose

Discover, design, and implement event-driven patterns in AL Business Central extensions: event discovery via Event Recorder, subscriber/publisher creation, IsHandled patterns, and extensibility design.

When to Load

This skill should be loaded when:

  • Extending standard BC functionality (posting, validation, master data changes)
  • Designing custom integration events for a new codeunit or extension
  • A subscriber is not firing and needs investigation
  • An architecture requires extensibility points for future consumers
  • Implementing document posting interventions, workflow triggers, or UI customizations

Core Patterns

Pattern 1: Event Discovery with Event Recorder

Before writing any subscriber, discover which events are raised during the business process:

1. Open the Event Recorder in VS Code  ← VS Code command (not an agent tool)
2. Start recording
3. Execute the business process in BC (e.g., post a sales order)
4. Stop recording
5. Analyze the event list — filter by object or keyword
6. Identify the OnBefore/OnAfter event closest to your extension point

Use al_search_objects and al_get_object_definition to inspect publisher signatures. Use al_find_references to see who else subscribes to the same event.

Pattern 2: Event Subscriber
al
// Subscriber codeunit — name with "Handler" suffix
codeunit 50100 "Sales Document Events Handler"
{
    // Attribute breakdown:
    //   ObjectType  — Table, Codeunit, Page, Report, etc.
    //   ObjectId    — Database::"Sales Header" or Codeunit::"Customer Management"
    //   EventName   — exact name of the publisher procedure (e.g., OnBeforeInsert)
    //   ElementName — '' for table/codeunit events; field name for page field triggers
    //   SkipOnMissingLicense  — false (recommended: always run)
    //   SkipOnMissingPermission — false (recommended: always run)

    [EventSubscriber(ObjectType::Table, Database::"Sales Header",
                     OnBeforeInsert, '', false, false)]
    local procedure OnBeforeInsertSalesHeader(
        var SalesHeader: Record "Sales Header";
        RunTrigger: Boolean)
    begin
        ValidateCustomFields(SalesHeader);
    end;
}

Subscriber rules:

  • Procedure MUST be local
  • Parameter signature MUST exactly match the publisher (name, type, order)
  • One subscriber per event per codeunit (keep handler codeunits focused)
  • Never use Commit inside a subscriber unless absolutely necessary
Pattern 3: Integration Event Publisher with IsHandled

The standard extensibility pattern: OnBefore allows interception, OnAfter allows reaction.

al
codeunit 50101 "Customer Management"
{
    procedure CreateCustomer(var Customer: Record Customer): Boolean
    var
        IsHandled: Boolean;
    begin
        // 1. Raise OnBefore — subscribers can validate, modify, or skip
        OnBeforeCreateCustomer(Customer, IsHandled);
        if IsHandled then
            exit(true);

        // 2. Default logic
        if not Customer.Insert(true) then
            exit(false);

        // 3. Raise OnAfter — subscribers can react (logging, integration, etc.)
        OnAfterCreateCustomer(Customer);
        exit(true);
    end;

    [IntegrationEvent(false, false)]
    local procedure OnBeforeCreateCustomer(
        var Customer: Record Customer;
        var IsHandled: Boolean)
    begin
        // Empty body — subscribers provide the implementation
        // IsHandled = true → skip default logic
    end;

    [IntegrationEvent(false, false)]
    local procedure OnAfterCreateCustomer(var Customer: Record Customer)
    begin
        // Empty body — subscribers react after creation
    end;
}

IntegrationEvent attribute:

  • IntegrationEvent(IncludeSender, GlobalVarAccess)
  • IncludeSender = false — recommended for clean API (no coupling to publisher internals)
  • GlobalVarAccess = false — recommended (prevent subscribers from accessing publisher global vars)
Pattern 4: Business Event

Business events are user-disablable — use for optional, non-critical functionality:

al
[BusinessEvent(IncludeSender)]
local procedure OnCustomerCreditLimitExceeded(
    Customer: Record Customer;
    RequestedAmount: Decimal)
begin
    // Subscribers may send notification, log, or block — user can disable
end;
AttributeCannot be disabledUse for
IntegrationEventCorrectCritical business logic, posting interventions
BusinessEventCan be disabled by userOptional features, external integrations, notifications
Pattern 5: Well-Designed Event Parameters
al
// ✅ Good — rich context, var where modification expected, IsHandled for OnBefore
[IntegrationEvent(false, false)]
local procedure OnBeforePostDocument(
    var DocumentHeader: Record "Sales Header";   // var — subscriber may modify
    var DocumentLines: Record "Sales Line";      // var — subscriber may modify
    PostingDate: Date;                           // value — read-only context
    var IsHandled: Boolean)                      // var — subscriber may skip default
begin
end;

// ✅ Good — results context for OnAfter
[IntegrationEvent(false, false)]
local procedure OnAfterPostDocument(
    DocumentHeader: Record "Sales Header";       // value — read-only (already posted)
    PostedDocumentNo: Code[20];                  // result reference
    PostingResult: Boolean)                      // success/failure
begin
end;

Parameter design rules:

  • var Record — when subscribers should be able to modify the record
  • Non-var Record — when record is read-only context
  • Always include var IsHandled: Boolean in OnBefore events
  • Include result/outcome parameters in OnAfter events
  • Use meaningful parameter names that describe business intent

Workflow

Step 1: Discover Events
  1. Open the Event Recorder in VS Code (a VS Code command, not an agent tool)
  2. Execute the target business process in BC
  3. Review recorded events — filter by relevant object
  4. Use al_get_object_definition to inspect publisher signatures
  5. Use al_find_references to check existing subscribers (avoid conflicts)
Step 2: Design Event Architecture

For subscribing to existing events:

  1. Identify the right OnBefore / OnAfter event from Step 1
  2. Match the parameter signature exactly
  3. Create a handler codeunit with naming: "{Domain} Events Handler"

For creating new integration events in your codeunit:

  1. Identify logical extension points in your business logic
  2. Add OnBefore event with IsHandled pattern before key operations
  3. Add OnAfter event after key operations with result context
  4. Follow naming: OnBefore{Action} / OnAfter{Action}
  5. Choose IntegrationEvent (critical) or BusinessEvent (optional)
Show full SKILL.md (232 more words)Show less
Step 3: Implement

Use the AL: Insert Event Subscriber VS Code command (not an agent tool) to scaffold subscriber/publisher structures, then fill the body:

al
// Subscriber handler codeunit
codeunit 50102 "Customer Validation Handler"
{
    [EventSubscriber(ObjectType::Codeunit, Codeunit::"Customer Management",
                     OnBeforeCreateCustomer, '', false, false)]
    local procedure ValidateOnBeforeCreate(
        var Customer: Record Customer;
        var IsHandled: Boolean)
    begin
        ValidateCustomerCreditLimit(Customer);

        if ShouldSkipDefaultProcessing(Customer) then
            IsHandled := true;
    end;
}
Step 4: Verify
  1. Build: al_build — check for compilation errors (signature mismatches)
  2. Set breakpoint inside subscriber
  3. Debug: al_debug
  4. Execute the business process — confirm subscriber fires
  5. If subscriber does NOT fire, check:
    • Signature mismatch (most common cause)
    • Wrong ObjectType / ObjectId
    • Extension not published/active
    • Another subscriber set IsHandled = true before yours
    • SkipOnMissingLicense / SkipOnMissingPermission attributes

Common Scenarios

ScenarioEvent SourcePattern
Validate before postingOnBeforePost* on Codeunit "Sales-Post"Subscriber + IsHandled
Add fields to sales orderOnAfterInsert on Table "Sales Header"Subscriber (set defaults)
External integration triggerOnAfterPostDocument (custom)Publisher in your codeunit
Custom approval workflowOnBeforeRelease*Subscriber + IsHandled to block
UI field validationPage trigger OnAfterValidate on fieldSubscriber with ElementName
Master data change auditOnAfterModify on Table "Customer"Subscriber (log changes)

References

Constraints

  • This skill covers event discovery, design, and implementation patterns — it does NOT duplicate the passive rules in al-events.instructions.md (auto-applied to all .al files)
  • Do NOT create publishers without an OnBefore + OnAfter pair at minimum
  • Do NOT use Commit inside event subscribers unless absolutely required
  • Do NOT set IsHandled = true without clear documentation of why default logic is skipped
  • Subscriber debugging (breakpoints, snapshots) → load skill-debug.md
  • Subscriber performance overhead analysis → load skill-performance.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

Just SKILL.md in skills/skill-events of javiarmesto/ALDC-AL-Development-Collection.

Open the folder on GitHubat commit 4f99d7d

Compare with similar skills

Skill Events 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 Events compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Skill Events this skilljaviarmesto/ALDC-AL-Development-Collection109—~2.5kAutomated safety check: PassMIT
Stripe Projectsfossasia/eventyay1.7k5 repos~2kAutomated safety check: NotesApache-2.0
MQTTX CLIemqx/MQTTX5.1k—~1.9kAutomated safety check: PassApache-2.0
AWS Serverless Edazxkane/aws-skills3674 repos~3.2kAutomated safety check: PassMIT
Windmill Trigger Type Checklistwindmill-labs/windmill18k—~4.7kAutomated safety check: PassCustom licence
FoundatioFoundatioFx/Foundatio2.1k—~3.9kAutomated safety check: PassApache-2.0

Similar skills

  • Stripe Projects

    fossasia/eventyay

    A skill your agent uses when the user wants to provision infrastructure or third-party services using Stripe Projects.

    1.7k GitHub starsUsed in 5 repos~2k tokens
    Backend & APIsAuto-check: notes
  • MQTTX CLI

    emqx/MQTTX

    Operates the `mqttx` command line client to connect, publish, subscribe, benchmark and simulate data against an MQTT broker, with TLS and MQTT 5 support.

    5.1k GitHub stars~1.9k tokensUpdated today
    Backend & APIsAuto-check passed
  • AWS Serverless Eda

    zxkane/aws-skills

    AWS serverless and event-driven architecture expert based on Well-Architected Framework.

    367 GitHub starsUsed in 4 repos~3.2k tokens
    Backend & APIsAuto-check passed
  • Windmill Trigger Type Checklist

    windmill-labs/windmill

    Checklist of every backend, frontend, CLI and capture change needed to add a new TriggerCrud-based trigger type, such as Azure, GCP or Kafka, to Windmill.

    18k GitHub stars~4.7k tokensUpdated today
    Backend & APIsAuto-check passed
  • Foundatio

    FoundatioFx/Foundatio

    A skill your agent uses when working with Foundatio infrastructure abstractions for .NET -- caching, queuing, messaging, file storage, distributed locking, or background jobs.

    2.1k GitHub stars~3.9k tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • Homerail Dag Ops

    xiaotianfotos/homerail

    Design, start, supervise, inspect, and continue HomeRail DAG workflows from any agent with CLI or HTTP access.

    994 GitHub stars~1.5k tokensUpdated 14 days 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 3 days ago
    Auto-check passed
  • Skill API

    javiarmesto/ALDC-AL-Development-Collection

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

    109 GitHub stars~3.5k tokensUpdated 3 days ago
    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 3 days ago
    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 3 days ago
    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 3 days ago
    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 3 days ago
    Auto-check passed

Categories

Questions about Skill Events

What does Skill Events do?

AL event-driven architecture for Business Central. An agent skill from javiarmesto/ALDC-AL-Development-Collection. Skill Events is an agent skill from javiarmesto/ALDC-AL-Development-Collection. AL event-driven architecture for Business Central.

When should I use Skill Events?

Skill Events fits situations like: creating EventSubscribers; integrationEvents; implementing publisher/subscriber patterns in extensions.

How do I install Skill Events in Claude Code?

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

How do I install Skill Events in Codex?

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

Can I use Skill Events 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-events -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-events, .gemini/skills/skill-events, .github/skills/skill-events and .opencode/skills/skill-events in your project.

What does Skill Events need to run?

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

Does Skill Events 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 Events 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 Events use?

Skill Events 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 Events use?

About 2.5k 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.

What are the alternatives to Skill Events?

Skills that share tags, products or a category with Skill Events: Stripe Projects (fossasia/eventyay, 1.7k stars), MQTTX CLI (emqx/MQTTX, 5.1k stars), AWS Serverless Eda (zxkane/aws-skills, 367 stars) and Windmill Trigger Type Checklist (windmill-labs/windmill, 18k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Skill Events?

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 7, 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.