$npx -y skills add easyzoom/aix-skills --skill embedded-framework-libsUse when integrating, evaluating, configuring, or debugging embedded C framework libraries such as PLOOC, Avem, or PowerManagement
| 1 | # Embedded Framework Libs |
| 2 | |
| 3 | ## Overview |
| 4 | |
| 5 | Use this skill for framework-style embedded libraries that shape project architecture rather than one feature. Cover PLOOC, Avem, PowerManagement, and similar libraries by focusing on ownership, lifecycle, configuration, coupling, and migration risk. |
| 6 | |
| 7 | ## When To Use |
| 8 | |
| 9 | Use this skill when: |
| 10 | |
| 11 | - The user wants to add or evaluate PLOOC, Avem, PowerManagement, or a similar embedded framework. |
| 12 | - The task involves object-oriented C patterns, module architecture, power-management framework integration, lifecycle hooks, or broad project restructuring. |
| 13 | - The user is unsure whether a framework is appropriate for a small MCU project. |
| 14 | |
| 15 | Do not use this skill for small single-purpose utility libraries that can be integrated locally without architecture impact. |
| 16 | |
| 17 | ## First Questions |
| 18 | |
| 19 | Ask for: |
| 20 | |
| 21 | - Library/framework name and source. |
| 22 | - Existing project architecture and target MCU/RTOS. |
| 23 | - Problem the framework is meant to solve. |
| 24 | - Code size, RAM, timing, safety, and team familiarity constraints. |
| 25 | - Whether this is greenfield, migration, or partial adoption. |
| 26 | |
| 27 | ## Integration Checklist |
| 28 | |
| 29 | 1. Validate need. |
| 30 | Confirm the framework solves a real recurring problem and is not added for style alone. |
| 31 | |
| 32 | 1. Define boundary. |
| 33 | Decide which modules use the framework and which remain plain C. |
| 34 | |
| 35 | 1. Check lifecycle. |
| 36 | Init, start, stop, suspend, resume, and deinit order must be explicit. |
| 37 | |
| 38 | 1. Keep platform hooks isolated. |
| 39 | Hardware, RTOS, allocator, timebase, and logging hooks should not leak across application modules. |
| 40 | |
| 41 | 1. Migrate incrementally. |
| 42 | Wrap one small module first and verify behavior before broad adoption. |
| 43 | |
| 44 | ## Common Failures |
| 45 | |
| 46 | - Applying an OOP-in-C framework to every file and increasing complexity. |
| 47 | - Hidden dynamic allocation in a no-heap project. |
| 48 | - Power-management hooks conflict with drivers or RTOS idle. |
| 49 | - Initialization order becomes implicit and fragile. |
| 50 | - Framework abstractions hide timing-critical hardware operations. |
| 51 | |
| 52 | ## Verification |
| 53 | |
| 54 | Before claiming framework integration works: |
| 55 | |
| 56 | - State the specific problem solved and the modules in scope. |
| 57 | - Confirm init/lifecycle order and platform hooks. |
| 58 | - Confirm code size/RAM impact if relevant. |
| 59 | - Confirm one migrated module works and rollback is possible. |
| 60 | |
| 61 | ## Example |
| 62 | |
| 63 | User: |
| 64 | |
| 65 | ```text |
| 66 | 想在老项目里引入 PLOOC 整理模块。 |
| 67 | ``` |
| 68 | |
| 69 | Agent: |
| 70 | |
| 71 | 1. Asks what module complexity PLOOC should solve and which modules are in scope. |
| 72 | 1. Recommends one pilot module instead of whole-project migration. |
| 73 | 1. Verifies code size, init order, and whether the abstraction improves testing/debugging. |