agentleFS
easyzoomeasyzoom/aix-skills/skills/low-power-debug/SKILL.md

low-power-debug

Skill36 starsChanged 5 months agoMITView on GitHub

Use when debugging embedded sleep, standby, deep sleep, wakeup, current consumption, clock gating, lost debug access, or low-power mode failures

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 6 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill to debug low-power behavior by measuring current and wake sources before changing sleep configuration.

    line 10
  2. Distinctive:

    Use this skill when:

    line 14
  3. Distinctive:

    Do not use this skill when the board cannot boot at all.

    line 20
  4. Distinctive:

    Check meter range, sampling rate, burden voltage, shunt placement, rails included, and whether debugger/USB is attached.

    line 36
  5. Distinctive:

    Verify the actual mode entered, not just the API called.

    line 42
  6. Distinctive:

    Read wake flags immediately after wake before clearing them.

    line 45

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Low Power Debug

Overview

Use this skill to debug low-power behavior by measuring current and wake sources before changing sleep configuration. Low-power bugs often involve board leakage, clocks, wake flags, debug settings, peripheral state, and firmware sequencing.

When To Use

Use this skill when:

  • Current consumption is too high or unexpectedly low.
  • The device fails to enter sleep, cannot wake, wakes immediately, or loses debug access.
  • The task involves sleep, stop, standby, deep sleep, retention RAM, wake pins, RTC, watchdog, clock gating, or PMIC sequencing.

Do not use this skill when the board cannot boot at all; establish basic boot first.

First Questions

Ask for:

  • Chip/board and intended low-power mode.
  • Measured current, expected current, and measurement setup.
  • Wake sources and whether wake flags are available.
  • Debug probe attached or detached during measurement.
  • Peripherals left enabled before sleep.
  • Power rails, external devices, pull-ups, and board revision.

Workflow

  1. Confirm measurement validity. Check meter range, sampling rate, burden voltage, shunt placement, rails included, and whether debugger/USB is attached.
  2. Separate firmware from board leakage. Measure baseline board state, external devices, pull-ups, LEDs, regulators, and sensors.
  3. Confirm intended sleep mode. Verify the actual mode entered, not just the API called.
  4. Capture wake reason. Read wake flags immediately after wake before clearing them.
  5. Disable peripherals methodically. Clocks, UART, ADC, timers, DMA, USB, radio, sensors, and pull configurations can dominate current.
  6. Protect debug access. Warn that deep sleep may disconnect SWD/JTAG. Use timed wake, GPIO heartbeat, or connect-under-reset recovery.

Checks

  • Debugger and semihosting disabled for current measurement.
  • Unused GPIO configured to safe states.
  • External pull-ups/pull-downs not causing leakage.
  • Regulator and sensor quiescent currents accounted for.
  • Wake pins polarity and pull state correct.
  • RTC/LPTIM/watchdog clock source active if used.
  • SRAM/retention domains configured intentionally.
  • Interrupt flags cleared before sleep and read after wake.

Verification

Before claiming progress:

  • State measured current, expected current, mode, and measurement setup.
  • State whether debugger/USB was connected.
  • Report actual wake source or wake flag evidence.
  • List peripherals and rails still enabled.
  • State recovery method if debug access may be lost.

Common Failures

  • Measuring through USB while claiming battery current.
  • Leaving the debugger attached and trusting sleep current.
  • Clearing wake flags before reading them.
  • Ignoring external sensors, pull-ups, LEDs, or regulators.
  • Entering a shallower sleep mode than intended because a peripheral clock is active.

Example

User:

进入低功耗后电流还有 5mA,预期几十微安。

Agent:

  1. Asks for mode, current setup, rails measured, debugger state, wake sources, and board peripherals.
  2. Separates board leakage from MCU sleep current.
  3. Checks enabled clocks, GPIO states, regulators, and wake flags before code changes.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.