nanopb-integrationlisted
Install: claude install-skill easyzoom/aix-skills
# nanopb Integration
## Overview
Use this skill to integrate nanopb by controlling schema size, generated options, callbacks, and buffer ownership. Embedded protobuf failures usually come from mismatched generated files, unbounded fields, or callback misuse.
## When To Use
Use this skill when:
- The user wants Protocol Buffers on an MCU using nanopb.
- The task involves `.proto`, `.options`, `nanopb_generator.py`, `pb_encode`, `pb_decode`, repeated fields, strings, bytes, callbacks, or fixed-size arrays.
- Encoding/decoding fails, messages are truncated, memory usage is too high, or host and device schemas mismatch.
Do not use this skill for general JSON/INI parsing. Use `embedded-data-parsing-libs` instead.
## First Questions
Ask for:
- nanopb version and how code generation runs.
- `.proto`, `.options`, generated `.pb.c/.pb.h`, and host-side schema version.
- Transport/storage where messages are sent.
- Max message size, RAM budget, and whether streaming decode is needed.
- Current encode/decode error and sample payload if available.
## Integration Checklist
1. Lock schema and generated files together.
Regenerate `.pb.c/.pb.h` whenever `.proto` or `.options` changes.
1. Bound variable fields.
Use nanopb options for max string, bytes, repeated field, or callback-based streaming.
1. Size buffers explicitly.
Know max encoded size and transport frame limits.
1. Check return values.
Always inspect `pb_encode`/`pb_decode` failure and error text.
1. Vali