nanopb-integration
Skill36 starsChanged 5 months agoMITView on GitHub
Use when integrating, porting, configuring, or debugging nanopb Protocol Buffers, .proto generation, pb_encode, pb_decode, callbacks, fixed sizes, or embedded serialization
In this repository75 other files it gives its agents.
- 8051-mcu-debugSkill
- avem-integrationSkill
- battery-charger-fuel-gauge-integrationSkill
- ble-gatt-integrationSkill
- bootloader-debugSkill
- canbus-integrationSkill
- canopen-integrationSkill
- cellular-at-modem-integrationSkill
- cmbacktrace-integrationSkill
- cmsis-dsp-integrationSkill
- cortex-m-debugSkill
- cortex-r5-debugSkill
- crc-checksum-integrationSkill
- easylogger-integrationSkill
- embedded-app-example-libsSkill
- embedded-buffer-queue-libsSkill
- embedded-data-parsing-libsSkill
- embedded-debug-entrySkill
- embedded-fault-debugSkill
- embedded-framework-libsSkill
- embedded-input-libsSkill
- embedded-library-entrySkill
- embedded-linux-login-debugSkill
- embedded-peripheral-bringupSkill
- embedded-serial-log-debugSkill
- embedded-state-machine-libsSkill
- embedded-timing-libsSkill
- epd-integrationSkill
- esp-idf-integrationSkill
- fatfs-integrationSkill
- flashdb-integrationSkill
- freemodbus-integrationSkill
- freertos-kernel-debugSkill
- freertos-plus-tcp-integrationSkill
- gnss-gps-integrationSkill
- hardware-interface-debugSkill
- heatshrink-integrationSkill
- letter-shell-integrationSkill
- littlefs-integrationSkill
- low-power-debugSkill
- lvgl-integrationSkill
- lwip-integrationSkill
- mbedtls-integrationSkill
- mcuboot-integrationSkill
- mcu-flashing-debugSkill
- micro-ecc-integrationSkill
- miniz-integrationSkill
- mqtt-embedded-integrationSkill
- nrf-connect-sdk-integrationSkill
- nr-micro-shell-integrationSkill
- openocd-jlink-stlink-debugSkill
- openthread-integrationSkill
- ota-update-integrationSkill
- plooc-integrationSkill
- power-management-integrationSkill
- qspi-xip-flash-debugSkill
- readme-writingSkill
- riscv-mcu-debugSkill
- rtos-debugSkill
- rt-thread-integrationSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 5 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
Use this skill to integrate nanopb by controlling schema size, generated options, callbacks, and buffer ownership.
- Distinctive: line 14
Use this skill when:
- Very specific: line 20
Do not use this skill for general JSON/INI parsing.
- Distinctive: line 38
Use nanopb options for max string, bytes, repeated field, or callback-based streaming.
- Very specific: line 44
Always inspect pb_encode/pb_decode failure and error text.
- Distinctive: line 47
Test device-generated payload with host decoder and host-generated payload with device decoder.
- Distinctive: line 60
Before claiming nanopb works:
≈ “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.
Files
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
- Lock schema and generated files together.
Regenerate
.pb.c/.pb.hwhenever.protoor.optionschanges. - Bound variable fields. Use nanopb options for max string, bytes, repeated field, or callback-based streaming.
- Size buffers explicitly. Know max encoded size and transport frame limits.
- Check return values.
Always inspect
pb_encode/pb_decodefailure and error text. - Validate compatibility. Test device-generated payload with host decoder and host-generated payload with device decoder.
Common Failures
- Generated files are stale relative to
.proto. - Repeated/string fields need max sizes but default to callbacks.
- Decode fails because the transport strips length framing.
- Device and host use different schema versions.
- Stack buffers are too small for worst-case message size.
- Callback decode stores pointers into temporary buffers.
Verification
Before claiming nanopb works:
- State schema version, generator path, max message size, and field-size policy.
- Confirm encode and decode of a golden message.
- Confirm malformed/truncated payload behavior.
- Confirm host-device compatibility.
- Confirm memory usage fits stack/heap/static budget.
Example
User:
nanopb 解码一直失败,但 PC 端 protobuf 能解析。Agent:
- Asks for
.proto,.options, generated files, payload framing, and error string. - Checks stale generation and max field settings.
- Tests a golden payload both directions.
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
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.

