Back to Skills

al-build

verified

Build and test AL/Business Central projects. Use after modifying AL code or tests to verify the build gate passes. Runs compilation, publishing, and test execution in a single command. Required gate before committing AL changes.

View on GitHub

Marketplace

bc-agentic-dev-tools

FBakkensen/bc-agentic-dev-tools

Plugin

al-build

Repository

FBakkensen/bc-agentic-dev-tools

plugins/al-build/skills/al-build/SKILL.md

Last Verified

January 20, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/FBakkensen/bc-agentic-dev-tools/blob/main/plugins/al-build/skills/al-build/SKILL.md -a claude-code --skill al-build

Installation paths:

Claude
.claude/skills/al-build/
Powered by add-skill CLI

Instructions

# AL Build

Self-contained build system for AL/Business Central development. No external task runners required.

## Project Setup (First Time)

**Required Steps**:
1. **Initialize config**: Run `/al-build:init` to create `al-build.json`
2. **Customize config** (especially `testAppName` to match your test app)
3. **Run provision** (one-time): Run `/al-build:provision`

**Config Priority** (highest to lowest):
1. Script parameters (e.g., `-AppDir "custom"`)
2. Environment variables (e.g., `ALBT_APP_DIR`)
3. Project config (`al-build.json` in repo root)

## Canonical Gate

After modifying AL code or tests, run:

```powershell
pwsh "<skill-folder>/scripts/test.ps1"
```

**Prerequisites:**
- Project config exists and customized (`al-build.json`)
- Provision completed (run `provision.ps1` once)
- Docker container healthy

**Requirements:**
- Zero warnings, zero errors
- Faster iteration: `pwsh "<skill-folder>/scripts/test.ps1" -TestCodeunit <id>`
- Force republish: `pwsh "<skill-folder>/scripts/test.ps1" -Force`

**Outputs:**
- `.output/TestResults/last.xml` — JUnit test results
- `.output/TestResults/telemetry.jsonl` — merged telemetry

## Running Tests in Subtask (Recommended)

Use the Task tool with `subagent_type: general-purpose` to run tests. This keeps verbose build output contained and returns only essential results to the main conversation.

**Task tool invocation:**
```
subagent_type: general-purpose
prompt: |
  IMPORTANT: This is a READ-ONLY task. Do NOT edit any files.

  Run the AL build gate:
  pwsh "<skill-folder>/scripts/test.ps1"

  Report back:
  1. Build result: success or failure
  2. Test result: pass count, fail count
  3. If failures: include the relevant error messages and stack traces
  4. If warnings: list them
  5. If failures and telemetry is relevant: include key entries from .output/TestResults/telemetry.jsonl

  Do not include full console output - only the summary above.
```

**Why subtask?**
- Build/test output is verbose (compilation logs

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
3194 chars