PixelPilot: Instructions file for GitHub Copilot

vscode/.github/instructions/uiux-spatial-ui.instructions.md

PixelPilot uiux-spatial-ui.instructions.md is an instructions file for GitHub Copilot from dev-lou/PixelPilot. It costs 3,417 tokens per session, scanned C, original, MIT.

A guide to building immersive three-dimensional web interfaces with WebGPU or Three.js, such as product viewers, depth layers, and interactive scenes.

In plain words
What is it for?
Use it to create 3D product viewers, depth-based hero sections, data visualizations, interactive stories, and game-like web experiences.
Why use it?
It addresses performance, browser support, keyboard access, reduced motion, and two-dimensional fallbacks so 3D features remain usable.

Instructions file for GitHub Copilot

Written for GitHub Copilot: a Copilot instructions file.

This is dev-lou/PixelPilot's own configuration. It tells GitHub Copilot how to work on PixelPilot itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything PixelPilot configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/dev-lou/PixelPilot/main/vscode/.github/instructions/uiux-spatial-ui.instructions.md
Clone the repo
git clone --depth 1 https://github.com/dev-lou/PixelPilot

Made for: GitHub Copilot.

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 PixelPilot uiux-spatial-ui.instructions.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/dev-lou/pixelpilot/uiux-spatial-ui.svg)](https://agentmods.dev/instructions/dev-lou/pixelpilot/uiux-spatial-ui)
Your own site
<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>
Per session 3,417 This file is loaded in full into every session.
When invoked 3,417 The same file — it is already loaded in full.
Security scan C 1 finding. 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.03417 $0.03417
Opus 5 $0.01708 $0.01708
Sonnet 5 $0.00683 $0.00683
Haiku 4.5 $0.00342 $0.00342

Measured 3d ago against content hash 7be1f2f938b9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

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 -->
vscode/.github/instructions/uiux-spatial-ui.instructions.md · 481 lines

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

  1. Performance first — 3D must not tank mobile. Use LOD (level of detail), lazy-load models.
  2. Graceful degradation — Always provide 2D fallback for unsupported browsers.
  3. Accessibility — 3D viewers need keyboard controls, alt descriptions, reduced-motion fallback.
  4. 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>
  );
}

Read the full file on GitHub · 481 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. 3d ago First seen · 481 lines · 3,417 tokens per session scan C 7be1f2f938b9

Subscribe to this mod's changes

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.