Xpp Database Queries
Authoritative rules for X++ select / while-select queries in D365 Finance & Operations. Invoke whenever the user asks to write a "select", "while select", "query", joins, aggregates, cross-company, set-based ops, or any data-access X++.
Install
npx skills add dynamics365ninja/d365fo-cli --skill xpp-database-queriesgit 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-database-queries ~/.claude/skills/xpp-database-queriesPersonal 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++ database queries — `select` / `while select`
> **Source of truth:** [learn:xpp-select-statement](https://learn.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/dev-ref/xpp-data/xpp-select-statement).
> **Pre-flight:** confirm the target table / field with `d365fo get table <Name> --output json` before writing the query.
## Statement order (grammar-enforced)
```
select [FindOption…] [FieldList from] tableBuffer [index…]
[order by | group by] [where …] [join … [where …]]
```
`FindOption` keywords (`crossCompany`, `firstOnly`, `forUpdate`, `forceNestedLoop`, `forceSelectOrder`, `forcePlaceholders`, `pessimisticLock`, `optimisticLock`, `repeatableRead`, `validTimeState`, `noFetch`, `reverse`, `firstFast`) sit **between `select` and the buffer / field list** — never on a joined buffer (sole exception: `forUpdate` may target a specific buffer in a join).
`order by` / `group by` / `where` must appear **after the LAST `join` clause** — never between joins.
## `crossCompany` belongs on the OUTER bufferDetails
- Skill name
xpp-database-queries- Repository
- dynamics365ninja/d365fo-cli
- Path
skills/anthropic/xpp-database-queries/SKILL.md- Repo updated
- 16 November 2026
FAQ
What does the Xpp Database Queries skill do?
Authoritative rules for X++ select / while-select queries in D365 Finance & Operations. Invoke whenever the user asks to write a "select", "while select", "query", joins, aggregates, cross-company, set-based ops, or any data-access X++.
How do I install the Xpp Database Queries skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add dynamics365ninja/d365fo-cli --skill xpp-database-queries. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Xpp Database Queries 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.
You Sure
62ElliotJLT/Claude-Skill-Potions
Before ANY destructive, irreversible, or high-impact action, pause and surface a clear checklist of what's about to happen. This includes: file deletions, database changes, production deployments, mass updates, permission changes, or anything that can't easily be undone. Require explicit confirmation before proceeding. Never auto-execute dangerous operations.
Uw Scriptable Object Arch
47devdavv/unity-ai-workflow
Generate ScriptableObject-based systems including data containers, event channels, and runtime sets. Use when creating game data (weapons, enemies, items, abilities), cross-system events, or live object tracking. Triggers on requests like "create weapon data", "add an event system", "make a runtime set", "decouple these systems", "create item database", "add a damage event", "track active enemies", "create a config SO", "add game settings data", or any task involving ScriptableObject data containers, event-driven communication, or runtime object tracking. Reads ProjectConfig.yaml -> architectu
Postgres Patterns
32joneqian/claude-skills-suite
PostgreSQL database patterns for query optimization, schema design, indexing, and security. Based on Supabase best practices.
Browse the most popular Claude skills, all databases skills, or write your own with the skills generator.