mobile-performance

mobile-performance is a skill for Claude Code from bullish0x/GameStudio. It costs 26 tokens per session (3,297 once invoked), scanned A, original, MIT.

A guide to improving Three.js games on mobile devices by adjusting quality and workload to match each device.

In plain words
What is it for?
Use it for device detection, adaptive graphics quality, frame-rate control, thermal throttling, and battery-saving settings.
Why use it?
It helps avoid low frame rates, overheating, and excessive battery use across different phones and tablets.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: installed under .agents/ (shared by several agents).

Good fit Use it for device detection, adaptive graphics quality, frame-rate control, thermal throttling, and battery-saving settings.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/bullish0x/gamestudio/mobile-performance
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.

Any agent
npx skills add bullish0x/GameStudio --skill mobile-performance
Clone the repo
git clone --depth 1 https://github.com/bullish0x/GameStudio

Made for: Claude Code.

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 mobile-performance

README.md
[![agentmods](https://agentmods.dev/badge/skills/bullish0x/gamestudio/mobile-performance/github.svg)](https://agentmods.dev/skills/bullish0x/gamestudio/mobile-performance)
Your own site
<a href="https://agentmods.dev/skills/bullish0x/gamestudio/mobile-performance"><img src="https://agentmods.dev/badge/skills/bullish0x/gamestudio/mobile-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.

agentmods 80×15 button for mobile-performance

Your own site · 80×15
<a href="https://agentmods.dev/skills/bullish0x/gamestudio/mobile-performance"><img src="https://agentmods.dev/badge/skills/bullish0x/gamestudio/mobile-performance.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 26 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,297 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.00026 $0.03297
Opus 5 $0.00013 $0.01648
Sonnet 5 $0.00005 $0.00659
Haiku 4.5 $0.00003 $0.00330

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

Security

Grade A, and why

mobile-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 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.

.agents/skills/mobile-performance/SKILL.md · 525 lines

How it starts

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

Mobile Performance Optimization

When to Use

Use this skill when:

  • Building Three.js games for mobile devices
  • Optimizing existing games for mobile
  • Implementing adaptive quality settings
  • Dealing with thermal throttling
  • Reducing battery consumption

Core Principles

  1. Device Detection: Detect device capabilities and adjust accordingly
  2. Quality Scaling: Implement multiple quality presets
  3. Frame Rate Management: Adaptive FPS based on performance
  4. Thermal Awareness: Reduce load when device heats up
  5. Battery Optimization: Lower quality on battery power
  6. Progressive Enhancement: Start low, scale up if possible

Implementation

1. Device Detector

export interface DeviceCapabilities {
  tier: 'low' | 'medium' | 'high';
  gpu: string;
  maxTextureSize: number;
  supportsWebGL2: boolean;
  isMobile: boolean;
  isIOS: boolean;
  isAndroid: boolean;
  memory: number; // GB
  cores: number;
  pixelRatio: number;
}

export class DeviceDetector {
  private capabilities: DeviceCapabilities;

  constructor() {
    this.capabilities = this.detect();
  }

  private detect(): DeviceCapabilities {
    const canvas = document.createElement('canvas');
    const gl = canvas.getContext('webgl2') || canvas.getContext('webgl');

    if (!gl) {
      throw new Error('WebGL not supported');
    }

    const debugInfo = gl.getExtension('WEBGL_debug_renderer_info');
    const gpu = debugInfo
      ? gl.getParameter(debugInfo.UNMASKED_RENDERER_WEBGL)
      : 'Unknown';

    const maxTextureSize = gl.getParameter(gl.MAX_TEXTURE_SIZE);
    const supportsWebGL2 = !!canvas.getContext('webgl2');

    // Device detection
    const ua = navigator.userAgent.toLowerCase();
    const isMobile = /mobile|android|iphone|ipad|ipod/.test(ua);
    const isIOS = /iphone|ipad|ipod/.test(ua);
    const isAndroid = /android/.test(ua);

    // Memory estimation (GB)
    const memory = (navigator as any).deviceMemory || this.estimateMemory(gpu);

    // CPU cores
    const cores = navigator.hardwareConcurrency || 4;

    // Pixel ratio (cap at 2 for performance)
    const pixelRatio = Math.min(window.devicePixelRatio, 2);

    // Determine device tier
    const tier = this.calculateTier(gpu, memory, cores, isMobile);

    return {
      tier,
      gpu,
      maxTextureSize,
      supportsWebGL2,
      isMobile,
      isIOS,
      isAndroid,
      memory,
      cores,
      pixelRatio,
    };
  }

  private estimateMemory(gpu: string): number {
    const gpuLower = gpu.toLowerCase();

    // High-end
    if (/adreno 6|mali-g7|apple a1[2-9]|m[1-9]/.test(gpuLower)) {
      return 6;
    }

    // Mid-range
    if (/adreno 5|mali-g5|apple a[9-11]/.test(gpuLower)) {
      return 4;
    }

    // Low-end
    return 2;
  }

  private calculateTier(
    gpu: string,
    memory: number,
    cores: number,
    isMobile: boolean
  ): 'low' | 'medium' | 'high' {
    const gpuLower = gpu.toLowerCase();

    // High-end devices
    if (
      memory >= 6 &&
      cores >= 6 &&
      (/adreno 6|mali-g7|apple a1[2-9]|m[1-9]|rtx|radeon rx/.test(gpuLower))
    ) {
      return 'high';
    }

    // Low-end devices
    if (
      memory <= 2 ||
      cores <= 4 ||
      /adreno [2-4]|mali-[4-5]|apple a[6-8]/.test(gpuLower)
    ) {
      return 'low';
    }

    // Medium by default
    return 'medium';
  }

  getCapabilities(): DeviceCapabilities {
    return this.capabilities;
  }

  getTier(): 'low' | 'medium' | 'high' {
    return this.capabilities.tier;
  }
}

Read the full file on GitHub · 525 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. 6d ago First seen · 525 lines · 26 tokens per session scan A b85ba6097292

Subscribe to this mod's changes

mobile-performance is a skill published in the GitHub repository bullish0x/GameStudio (12 stars, last pushed 2mo ago), licensed MIT. It adds 26 tokens to every session and 3,297 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.