Borrowing it
Nothing to install: this file belongs to dev-lou/PixelPilot. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/dev-lou/PixelPilot/main/vscode/.github/instructions/uiux-spatial-ui.instructions.mdgit clone --depth 1 https://github.com/dev-lou/PixelPilotWrote 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.
[](https://agentmods.dev/instructions/dev-lou/pixelpilot/uiux-spatial-ui)<a href="https://agentmods.dev/instructions/dev-lou/pixelpilot/uiux-spatial-ui"><img src="https://agentmods.dev/badge/instructions/dev-lou/pixelpilot/uiux-spatial-ui.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.03417 | $0.03417 |
| Opus 5 | $0.01708 | $0.01708 |
| Sonnet 5 | $0.00683 | $0.00683 |
| Haiku 4.5 | $0.00342 | $0.00342 |
Grade C, and why
PixelPilot uiux-spatial-ui.instructions.md scanned grade C with 1 finding 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 3d ago.
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.
Hidden instructionshighPrompt injection
Directives inside HTML comments, invisible characters or bidirectional overrides are read by the model and not by the person reviewing the file.
<!-- Keyboard instructions --> How it starts
The opening of the file, as written. The whole thing — 481 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Spatial UI & 3D Web Experiences
Flat is dead. The web is going spatial. This file covers WebGPU, Three.js, 3D product viewers, depth-layered interfaces, and parallax that actually impresses — not the 2015 "background moves slower" kind.
CRITICAL RULES
- Performance first — 3D must not tank mobile. Use LOD (level of detail), lazy-load models.
- Graceful degradation — Always provide 2D fallback for unsupported browsers.
- Accessibility — 3D viewers need keyboard controls, alt descriptions, reduced-motion fallback.
- Design tokens — All colors, shadows, and UI overlays use tokens.
WHEN TO USE SPATIAL UI
| Use Case | Recommended Approach |
|---|---|
| Product viewer (e-commerce) | Three.js + GLB model |
| Hero visual impact | CSS 3D transforms + depth layers |
| Data visualization | Three.js or WebGPU for large datasets |
| Interactive storytelling | Scroll-linked 3D scenes |
| Gaming/immersive | WebGPU (modern) or Three.js |
Never use 3D for:
- Navigation menus
- Form inputs
- Text content
- Anything that needs to be accessible by default
THREE.JS PRODUCT VIEWER
// ProductViewer.tsx — React + Three.js + React Three Fiber
import { Canvas, useFrame } from '@react-three/fiber';
import { OrbitControls, useGLTF, Environment, ContactShadows } from '@react-three/drei';
import { Suspense, useRef } from 'react';
function Model({ url }: { url: string }) {
const { scene } = useGLTF(url);
const ref = useRef<THREE.Group>(null);
// Respect reduced motion
const prefersReducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
useFrame((state) => {
if (ref.current && !prefersReducedMotion) {
// Subtle idle rotation
ref.current.rotation.y = Math.sin(state.clock.elapsedTime * 0.3) * 0.1;
}
});
return <primitive ref={ref} object={scene} scale={1} />;
}
function LoadingFallback() {
return (
<mesh>
<boxGeometry args={[1, 1, 1]} />
<meshStandardMaterial color="var(--surface-2)" wireframe />
</mesh>
);
}
export function ProductViewer({ modelUrl, fallbackImage }: Props) {
const supportsWebGL = !!document.createElement('canvas').getContext('webgl2');
if (!supportsWebGL) {
return (
<div className="product-viewer-fallback">
<img src={fallbackImage} alt="Product view" loading="lazy" />
<p className="text-muted">3D view not supported in this browser</p>
</div>
);
}
return (
<div className="product-viewer" role="img" aria-label="Interactive 3D product viewer. Use mouse to rotate, scroll to zoom.">
<Canvas
camera={{ position: [0, 0, 4], fov: 45 }}
dpr={[1, 2]} // Limit pixel ratio for performance
>
<ambientLight intensity={0.5} />
<spotLight position={[10, 10, 10]} angle={0.15} penumbra={1} />
<Suspense fallback={<LoadingFallback />}>
<Model url={modelUrl} />
<Environment preset="studio" />
<ContactShadows position={[0, -1, 0]} opacity={0.4} blur={2} />
</Suspense>
<OrbitControls
enablePan={false}
minDistance={2}
maxDistance={8}
minPolarAngle={Math.PI / 4}
maxPolarAngle={Math.PI / 2}
/>
</Canvas>
{/* Keyboard instructions for accessibility */}
<div className="sr-only" aria-live="polite">
Use arrow keys to rotate. Plus and minus to zoom.
</div>
</div>
);
}
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.
- 3d ago First seen · 481 lines · 3,417 tokens per session scan C 7be1f2f938b9
PixelPilot uiux-spatial-ui.instructions.md is an instructions file published in the GitHub repository dev-lou/PixelPilot (2 stars, last pushed 5mo ago), licensed MIT. It adds 3,417 tokens to every session, about $0.0171 per session on Opus 5. A static security scan graded it C with 1 finding (hidden instructions). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other instructions, from other repositories
plan-forge blazor-fluent-ui.instructions.md
Blazor Server + Microsoft Fluent UI patterns — component layering, state, lifecycle, accessibility. Auto-loads when editing .razor / .razor.cs files.
plan-forge frontend.instructions.md
TypeScript frontend patterns — React, component architecture, state management.
plan-forge dapr.instructions.md
Dapr patterns for .NET — building blocks, component config, sidecar architecture, multi-tenant isolation, workflows, state management, secrets.
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.