Performance and Caching

Make D365FO code fast and keep it fast — set-based operations, indexes, the table CacheLookup modes, SysGlobalObjectCache and RecordViewCache, temp-table choice, and parallel batch fan-out. Invoke when the user asks why something is slow, how to cache, how to process a large volume, or which temp table type to use.

49 stars 26 forksAI, LLMs & Agents

Install

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add dynamics365ninja/d365fo-cli --skill performance-and-caching
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/performance-and-caching ~/.claude/skills/performance-and-caching

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 is proprietary. **ALWAYS use `d365fo generate …` commands** to produce correct AOT XML. If `d365fo` is unavailable in PATH, stop and ask the user to install it.

# Performance and caching

> Order of attack, cheapest first: stop looping, cover the `where` clause with an
> index, cache what is stable, then parallelise. Caching a slow query is the most
> common way to make a problem harder to find.

## 1. Stop looping

- Set-based first: `insert_recordset`, `update_recordset`, `delete_from`. One
  round trip instead of N.
- `RecordInsertList` when the rows must be constructed in X++ before insert.
- `exists join` / `notExists join` when you need no columns from the joined table.
- **Never nest `while select`** — flatten to one statement with joins (`SEL004`).
- `firstOnly` / `firstFast` on single-record lookups.
- Never call a function inside a `where` clause; assign to a local first (`SEL005`).

## 2. Indexes

Every field in a `where` clause should be covered by an index, in the order the
query uses it. Check what exists before adding one:

```sh
d365fo get table FmVehicle --output json | jq '.data.indexes'
d365fo find relations FmVehicle --output json
```

A table also needs a unique alternate key (`BPCheckAlternateKeyAbsent`), which
doubles as the OData `$key` and the dual-write match key.
Read the full skill on GitHub

Details

Skill name
performance-and-caching
Path
skills/anthropic/performance-and-caching/SKILL.md
Repo updated
16 November 2026

FAQ

What does the Performance and Caching skill do?

Make D365FO code fast and keep it fast — set-based operations, indexes, the table CacheLookup modes, SysGlobalObjectCache and RecordViewCache, temp-table choice, and parallel batch fan-out. Invoke when the user asks why something is slow, how to cache, how to process a large volume, or which temp table type to use.

How do I install the Performance and Caching skill?

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

Is Performance and Caching 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

Proactive Agent

23

halthelobster/proactive-agent

Transform AI agents from task-followers into proactive partners that anticipate needs and continuously improve. Now with WAL Protocol, Working Buffer for context survival, Compaction Recovery, and battle-tested security patterns. Part of the Hal Stack 🦞

AI, LLMs & Agents

Object Extension Authoring

49

dynamics365ninja/d365fo-cli

Create a Table / Form / Edt / Enum extension, a new EDT (Extended Data Type), or a new base enum in D365 Finance & Operations. Use when the user asks to "extend a table", "add a field to standard CustTable", "extend an EDT", "add an enum value", "extend a form via FormExtension", "create an EDT", "create a new EDT", "create an enum", "generate edt", or "generate enum".

AI, LLMs & Agents26

Rdl Design Expressions

49

dynamics365ninja/d365fo-cli

Expressions inside an SSRS report's RDL design — the =Fields!/Parameters! syntax, aggregates and their scope, formatting, and why the RDL is edited in Visual Studio rather than through the AOT XML. Invoke when the user asks to show a computed value on a report, format a number or date in a design, total a column, or hide a row conditionally.

AI, LLMs & Agents26

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