battery-stats
Skill1 starsChanged 3 months agoMITView on GitHub
Check macOS laptop battery telemetry, current power drain, average watt usage, battery health, cycle count, and recent real-world battery runtime from local pmset/ioreg/system_profiler data. Use ONLY when the user explicitly invokes this skill by name. Never trigger it automatically.
In this repository13 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- ask-claudeSkill
- coding-audit-assumptionsSkill
- coding-consult-designSkill
- coding-explain-problemSkill
- handoffSkill
- ntd-tasksSkill
- one-by-oneSkill
- record-macos-windowSkill
- show-meSkill
- tallySkill
- video-analysisSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
17 rules. About 0 are common, 9 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
Use this skill to answer battery-status questions directly from the local Mac.
- Distinctive: line 14
Run the bundled script from this skill directory:
- Distinctive: line 20
Use JSON when another tool or follow-up calculation needs structured data:
- Very specific: line 30
Read the Current Battery section first:
- Very specific: line 34
Read the Health section:
- Distinctive: line 35
Prefer health calculated from nominal capacity divided by design capacity.
- Very specific: line 38
Prefer the human Screen-on weighted full runtime line, or runtime.screen_on_robust.weighted_full_runtime in JSON, for "how long does the …
- Very specific: line 39
Treat the human Wall-clock battery runtime including sleep line, or runtime.wall_clock_usable.weighted_full_runtime in JSON, as …
- Distinctive: line 40
If the current discharge session is included, call it provisional.
- Very specific: line 42
Use Average screen-on draw, or screen_on_robust.weighted_avg_power_w in JSON, as the best single number for typical watts during real …
- Very specific: line 43
Use Median session draw and Typical range (25-75%) to describe normal variation.
- Very specific: line 44
Use Heavier sessions (90%) and Session draw range to describe heavier workloads without overreacting to one noisy session.
- Very specific: line 45
Prefer the longer stored history when available.
- Distinctive: line 51
Do not overstate precision.
- Distinctive: line 52
When current macOS "time remaining" and wattage-derived projections differ, explain that both are estimates and current drain changes …
- Distinctive: line 55
Do not include battery serial numbers or other hardware identifiers unless the user explicitly asks for them.
- Distinctive: line 56
If recent history has too few meaningful discharge sessions, say that the average is not reliable and fall back to the current macOS …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Battery Stats
Use this skill to answer battery-status questions directly from the local Mac. Do not ask the user to run commands unless they explicitly want the commands.
Quick Start
Run the bundled script from this skill directory:
python3 scripts/battery-stats.pyUse JSON when another tool or follow-up calculation needs structured data:
python3 scripts/battery-stats.py --jsonWorkflow
- Confirm the current machine is macOS. If
pmset,ioreg, orsystem_profileris missing, report that the skill only supports macOS battery telemetry. - Run
scripts/battery-stats.py. - Read the
Current Batterysection first:current_drain_wis the current whole-battery drain in watts, computed from battery voltage and amperage.battery_power_telemetry_wis the battery telemetry rail when available. Treat it as secondary because it can diverge from the direct voltage/current reading.- These values are instantaneous and can move quickly with CPU, display brightness, network, browser, and background work.
- Read the
Healthsection:- Prefer health calculated from nominal capacity divided by design capacity.
- Include cycle count and macOS condition when available.
- Read the
Runtime Estimatesection:- Prefer the human
Screen-on weighted full runtimeline, orruntime.screen_on_robust.weighted_full_runtimein JSON, for "how long does the battery last during use?" - Treat the human
Wall-clock battery runtime including sleepline, orruntime.wall_clock_usable.weighted_full_runtimein JSON, as standby-inclusive context because it includes sleep and maintenance wakes. - If the current discharge session is included, call it provisional.
- Prefer the human
- Read the
Power Usage Estimatesection:- Use
Average screen-on draw, orscreen_on_robust.weighted_avg_power_win JSON, as the best single number for typical watts during real screen-on use. - Use
Median session drawandTypical range (25-75%)to describe normal variation. - Use
Heavier sessions (90%)andSession draw rangeto describe heavier workloads without overreacting to one noisy session. - Prefer the longer stored history when available; otherwise use the regular
pmsethistory.
- Use
- Answer with concrete numbers and a short interpretation. Include the log span so the user knows what period the average covers.
Interpretation Rules
- macOS does not provide a Windows-style generated
batteryreport; the useful local sources arepmset -g batt,ioreg -rn AppleSmartBattery -r,system_profiler SPPowerDataType, andpmset -g log. - Do not overstate precision. Report current drain to about one decimal watt and runtime to the nearest 5-15 minutes.
- When current macOS "time remaining" and wattage-derived projections differ, explain that both are estimates and current drain changes second by second.
- Explain average watt usage as an estimate derived from observed battery-percent drop, elapsed screen-on time, and current usable battery energy in Wh. It is useful for describing the user's real workflow, not for hardware benchmarking.
- A good wording pattern is: "During real screen-on use, this Mac averages about X W. Normal sessions are roughly A-B W, heavier sessions are around C W, and that lines up with about Y hours of practical runtime."
- Do not include battery serial numbers or other hardware identifiers unless the user explicitly asks for them.
- If recent history has too few meaningful discharge sessions, say that the average is not reliable and fall back to the current macOS estimate plus health and drain.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

