Xpp Best Practice Rules

Best-practice (BP) rules every generated X++ file must satisfy — today/DateTimeUtil, label-typed messages, EDT migration, nested loops, alternate keys, doc comments, label existence. Invoke whenever you scaffold or edit X++ that will eventually be linted by xppbp.exe.

49 stars 26 forksAI, LLMs & Agents

Install

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add dynamics365ninja/d365fo-cli --skill xpp-best-practice-rules
Manual install
git clone --depth 1 https://github.com/dynamics365ninja/d365fo-cli.git /tmp/d365fo-cli
mkdir -p ~/.claude/skills
cp -r /tmp/d365fo-cli/skills/anthropic/xpp-best-practice-rules ~/.claude/skills/xpp-best-practice-rules

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

> ⛔ **NEVER write X++ AOT XML files directly** via PowerShell, terminal file commands (`Set-Content`, `Out-File`, `New-Item`), editor write tools, or any raw text approach. The XML schema (`<AxClass>`, `<AxTable>`, `<AxForm>`, `<Methods>`, `<SourceCode>`) is proprietary — LLMs have not been trained on it reliably. **ALWAYS use `d365fo generate …` commands** to produce correct AOT XML. If `d365fo` is unavailable in PATH, stop and ask the user to install it.

# Best-practice rules — generated X++ must be BP-clean

> **Source of truth:** [`d365fo bp check`](https://github.com/dynamics365ninja/d365fo-cli/blob/main/docs/EXAMPLES.md#windows-only-ops-d365fo-vm) — the Windows-VM runner that executes `xppbp.exe`. The list below covers the non-negotiable BP rules every scaffold and hand-edit must satisfy out of the box.

## Per-rule rules

### `BPUpgradeCodeToday` — `today()` is forbidden

`today()` ignores the user's preferred time-zone. Always use:

```xpp
TransDate today = DateTimeUtil::getToday(DateTimeUtil::getUserPreferredTimeZone());
```

### `BPErrorLabelIsText` — no hardcoded UI strings

Every string passed to `info()` / `warning()` / `error()` / `Box::yesNo()` etc. must be a label token of the form `@File:Key`. Search before you create:

```sh
d365fo labels search "Vehicle is required" --lang en-us --output json
d365fo labels resolve @SYS12345                          # confirm an existing token
```
Read the full skill on GitHub

Details

Skill name
xpp-best-practice-rules
Path
skills/anthropic/xpp-best-practice-rules/SKILL.md
Repo updated
16 November 2026

FAQ

What does the Xpp Best Practice Rules skill do?

Best-practice (BP) rules every generated X++ file must satisfy — today/DateTimeUtil, label-typed messages, EDT migration, nested loops, alternate keys, doc comments, label existence. Invoke whenever you scaffold or edit X++ that will eventually be linted by xppbp.exe.

How do I install the Xpp Best Practice Rules skill?

skills CLI (Claude Code, Cursor, Codex and more): npx skills add dynamics365ninja/d365fo-cli --skill xpp-best-practice-rules. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Xpp Best Practice Rules popular?

It lives in dynamics365ninja/d365fo-cli, which has 49 GitHub stars and 26 forks.

Related skills

Analytics and Er

49

dynamics365ninja/d365fo-cli

Model the D365FO analytical and document-generation surfaces — aggregate measurements and the entity store, tiles/cues and KPIs, and Electronic Reporting (ER). Invoke when the user asks about a workspace tile, a KPI, an aggregate measurement, the entity store, Power BI content, or running/binding an ER format.

Data & Analytics26

Barcode Scanning

49

dynamics365ninja/d365fo-cli

Barcodes and scanner input in D365FO — printing vs scanning are unrelated code paths, GS1-128 application identifiers, item-barcode resolution, and where the platform parses a scan for you. Invoke when the user mentions barcodes, GS1, GTIN, SSCC, scanning, scanners, item barcodes, or barcode setup.

AI, LLMs & Agents26

Build Error Triage

49

dynamics365ninja/d365fo-cli

Turn a D365FO compiler, best-practice, or runtime error into the specific fix it calls for. Invoke when the user pastes a build log, an xppc message, a BP violation, or an infolog stack trace and asks what it means or how to fix it.

AI, LLMs & Agents26

Xpp Class and Method Rules

49

dynamics365ninja/d365fo-cli

Rules for X++ class declarations, method modifiers, parameter passing, constructors, and extension methods (separate from CoC). Invoke when authoring new classes, overrides, factory methods, or extension methods.

AI, LLMs & Agents26

X++ Class Authoring

49

dynamics365ninja/d365fo-cli

Guidance for authoring or extending X++ classes in D365 Finance & Operations. Invoke whenever the user asks to "create a class", "extend a class", "add a method", or write any X++ that touches CoC.

AI, LLMs & Agents26

Xpp Data Access Apis

49

dynamics365ninja/d365fo-cli

Choose and use the right D365FO data-access API when a plain `select` will not do — the SysDa fluent API, the AOT Query/QueryRun object model, and direct SQL. Invoke when the user asks about dynamic queries, building a query at runtime, QueryBuildDataSource/QueryBuildRange, SysDa, or executing raw SQL from X++.

AI, LLMs & Agents26

Browse the most popular Claude skills, all ai, llms & agents skills, or write your own with the skills generator.