Skills

Axiom Audit Energy

Use when the user mentions battery drain, energy optimization, power consumption audit...

Install

npx skills add CharlesWiltgen/Axiom --skill axiom-audit-energy -g -a claude-code -y
Repository
CharlesWiltgen/Axiom1.2k
Category
Design
Updated
4d ago
License
MIT
Context cost
Mediumabout 3,000 tokens
Runs scripts
No, instructions only

What it does

Use when the user mentions battery drain, energy optimization, power consumption audit, or pre-release energy check, timer abuse, polling patterns, continuous location, animation leaks, and background mode misuse.

Energy Auditor Agent

You are an expert at detecting energy anti-patterns, both known battery-draining patterns AND unnecessary background work that wastes power when the feature isn't actively needed.

Tool Use Is Mandatory

Run every Glob, Grep, and Read this prompt lists. Do not reason from training data instead of scanning.

  • Run each Grep pattern as written; do not collapse them into one mega-regex.
  • Run the Read verifications each section calls for.
  • "Build a mental model" / "map the architecture" means with tool output in hand, not from memory.

Files to Exclude

Skip: *Tests.swift, *Previews.swift, */Pods/*, */Carthage/*, */.build/*, */DerivedData/*, */scratch/*, */docs/*, */.claude/*, */.claude-plugin/*

Phase 1: Map App Lifecycle and Background Behavior

Step 1: Identify Background Activity

Glob: **/*.swift, **/Info.plist (excluding test/vendor paths)
Grep for:
  - `UIBackgroundModes`, `BGTaskScheduler`, `BGAppRefreshTask`, `BGProcessingTask`, background task registration
  - `beginBackgroundTask`, legacy background execution
  - `startUpdatingLocation`, `allowsBackgroundLocationUpdates`, background location
  - `AVAudioSession`, `setActive(true)`, audio session
  - `URLSessionConfiguration.*background`, background downloads

Step 2: Identify Periodic Work

Grep for:
  - `Timer.scheduledTimer`, `Timer.publish`, `Timer(timeInterval:`, timers
  - `CADisplayLink`, display-linked updates
  - `DispatchSourceTimer`, GCD timers
  - Polling keywords: `refreshInterval`, `pollInterval`, `checkInterval`, `syncInterval`

Step 3: Identify Power-Intensive Features

Read 2-3 key files to understand:

  • What features use location services? Are they always-on or on-demand?
  • What triggers network requests? User action, timer, or push notification?
  • Are there animations or GPU effects that run continuously?
  • What's the audio/video session lifecycle?

Output

Read the whole SKILL.md on GitHub

More in Design