{"id":"156fffb1-911e-45d9-b048-ac5d6182bb33","shortId":"sdKfgj","kind":"skill","title":"power-performance","tagline":"Power management and performance optimization for Zephyr RTOS. Covers system power states (Idle, Suspend, Off), device-level power management, residency hooks, and code/data relocation for speed efficiency. Trigger when optimizing battery life, reducing latency, or managing memor","description":"# Zephyr Power & Performance\n\nMaximize the efficiency of your embedded system by balancing power consumption and computational performance.\n\n## Core Workflows\n\n### 1. Power Management (PM)\nImplement system-level and peripheral-specific power saving strategies.\n- **Reference**: **[power_management.md](references/power_management.md)**\n- **Key Tools**: `pm_device_action_run`, `pm_state_set`, Residency hooks.\n\n### 2. Performance Tuning\nOptimize critical code paths and monitor system resources.\n- **Reference**: **[performance_tuning.md](references/performance_tuning.md)**\n- **Key Tools**: `CONFIG_THREAD_ANALYZER`, Linker Map, Code relocation.\n\n### 3. Memory Optimization\nRelocate code and data to utilize the fastest memory available.\n- **Reference**: **[performance_tuning.md](references/performance_tuning.md#code--data-relocation)**\n- **Key Tools**: `__ramfunc`, Relocation scripts.\n\n## Quick Start (Device Suspend)\n```c\n#include <zephyr/pm/device.h>\n\nconst struct device *spi0 = DEVICE_DT_GET(DT_NODELABEL(spi0));\n\nvoid sleep_spi(void) {\n    pm_device_action_run(spi0, PM_DEVICE_ACTION_SUSPEND);\n}\n```\n\n## Professional Patterns (Optimization)\n- **Aggressive Suspend**: Transition peripherals to low-power states as soon as their transaction is complete.\n- **ITCM/DTCM**: Use Tightly Coupled Memory for time-critical control loops to avoid Flash latency.\n- **Runtime Monitoring**: Always enable the thread analyzer during development to find the \"RAM floor\" for your application.\n- **Coordinated Sleep**: To coordinate sleep across modules, see **[kernel-services](../kernel-services/SKILL.md)** for Zbus-based event-driven power management.\n\n## Automation Tools\n- **[power_budget_estimator.py](scripts/power_budget_estimator.py)**: Estimate average current and battery life from duty-cycle state data.\n\n## Examples & Templates\n- **[power_budget_template.csv](assets/power_budget_template.csv)**: Starter power-state budget sheet for battery-life estimation.\n\n## Validation Checklist\n- [ ] Target peripherals enter and exit suspend/resume states without functional regressions.\n- [ ] Measured idle and active power align with expected optimization deltas.\n- [ ] Thread analyzer and map data confirm stack/RAM budgets are within limits.\n- [ ] Relocated time-critical functions execute from intended memory region.\n\n## Resources\n\n- **[References](references/)**:\n  - `power_management.md`: System states, device PM, and hooks.\n  - `performance_tuning.md`: Optimization strategies and relocation.\n- **[Scripts](scripts/)**:\n  - `power_budget_estimator.py`: Duty-cycle based battery-life estimator.\n- **[Assets](assets/)**:\n  - `power_budget_template.csv`: Initial state/current budget template.","tags":["power","performance","zephyr","agent","skills","beriberikix","agent-skills","agentic-coding","zephyr-rtos"],"capabilities":["skill","source-beriberikix","skill-power-performance","topic-agent-skills","topic-agentic-coding","topic-zephyr-rtos"],"categories":["zephyr-agent-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/beriberikix/zephyr-agent-skills/power-performance","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add beriberikix/zephyr-agent-skills","source_repo":"https://github.com/beriberikix/zephyr-agent-skills","install_from":"skills.sh"}},"qualityScore":"0.462","qualityRationale":"deterministic score 0.46 from registry signals: · indexed on github topic:agent-skills · 25 github stars · SKILL.md body (2,698 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-04-24T07:01:42.650Z","embedding":null,"createdAt":"2026-04-18T23:05:00.702Z","updatedAt":"2026-04-24T07:01:42.650Z","lastSeenAt":"2026-04-24T07:01:42.650Z","tsv":"'/kernel-services/skill.md':230 '1':61 '2':90 '3':113 'across':224 'action':83,161,166 'activ':286 'aggress':171 'align':288 'alway':204 'analyz':108,208,294 'applic':218 'asset':340,341 'assets/power_budget_template.csv':259 'autom':240 'avail':125 'averag':245 'avoid':199 'balanc':53 'base':234,335 'batteri':35,248,268,337 'battery-lif':267,336 'budget':264,300,345 'c':142 'checklist':272 'code':95,111,117,129 'code/data':27 'complet':186 'comput':57 'config':106 'confirm':298 'const':145 'consumpt':55 'control':196 'coordin':219,222 'core':59 'coupl':190 'cover':12 'critic':94,195,307 'current':246 'cycl':253,334 'data':119,131,255,297 'data-reloc':130 'delta':292 'develop':210 'devic':20,82,140,147,149,160,165,320 'device-level':19 'driven':237 'dt':150,152 'duti':252,333 'duty-cycl':251,332 'effici':31,47 'embed':50 'enabl':205 'enter':275 'estim':244,270,339 'event':236 'event-driven':235 'exampl':256 'execut':309 'exit':277 'expect':290 'fastest':123 'find':212 'flash':200 'floor':215 'function':281,308 'get':151 'hook':25,89,323 'idl':16,284 'implement':65 'includ':143 'initi':343 'intend':311 'itcm/dtcm':187 'kernel':228 'kernel-servic':227 'key':79,104,133 'latenc':38,201 'level':21,68 'life':36,249,269,338 'limit':303 'linker':109 'loop':197 'low':177 'low-pow':176 'manag':5,23,40,63,239 'map':110,296 'maxim':45 'measur':283 'memor':41 'memori':114,124,191,312 'modul':225 'monitor':98,203 'nodelabel':153 'optim':8,34,93,115,170,291,325 'path':96 'pattern':169 'perform':3,7,44,58,91 'performance_tuning.md':102,127,324 'peripher':71,174,274 'peripheral-specif':70 'pm':64,81,85,159,164,321 'power':2,4,14,22,43,54,62,73,178,238,262,287 'power-perform':1 'power-st':261 'power_budget_estimator.py':242,331 'power_budget_template.csv':258,342 'power_management.md':77,317 'profession':168 'quick':138 'ram':214 'ramfunc':135 'reduc':37 'refer':76,101,126,315,316 'references/performance_tuning.md':103,128 'references/power_management.md':78 'region':313 'regress':282 'reloc':28,112,116,132,136,304,328 'resid':24,88 'resourc':100,314 'rtos':11 'run':84,162 'runtim':202 'save':74 'script':137,329,330 'scripts/power_budget_estimator.py':243 'see':226 'servic':229 'set':87 'sheet':265 'skill' 'skill-power-performance' 'sleep':156,220,223 'soon':181 'source-beriberikix' 'specif':72 'speed':30 'spi':157 'spi0':148,154,163 'stack/ram':299 'start':139 'starter':260 'state':15,86,179,254,263,279,319 'state/current':344 'strategi':75,326 'struct':146 'suspend':17,141,167,172 'suspend/resume':278 'system':13,51,67,99,318 'system-level':66 'target':273 'templat':257,346 'thread':107,207,293 'tight':189 'time':194,306 'time-crit':193,305 'tool':80,105,134,241 'topic-agent-skills' 'topic-agentic-coding' 'topic-zephyr-rtos' 'transact':184 'transit':173 'trigger':32 'tune':92 'use':188 'util':121 'valid':271 'void':155,158 'within':302 'without':280 'workflow':60 'zbus':233 'zbus-bas':232 'zephyr':10,42 'zephyr/pm/device.h':144","prices":[{"id":"5660bd3e-e3c8-43b3-9536-da2238d57256","listingId":"156fffb1-911e-45d9-b048-ac5d6182bb33","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"beriberikix","category":"zephyr-agent-skills","install_from":"skills.sh"},"createdAt":"2026-04-18T23:05:00.702Z"}],"sources":[{"listingId":"156fffb1-911e-45d9-b048-ac5d6182bb33","source":"github","sourceId":"beriberikix/zephyr-agent-skills/power-performance","sourceUrl":"https://github.com/beriberikix/zephyr-agent-skills/tree/main/skills/power-performance","isPrimary":false,"firstSeenAt":"2026-04-18T23:05:00.702Z","lastSeenAt":"2026-04-24T07:01:42.650Z"}],"details":{"listingId":"156fffb1-911e-45d9-b048-ac5d6182bb33","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"beriberikix","slug":"power-performance","github":{"repo":"beriberikix/zephyr-agent-skills","stars":25,"topics":["agent-skills","agentic-coding","zephyr-rtos"],"license":"apache-2.0","html_url":"https://github.com/beriberikix/zephyr-agent-skills","pushed_at":"2026-04-20T21:40:18Z","description":"A complete catalog of Agent Skills (agentskills.io) for Zephyr RTOS development.","skill_md_sha":"75786e5747744bb54f6803562d75877f8e69fc0d","skill_md_path":"skills/power-performance/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/beriberikix/zephyr-agent-skills/tree/main/skills/power-performance"},"layout":"multi","source":"github","category":"zephyr-agent-skills","frontmatter":{"name":"power-performance","description":"Power management and performance optimization for Zephyr RTOS. Covers system power states (Idle, Suspend, Off), device-level power management, residency hooks, and code/data relocation for speed efficiency. Trigger when optimizing battery life, reducing latency, or managing memory constraints."},"skills_sh_url":"https://skills.sh/beriberikix/zephyr-agent-skills/power-performance"},"updatedAt":"2026-04-24T07:01:42.650Z"}}