embedded-data-parsing-libs
Skill36 starsChanged 5 months agoMITView on GitHub
Use when integrating, porting, configuring, or debugging embedded C data parsers such as cJSON, jsmn, or inih on MCU projects
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-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
- nanopb-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
6 rules. About 0 are common, 5 are distinctive, and 1 is 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.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 10
Use this skill for small embedded data parsers where the main risks are memory allocation, input bounds, encoding assumptions, recursion, …
- Distinctive: line 14
Use this skill when:
- Distinctive: line 20
Do not use this skill for binary protocols or large streaming parsers outside these small libraries.
- Distinctive: line 39
Always delete parsed trees after use.
- Distinctive: line 67
Before claiming parser integration works:
- Distinctive: line 70
Test valid input, missing fields, wrong types, malformed input, and oversize input.
≈ “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
Embedded Data Parsing Libs
Overview
Use this skill for small embedded data parsers where the main risks are memory allocation, input bounds, encoding assumptions, recursion, and callback handling. Cover cJSON, jsmn, and inih without copying their full APIs.
When To Use
Use this skill when:
- The user wants to parse JSON or INI on an MCU.
- The task mentions
cJSON,jsmn,inih, config files, telemetry JSON, command payloads, or settings parsing. - The issue involves parse failure, memory leak, heap exhaustion, malformed input, callback mapping, or stack/recursion limits.
Do not use this skill for binary protocols or large streaming parsers outside these small libraries.
First Questions
Ask for:
- Parser library:
cJSON,jsmn,inih, or another small C parser. - Input source and maximum input size.
- Runtime: bare metal, RTOS, Linux, bootloader, or shell command.
- Whether dynamic allocation is allowed.
- Expected schema and how malformed input should behave.
- Current error, sample input, and memory budget.
Library Checks
cJSON
- Decide whether heap allocation is acceptable.
- Provide custom malloc/free hooks if the project uses a custom allocator.
- Always delete parsed trees after use.
- Bound input size before parsing.
- Validate type before reading values.
jsmn
- Allocate enough tokens for the expected JSON shape.
- Handle
JSMN_ERROR_NOMEM,JSMN_ERROR_INVAL, andJSMN_ERROR_PART. - Remember that tokens reference the original input buffer.
- Validate string lengths and value types manually.
inih
- Implement the handler callback with strict section/key matching.
- Decide whether duplicate keys overwrite, error, or merge.
- Bound line length and input source.
- Validate converted numeric values and ranges.
Common Failures
- Heap fragmentation from repeated
cJSON_Parsewithout hooks or cleanup. - Token buffer too small for
jsmn. - Using JSON token pointers after the input buffer is freed.
- Accepting partial config and booting with unsafe defaults.
- Silent typo in INI key because handler ignores unknown fields.
Verification
Before claiming parser integration works:
- State parser, allocation policy, max input size, and schema assumptions.
- Test valid input, missing fields, wrong types, malformed input, and oversize input.
- Confirm memory is released or static buffers are bounded.
- Confirm unknown fields and duplicate keys behavior.
Example
User:
想用 cJSON 解析串口发来的配置。Agent:
- Asks for max payload size, schema, allocator policy, and malformed-input behavior.
- Uses custom hooks if needed and validates each field type.
- Tests good JSON, missing keys, bad types, and oversized payloads.
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.

