Back to Skills

bc-w1-reference

verified

Local mirror of standard Business Central W1 source code (fbakkensen/bc-w1) for searching events, APIs, tables, fields, tests, and implementation patterns. Use when: (1) Finding events to subscribe to (e.g., posting events, validation triggers), (2) Understanding how standard BC implements features (discounts, pricing, document posting), (3) Looking up table/field definitions and relationships, (4) Finding test patterns and test library usage (Library - Sales, Library - Inventory), (5) Checking APIV2 implementations for external integrations, (6) Referencing System Application utilities (Email, Azure AD, Barcode). Content includes: BaseApp/ (~165 modules: Sales, Purchases, Inventory, Finance, Manufacturing, Warehouse), BaseApp/Test/ (~30 test apps), System Application/ (~80+ platform modules), APIV2/ (REST API pages), ExternalEvents/ (business events), testframework/ (Assert, Any, TestRunner).

View on GitHub

Marketplace

bc-agentic-dev-tools

FBakkensen/bc-agentic-dev-tools

Plugin

bc-w1-reference

Repository

FBakkensen/bc-agentic-dev-tools

plugins/bc-w1-reference/skills/bc-w1-reference/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/bc-w1-reference/skills/bc-w1-reference/SKILL.md -a claude-code --skill bc-w1-reference

Installation paths:

Claude
.claude/skills/bc-w1-reference/
Powered by add-skill CLI

Instructions

# BC W1 Reference

## Overview
Set up and use a local mirror of the standard Business Central (W1) source so you can search for events, APIs, tables, fields, and tests without remote browsing. The default mirror location is a sibling `_aldoc/bc-w1` folder (outside the repo root) to avoid noise in search tools.

**Recommended approach:** For open-ended exploration (finding events, understanding patterns, locating test examples), use the Task tool with `subagent_type=Explore` to search the mirror. This handles multi-step searches and returns synthesized findings.

## Quick Start
Important: Do not run the setup/update scripts automatically. Ask the user to confirm before running them; in most cases, you should not run them at all unless the user explicitly requests it.

1) Ensure the local mirror exists (clones if missing, adds local ignore):

```powershell
<skill-folder>/skills/bc-w1-reference/scripts/setup-bc-w1-mirror.ps1
```

2) Update the mirror (fast-forward only):

```powershell
<skill-folder>/skills/bc-w1-reference/scripts/update-bc-w1.ps1
```

3) Search locally with ripgrep (examples, from repo root; single-file):

```powershell
rg -n "EventSubscriber" "..\_aldoc\bc-w1\Email - SMTP Connector\Test\Email - SMTP Connector Tests\src\SMTPAccountAuthTests.Codeunit.al"
rg -n "OnAfterValidateEvent" "..\_aldoc\bc-w1\ExternalEvents\Source\_Exclude_Business_Events_\src\ARExternalEvents.Codeunit.al"
rg -n "table 27" "..\_aldoc\bc-w1\BaseApp\Source\Base Application\Inventory\Item\Item.Table.al"
```

4) Search structurally with ast-grep (single file to keep output small):

```powershell
ast-grep run -l al -p 'codeunit 130300 "Library - Demo Data"' -C 0 "..\_aldoc\bc-w1\BaseApp\Test\Tests-TestLibraries\LibraryDemoData.Codeunit.al"
```

## Tasks

### 1) Ensure local mirror
Use when the mirror does not exist yet or when you want to re-apply local ignore.

```powershell
<skill-folder>/skills/bc-w1-reference/scripts/setup-bc-w1-mirror.ps1
```

### 2) Update mirror
Use when you w

Validation Details

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