Xpp Class and Method Rules
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.
Install
npx skills add dynamics365ninja/d365fo-cli --skill xpp-class-and-method-rulesgit 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-class-and-method-rules ~/.claude/skills/xpp-class-and-method-rulesPersonal 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. # X++ class & method authoring rules > **Source of truth:** [learn:xpp-classes-methods](https://learn.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/dev-ref/xpp-classes-methods). > **Pre-flight:** `d365fo get class <Name> --output json` for the base class signatures and `d365fo find usages` before any refactor. ## Class-level rules - **Default class access = `public`.** Removing `public` does not make a class non-public. Use: - `internal` to scope to the same model. - `final` to prevent extension by inheritance (enables CoC instead). - `abstract` for base-only types (cannot mix with `final` / `static`). - **Instance fields default = `protected`.** **NEVER make instance fields `public`.** Expose state via `parmFoo` accessors. Public fields tightly couple consumers to internal layout and break encapsulation. - **Constructor pattern:** one `new()` per class (compiler generates an empty default if absent). Convention: - `protected void new()` — internal use only.
Details
- Skill name
xpp-class-and-method-rules- Repository
- dynamics365ninja/d365fo-cli
- Path
skills/anthropic/xpp-class-and-method-rules/SKILL.md- Repo updated
- 16 November 2026
FAQ
What does the Xpp Class and Method Rules skill do?
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.
How do I install the Xpp Class and Method Rules skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add dynamics365ninja/d365fo-cli --skill xpp-class-and-method-rules. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Xpp Class and Method Rules popular?
It lives in dynamics365ninja/d365fo-cli, which has 49 GitHub stars and 26 forks.
Related skills
Analytics and Er
49dynamics365ninja/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.
Barcode Scanning
49dynamics365ninja/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.
Build Error Triage
49dynamics365ninja/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.
Xpp Data Access Apis
49dynamics365ninja/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++.
Xpp Best Practice Rules
49dynamics365ninja/d365fo-cli
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.
Xpp Runtime Functions
49dynamics365ninja/d365fo-cli
The ~170 predefined (run-time) X++ functions the compiler actually has — argument counts as the compiler enforces them, the optional trailing parameters the language reference presents as fixed, the variadic ones, and the AX 2012 names that are gone. Invoke when calling or debugging strFmt/subStr/conPeek/date2Str-style global functions, or an FN001/FN002 finding.
Browse the most popular Claude skills, all ai, llms & agents skills, or write your own with the skills generator.