8051-mcu-debug
Use when debugging 8051-compatible microcontrollers, 51 MCU firmware, STC download issues, Keil C51 projects, interrupts, timers, UART, or startup failures
Use when integrating, refactoring, or debugging PLOOC object-oriented C - def_class encapsulation, private_member protection, vtable dispatch, or inheritance-style structs
$ npx -y skills add easyzoom/aix-skills --skill plooc-integration --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/plooc-integrationContext preview
The summary Claude sees to decide when to auto-load this skill.
Use when integrating, refactoring, or debugging PLOOC object-oriented C - def_class encapsulation, private_member protection, vtable dispatch, or inheritance-style structs
name: plooc-integration description: Use when integrating, refactoring, or debugging PLOOC object-oriented C - def_class encapsulation, private_member protection, vtable dispatch, or inheritance-style structs
Use this skill when PLOOC (Protected Low-overhead Object-Oriented Programming with ANSI-C, by GorgonMeducer) is used to structure embedded C code. PLOOC mimics classes with masked structures: outside the class `.c` file, `private_member`/`protected_member` regions appear as an opaque byte array, so the real work is getting the per-file `__<NAME>_CLASS_IMPLEMENT`/`__<NAME>_CLASS_INHERIT__` guards, member visibility, and vtable/interface dispatch correct. Apply it only where object-style boundaries reduce real complexity.
Use this skill when:
Do not use this skill for simple drivers where plain C structs and functions are clearer.
Ask for:
1. Set up the header guard pattern. In the class header, map the module macro to the framework macro before including `plooc_class.h`, e.g. `#if defined(__BYTE_QUEUE_CLASS_IMPLEMENT) # define __PLOOC_CLASS_IMPLEMENT__ #elif defined(__BYTE_QUEUE_CLASS_INHERIT__) # define __PLOOC_CLASS_INHERIT__ #endif`.
2. Declare then define the class. Use `dcl_class(foo_t)` / `declare_class(foo_t)` (expands to `typedef struct foo_t foo_t;`), then `def_class(foo_t, ...)` ... `end_def_class(foo_t)`. Group members with `public_member(...)`, `protected_member(...)`, `private_member(...)` (any order allowed).
3. Define the implement macro in exactly one `.c` file. The class `.c` does `#define __BYTE_QUEUE_CLASS_IMPLEMENT` before `#include "./byte_queue.h"`, so only that file sees real private members; every other translation unit sees the masked byte array.
4. Access `this` inside methods correctly. Use `class_internal(ptObj, ptThis, foo_t)` to obtain the typed `ptThis`, and the `#define this (*ptThis)` convention for member access. Mark unused args with `PLOOC_UNUSED_PARAM`.
5. Handle inheritance explicitly. Embed a base with `implement(base_t)` in the derived `def_class`; the framework generates a `use_as__<base>` member for the embedded base. Define `__<NAME>_CLASS_INHERIT__` in a consumer that only needs to read the base's protected members. Access base functionality by passing the address of the `use_as__<base>` member to the base-class functions.
6. Keep dispatch inspectable. Define vtables with `def_interface(i_foo_t)` ... `end_def_interface(i_foo_t)` and a single const interface instance; verify each function pointer is assigned.
Before claiming PLOOC integration works:
User:
想用 PLOOC 重构几个传感器驱动。
Agent:
1. Asks the PLOOC version, C standard, and whether the sensors share a base class needing `implement()`. 1. Migrates one sensor family: `dcl_class`/`def_class` with `private_member`/`public_member`, sets `__<NAME>_CLASS_IMPLEMENT` in one `.c`, exposes ops via `def_interface`. 1. Verifies `sizeof` mask consistency, vtable wiring, and that private members are inspectable under `__OOC_DEBUG__`.
AIX Skills is a public collection of Agent Skills, templates, and references for building repeatable AI workflows.
Use when debugging 8051-compatible microcontrollers, 51 MCU firmware, STC download issues, Keil C51 projects, interrupts, timers, UART, or startup failures
Use when integrating, evaluating, configuring, or debugging Avem embedded C framework modules, event-driven components, drivers, middleware, or application…
Use when integrating or debugging Li-ion charger/fuel gauge ICs (BQ24295, BQ27441, MAX17048) over I2C, covering charge start, watchdog host mode, NTC/JEITA…
Use when integrating, designing, or debugging BLE GATT services, characteristics, descriptors, MTU, notifications, indications, pairing, connection parameters,…
Use when debugging embedded bootloaders, application jumps, vector table offsets, firmware upgrade flow, OTA state, image validation, rollback, or boot…
Use when integrating, porting, configuring, or debugging CAN bus libraries, CANBus-Triple, MCP2515, CAN frames, bit timing, filters, or embedded automotive…