Skip to content
Skills Library
Programming · Tool integration

embedded-data-parsing-libs

/embedded-data-parsing-libs

Use when integrating, porting, configuring, or debugging embedded C data parsers such as cJSON, jsmn, or inih on MCU projects

Repository
aix-skills ↗
Licence
MIT
Last repository change
17.07.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 17.07.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Use when integrating, porting, configuring, or debugging embedded C data parsers such as cJSON, jsmn, or inih on MCU projects

Original author description

Use when integrating, porting, configuring, or debugging embedded C data parsers such as cJSON, jsmn, or inih on MCU projects

How it works

  1. Overview
  2. When To Use
  3. First Questions
  4. Library Checks
  5. Common Failures
  6. Verification
  7. Example
Original SKILL.md headings · 83 lines, 419 words
SKILL.md preview
---
name: embedded-data-parsing-libs
description: Use when integrating, porting, configuring, or debugging embedded C data parsers such as cJSON, jsmn, or inih on MCU projects
---

# 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`, and `JSMN_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_Parse` without 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:

```text
想用 cJSON 解析串口发来的配置。
```

Agent:

1. Asks for max payload size, schema, allocator policy, and malformed-input behavior.
1. Uses custom hooks if needed and validates each field type.
1. Tests good JSON, missing keys, bad types, and oversized payloads.

Versions

The database has no other skills named embedded-data-parsing-libs.

Database snapshot: 13.11.2026 · package version 5267380aab3c (SHA-256 digest of the entire package)

Downloads in the last 30 days: 4 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100embedded-timing-libs
    Use when integrating, porting, configuring, or debugging embedded software timer libraries such as MultiTimer, timeout schedulers, or tick-based callback timers
  • 100embedded-input-libs
    Use when integrating, porting, configuring, or debugging embedded button/input libraries such as MultiButton or FlexibleButton
  • 100fparsec
    Use when building high-performance text parsers in F# using FParsec parser combinators. USE FOR: F# parser combinators, text parsing, expression parsers, DSL implementation in F#, protocol parsing, structured data extraction DO NOT USE FOR: C# parser combinators (use pidgin or…
  • 95build-agent-embedded
    C/C++ build agent for embedded systems, firmware, and MCU projects. Extends build-agent with embedded constraints. Use when building firmware, bare-metal code, or resource-constrained systems.
  • 98mcu-code-review
    单片机代码审查与修改计划:覆盖 STM32(HAL/LL/寄存器)、C51/8051、ESP32(ESP-IDF/Arduino)等常见 MCU,审查中断/时钟/DMA/内存/RTOS/低功耗/看门狗等风险,按 P0-P3 分级列出问题清单,并输出分阶段修改计划(每步含改动点、风险、验证方法与回滚思路)。可调用本机 VSCode Embedded IDE(EIDE)/Cortex-Debug 做真实编译验证(scripts/eide_build.js)与烧录/调试配置。当用户贴单片机代码、问「帮我看看/为什么跑飞/给修改建议/列修改…
  • 95rs-domain-embedded
    Use when developing embedded/no_std Rust. Keywords: embedded, no_std, microcontroller, MCU, ARM, RISC-V, bare metal, firmware, HAL, PAC, RTIC, embassy, interrupt, DMA, peripheral, GPIO, SPI, I2C, UART, embedded-hal, cortex-m, esp32, stm32, nrf

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.