Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/bullish0x/GameStudionpx agentmods add skills/bullish0x/gamestudio/r3f-mobile-patternsWrote 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-mobile-patterns)<a href="https://agentmods.dev/skills/bullish0x/gamestudio/r3f-mobile-patterns"><img src="https://agentmods.dev/badge/skills/bullish0x/gamestudio/r3f-mobile-patterns/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-mobile-patterns"><img src="https://agentmods.dev/badge/skills/bullish0x/gamestudio/r3f-mobile-patterns.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.00026 | $0.05291 |
| Opus 5 | $0.00013 | $0.02645 |
| Sonnet 5 | $0.00005 | $0.01058 |
| Haiku 4.5 | $0.00003 | $0.00529 |
Grade A, and why
r3f-mobile-patterns 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 6d 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 — 789 lines — stays where its author put it; the contents beside it link to each section on GitHub.
React Three Fiber Mobile Patterns
When to Use
Use this skill when:
- Building mobile-first R3F games
- Implementing touch-based 3D controls
- Adapting quality for mobile devices
- Optimizing battery life
- Creating responsive 3D layouts
Core Principles
- Mobile First: Design for mobile, enhance for desktop
- Touch Optimized: Gestures over mouse events
- Adaptive Quality: Scale based on device capabilities
- Battery Aware: Reduce work when battery is low
- Responsive: Adapt to screen size and orientation
- Progressive Enhancement: Core experience on all devices
Implementation
1. Device Detection Hook
// hooks/useDeviceCapabilities.ts
import { useState, useEffect } from 'react';
export interface DeviceCapabilities {
isMobile: boolean;
isTablet: boolean;
isLowEnd: boolean;
hasTouchScreen: boolean;
pixelRatio: number;
gpuTier: 'low' | 'medium' | 'high';
maxTextureSize: number;
screenWidth: number;
screenHeight: number;
orientation: 'portrait' | 'landscape';
batteryLevel?: number;
isCharging?: boolean;
}
export function useDeviceCapabilities(): DeviceCapabilities {
const [capabilities, setCapabilities] = useState<DeviceCapabilities>(() => ({
isMobile: /iPhone|iPad|iPod|Android/i.test(navigator.userAgent),
isTablet: /iPad|Android/i.test(navigator.userAgent) && window.innerWidth >= 768,
isLowEnd: navigator.hardwareConcurrency ? navigator.hardwareConcurrency <= 4 : true,
hasTouchScreen: 'ontouchstart' in window || navigator.maxTouchPoints > 0,
pixelRatio: Math.min(window.devicePixelRatio || 1, 2),
gpuTier: 'medium',
maxTextureSize: 2048,
screenWidth: window.innerWidth,
screenHeight: window.innerHeight,
orientation: window.innerWidth > window.innerHeight ? 'landscape' : 'portrait',
}));
useEffect(() => {
// Detect GPU tier (simplified)
const canvas = document.createElement('canvas');
const gl = canvas.getContext('webgl') || canvas.getContext('experimental-webgl');
if (gl) {
const debugInfo = gl.getExtension('WEBGL_debug_renderer_info');
const renderer = debugInfo
? gl.getParameter(debugInfo.UNMASKED_RENDERER_WEBGL)
: '';
const maxTexSize = gl.getParameter(gl.MAX_TEXTURE_SIZE);
let gpuTier: 'low' | 'medium' | 'high' = 'medium';
if (/Mali-4|Adreno \(TM\) 3|PowerVR SGX/i.test(renderer)) {
gpuTier = 'low';
} else if (/Apple A1[2-9]|Adreno \(TM\) [67]|Mali-G7/i.test(renderer)) {
gpuTier = 'high';
}
setCapabilities((prev) => ({
...prev,
gpuTier,
maxTextureSize: maxTexSize,
}));
}
// Battery API
if ('getBattery' in navigator) {
(navigator as any).getBattery().then((battery: any) => {
const updateBattery = () => {
setCapabilities((prev) => ({
...prev,
batteryLevel: battery.level,
isCharging: battery.charging,
}));
};
updateBattery();
battery.addEventListener('levelchange', updateBattery);
battery.addEventListener('chargingchange', updateBattery);
});
}
// Orientation changes
const handleResize = () => {
setCapabilities((prev) => ({
...prev,
screenWidth: window.innerWidth,
screenHeight: window.innerHeight,
orientation: window.innerWidth > window.innerHeight ? 'landscape' : 'portrait',
}));
};
window.addEventListener('resize', handleResize);
window.addEventListener('orientationchange', handleResize);
return () => {
window.removeEventListener('resize', handleResize);
window.removeEventListener('orientationchange', handleResize);
};
}, []);
return capabilities;
}
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.
- 6d ago First seen · 789 lines · 26 tokens per session scan A e26900f7cc6a
r3f-mobile-patterns is a skill published in the GitHub repository bullish0x/GameStudio (11 stars, last pushed 2mo ago), licensed MIT. It adds 26 tokens to every session and 5,291 once invoked, about $0.0001 per session on Opus 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.
Other skills, from other repositories
android-development
Android development with Kotlin, Jetpack Compose, and modern Android architecture. Use when building Android apps, implementing Material Design, or following Android best practices.
flutter-development
Cross-platform development with Flutter and Dart for iOS, Android, Web, Desktop, and embedded. Use when building Flutter apps, implementing Material/Cupertino design, or optimizing Dart code.
game-development
Game development with Unity, Unreal Engine, and Godot. Use when building games, implementing game mechanics, physics, AI, or working with game engines.
ios-development
Comprehensive guide for building native Apple platform applications.
kotlin-multiplatform
KMP/CMP shared business logic, Compose Multiplatform, expect/actual, Ktor, SQLDelight, and platform-specific implementations. Use when building cross-platform Kotlin applications for Android, iOS, desktop, or web.
ar-vr-xr
AR/VR/XR development with Unity XR, WebXR, ARKit, ARCore, Meta Quest SDK, and spatial computing. Use when building augmented reality, virtual reality, mixed reality applications, or spatial experiences.