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 agentmods add skills/bullish0x/gamestudio/battery-optimizationnpx skills add bullish0x/GameStudio --skill battery-optimizationgit 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/battery-optimization)<a href="https://agentmods.dev/skills/bullish0x/gamestudio/battery-optimization"><img src="https://agentmods.dev/badge/skills/bullish0x/gamestudio/battery-optimization.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.00019 | $0.04820 |
| Opus 5 | $0.00010 | $0.02410 |
| Sonnet 5 | $0.00004 | $0.00964 |
| Haiku 4.5 | $0.00002 | $0.00482 |
Grade A, and why
battery-optimization 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 2d 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 — 835 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Mobile Battery Optimization
When to Use
Use this skill when:
- Optimizing for mobile battery life
- Implementing adaptive quality systems
- Managing background behavior
- Reducing power consumption
- Handling device thermal throttling
- Creating power-efficient games
Core Principles
- Adaptive Quality: Scale based on power state
- Intelligent Throttling: Reduce updates when inactive
- Background Pause: Stop rendering when hidden
- Thermal Management: Detect and respond to heat
- Power Awareness: Monitor battery state
- Efficient Rendering: Minimize GPU/CPU usage
Battery Optimization Implementation
1. Power State Management
// power/PowerStateManager.ts
export enum PowerState {
High = 'high', // Plugged in, full quality
Normal = 'normal', // Good battery, normal quality
Low = 'low', // Low battery, reduced quality
Critical = 'critical', // Very low battery, minimal quality
}
export interface PowerMetrics {
batteryLevel: number; // 0-1
isCharging: boolean;
isSaveModeEnabled: boolean;
temperature?: number; // Device temperature if available
}
export class PowerStateManager {
private state: PowerState = PowerState.Normal;
private metrics: PowerMetrics = {
batteryLevel: 1,
isCharging: false,
isSaveModeEnabled: false,
};
private listeners = new Set<(state: PowerState) => void>();
constructor() {
this.initBatteryAPI();
this.initVisibilityAPI();
}
private async initBatteryAPI(): Promise<void> {
if ('getBattery' in navigator) {
try {
const battery = await (navigator as any).getBattery();
// Initial state
this.updateMetrics({
batteryLevel: battery.level,
isCharging: battery.charging,
});
// Listen for changes
battery.addEventListener('levelchange', () => {
this.updateMetrics({ batteryLevel: battery.level });
});
battery.addEventListener('chargingchange', () => {
this.updateMetrics({ isCharging: battery.charging });
});
} catch (error) {
console.warn('Battery API not available:', error);
}
}
}
private initVisibilityAPI(): void {
document.addEventListener('visibilitychange', () => {
if (document.hidden) {
this.onBackgrounded();
} else {
this.onForegrounded();
}
});
}
private updateMetrics(partial: Partial<PowerMetrics>): void {
Object.assign(this.metrics, partial);
this.updatePowerState();
}
private updatePowerState(): void {
const newState = this.calculatePowerState();
if (newState !== this.state) {
this.state = newState;
this.notifyListeners();
}
}
private calculatePowerState(): PowerState {
// Charging = high performance
if (this.metrics.isCharging) {
return PowerState.High;
}
// Battery-based states
if (this.metrics.batteryLevel < 0.1) {
return PowerState.Critical;
} else if (this.metrics.batteryLevel < 0.2) {
return PowerState.Low;
} else {
return PowerState.Normal;
}
}
private notifyListeners(): void {
for (const listener of this.listeners) {
listener(this.state);
}
}
private onBackgrounded(): void {
// Notify listeners that app is backgrounded
for (const listener of this.listeners) {
listener(PowerState.Critical); // Treat as critical to pause everything
}
}
private onForegrounded(): void {
// Resume normal power state
this.updatePowerState();
}
getPowerState(): PowerState {
return this.state;
}
getMetrics(): PowerMetrics {
return { ...this.metrics };
}
onStateChange(listener: (state: PowerState) => void): () => void {
this.listeners.add(listener);
return () => this.listeners.delete(listener);
}
}
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.
- 2d ago First seen · 835 lines · 19 tokens per session scan A f8bb1961c6b0
battery-optimization is a skill published in the GitHub repository bullish0x/GameStudio (10 stars, last pushed 2mo ago), licensed MIT. It adds 19 tokens to every session and 4,820 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.