openxr

openxr is a cursor rule for Cursor from AcKeskin/contexture. It costs 0 tokens per session (2,125 once invoked), scanned A, original, MIT.

A set of coding rules for OpenXR, an API used to build virtual- and augmented-reality applications. It requires checking which runtime extensions exist before enabling or calling them.

In plain words
What is it for?
It helps implement portable OpenXR instance setup, extension checks, and runtime-loaded extension functions.
Why use it?
It prevents application startup failures and invalid function calls when a device or runtime lacks an extension. It also makes required and optional features explicit.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc).

Good fit It helps implement portable OpenXR instance setup, extension checks, and runtime-loaded extension functions.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/ackeskin/contexture/openxr
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/AcKeskin/contexture

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for openxr

README.md
[![agentmods](https://agentmods.dev/badge/rules/ackeskin/contexture/openxr/github.svg)](https://agentmods.dev/rules/ackeskin/contexture/openxr)
Your own site
<a href="https://agentmods.dev/rules/ackeskin/contexture/openxr"><img src="https://agentmods.dev/badge/rules/ackeskin/contexture/openxr/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for openxr

Your own site · 80×15
<a href="https://agentmods.dev/rules/ackeskin/contexture/openxr"><img src="https://agentmods.dev/badge/rules/ackeskin/contexture/openxr.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 2,125 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.02125
Opus 5.5 $0.00000 $0.00850
Sonnet 5.5 $0.00000 $0.00425
Haiku 4.5 $0.00000 $0.00213

Measured today against content hash 5599889152dc, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

openxr scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

cursor/rules/openxr.mdc · 72 lines

How it starts

The opening of the file, as written. The whole thing — 72 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Generated from architectural-rules/openxr/ — do not hand-edit.

OpenXR extensions and portability

Call xrEnumerateInstanceExtensionProperties before constructing XrInstanceCreateInfo::enabledExtensionNames. Never pass extension names that have not been confirmed present; xrCreateInstance will return XR_ERROR_EXTENSION_NOT_PRESENT and fail. (OpenXR: xrEnumerateInstanceExtensionProperties, XrInstanceCreateInfo, XR_ERROR_EXTENSION_NOT_PRESENT)

Partition extensions into required (app cannot function without them — abort if absent) and optional (enhanced experience — feature-gate at runtime). Document this split explicitly in the extension query phase. This is the primary portability seam across runtimes. (OpenXR: xrEnumerateInstanceExtensionProperties)

Do not call functions or use structures from an optional extension unless that extension was successfully enabled. Extension functions obtained via xrGetInstanceProcAddr are null when the extension is absent; calling them is undefined behaviour. (OpenXR: xrGetInstanceProcAddr)

Load all extension function pointers via xrGetInstanceProcAddr after instance creation. Do not link extension entry points statically where the loader may not expose them. (OpenXR: xrGetInstanceProcAddr)

Enumerate API layers with xrEnumerateApiLayerProperties in debug/development builds; enable validation layer (XR_APILAYER_LUNARG_core_validation) when available. Never hard-enable a layer in release builds — the layer may be absent on end-user machines and will cause instance creation failure. (OpenXR: xrEnumerateApiLayerProperties, XrInstanceCreateInfo::enabledApiLayerNames)

Check the XrResult of every OpenXR call. Many functions return XR_SUCCESS for the normal case but XR_SESSION_LOSS_PENDING or XR_ERROR_* for recoverable or fatal conditions. Ignoring results silently corrupts frame loop state. Use XR_SUCCEEDED(result) for coarse checks; match specific codes for recoverable paths. (OpenXR: XrResult, XR_SUCCEEDED, XR_SESSION_LOSS_PENDING)

Query XrSystemProperties (via xrGetSystemProperties) and XrSystemGraphicsProperties / XrSystemTrackingProperties after instance and system enumeration. Do not assume display resolution, layer count, or tracking capabilities; minimums from one runtime are not guarantees on another. (OpenXR: xrGetSystemProperties, XrSystemProperties, XrSystemGraphicsProperties, XrSystemTrackingProperties)

Why: OpenXR's runtime ecosystem spans vendors with deliberately different capability sets. Code that assumes extension presence, skips enumeration, or ignores XrResult works on the developer's machine and silently breaks on another vendor's runtime. The enumerate-then-gate pattern is the spec's explicit portability mechanism; following it is the difference between a portable app and one that is accidentally portable. Source: Khronos OpenXR specification.

Read the full file on GitHub · 72 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today First seen · 72 lines · 2,125 tokens per session scan A 5599889152dc

Subscribe to this mod's changes

openxr is a cursor rule published in the GitHub repository AcKeskin/contexture (2 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,125 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-27.