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.
npx skills add bullish0x/GameStudio --skill r3f-performancegit clone --depth 1 https://github.com/bullish0x/GameStudioWrote 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/skills/bullish0x/gamestudio/r3f-performance)<a href="https://agentmods.dev/skills/bullish0x/gamestudio/r3f-performance"><img src="https://agentmods.dev/badge/skills/bullish0x/gamestudio/r3f-performance/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.
<a href="https://agentmods.dev/skills/bullish0x/gamestudio/r3f-performance"><img src="https://agentmods.dev/badge/skills/bullish0x/gamestudio/r3f-performance.svg" alt="Reviewed on agentmods" width="80" 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.00027 | $0.03439 |
| Opus 5.5 | $0.00011 | $0.01376 |
| Sonnet 5.5 | $0.00005 | $0.00688 |
| Haiku 4.5 | $0.00003 | $0.00344 |
Grade A, and why
r3f-performance 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 2mo 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.
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.
How it starts
The opening of the file, as written. The whole thing — 520 lines — stays where its author put it; the contents beside it link to each section on GitHub.
React Three Fiber Performance
When to Use
Use this skill when:
- Optimizing R3F applications for mobile
- Dealing with performance bottlenecks
- Rendering many objects (100+)
- Implementing adaptive quality
- Reducing frame drops and stuttering
Core Principles
- Measure First: Profile before optimizing
- React Optimization: Prevent unnecessary re-renders
- Three.js Optimization: Reduce draw calls, vertices
- Adaptive Quality: Scale down on low-end devices
- Lazy Loading: Load assets progressively
- Frame Budget: Stay under 16ms (60fps) or 33ms (30fps)
Implementation
1. React Memoization
// components/OptimizedComponents.tsx
import { memo, useMemo, useCallback } from 'react';
import * as THREE from 'three';
// Memoize expensive components
export const MemoizedBox = memo(function Box({
position,
color,
}: {
position: [number, number, number];
color: string;
}) {
// Memoize geometry (created once)
const geometry = useMemo(() => new THREE.BoxGeometry(1, 1, 1), []);
// Memoize material (recreated only when color changes)
const material = useMemo(
() => new THREE.MeshStandardMaterial({ color }),
[color]
);
return <mesh position={position} geometry={geometry} material={material} />;
});
// Custom comparison function
export const SmartMemoBox = memo(
function Box(props: { position: [number, number, number]; color: string }) {
const geometry = useMemo(() => new THREE.BoxGeometry(1, 1, 1), []);
const material = useMemo(
() => new THREE.MeshStandardMaterial({ color: props.color }),
[props.color]
);
return <mesh position={props.position} geometry={geometry} material={material} />;
},
(prev, next) => {
// Only re-render if color changes (ignore position changes)
return prev.color === next.color;
}
);
2. Instancing for Many Objects
// components/InstancedObjects.tsx
import { useRef, useMemo } from 'react';
import { useFrame } from '@react-three/fiber';
import { InstancedMesh, Object3D, Matrix4 } from 'three';
interface InstancedObjectsProps {
count: number;
spread: number;
}
export function InstancedObjects({ count, spread }: InstancedObjectsProps) {
const meshRef = useRef<InstancedMesh>(null);
// Initialize instances
const { positions, rotations, matrices } = useMemo(() => {
const positions = new Float32Array(count * 3);
const rotations = new Float32Array(count * 3);
const matrices: Matrix4[] = [];
const dummy = new Object3D();
for (let i = 0; i < count; i++) {
// Random positions
positions[i * 3] = (Math.random() - 0.5) * spread;
positions[i * 3 + 1] = (Math.random() - 0.5) * spread;
positions[i * 3 + 2] = (Math.random() - 0.5) * spread;
// Random rotations
rotations[i * 3] = Math.random() * Math.PI;
rotations[i * 3 + 1] = Math.random() * Math.PI;
rotations[i * 3 + 2] = Math.random() * Math.PI;
// Set matrix
dummy.position.set(
positions[i * 3],
positions[i * 3 + 1],
positions[i * 3 + 2]
);
dummy.rotation.set(
rotations[i * 3],
rotations[i * 3 + 1],
rotations[i * 3 + 2]
);
dummy.updateMatrix();
matrices.push(dummy.matrix.clone());
}
return { positions, rotations, matrices };
}, [count, spread]);
// Apply matrices on mount
useMemo(() => {
if (!meshRef.current) return;
matrices.forEach((matrix, i) => {
meshRef.current!.setMatrixAt(i, matrix);
});
meshRef.current.instanceMatrix.needsUpdate = true;
}, [matrices]);
// Animate (optional - remove if static)
useFrame((state, delta) => {
if (!meshRef.current) return;
const dummy = new Object3D();
for (let i = 0; i < count; i++) {
meshRef.current.getMatrixAt(i, dummy.matrix);
dummy.matrix.decompose(dummy.position, dummy.quaternion, dummy.scale);
// Rotate
rotations[i * 3 + 1] += delta * 0.5;
dummy.rotation.y = rotations[i * 3 + 1];
dummy.updateMatrix();
meshRef.current.setMatrixAt(i, dummy.matrix);
}
meshRef.current.instanceMatrix.needsUpdate = true;
});
return (
<instancedMesh ref={meshRef} args={[undefined, undefined, count]}>
<boxGeometry />
<meshStandardMaterial />
</instancedMesh>
);
}
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.
- 2mo ago First seen · 520 lines · 27 tokens per session scan A 8a76c8be29bc
r3f-performance is a skill published in the GitHub repository bullish0x/GameStudio (29 stars, last pushed 5mo ago), licensed MIT. It adds 27 tokens to every session and 3,439 once invoked, about $0.0001 per session on Opus 5.5. 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-09-03.
r3f-performance compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| r3f-performancebullish0x/GameStudio | Skill | 29 | 5mo ago | MIT | A | 27 | Claude Code |
| generic-react-ux-designertravisjneuman/.claude | Skill | 115 | yesterday | MIT | A | 69 | Claude Code |
| generic-react-feature-developertravisjneuman/.claude | Skill | 115 | yesterday | MIT | A | 53 | Claude Code |
| generic-react-code-reviewertravisjneuman/.claude | Skill | 115 | yesterday | MIT | A | 71 | Claude Code |
| generic-react-design-systemtravisjneuman/.claude | Skill | 115 | yesterday | MIT | A | 59 | Claude Code |
| ar-vr-xrtravisjneuman/.claude | Skill | 115 | yesterday | MIT | A | 50 | Claude Code |
| agent-react-experttravisjneuman/.claude | Skill | 115 | yesterday | MIT | A | 11 | Claude Code |