What problem does it solve?
This Skill acts as an expert guide for the sp.h single-header C standard library replacement. It ensures that all interactions, discussions, and code generation related to sp.h strictly adhere to its specific conventions, function annotations, and memory management rules. This prevents common errors, maintains code quality, and significantly reduces the cognitive load and review cycles for C developers.
Core Features & Use Cases
- Strict
sp.h Compliance: Guides the AI to consistently apply sp.h's unique coding style, type prefixes (sp_), function signatures (SP_API), and memory allocation (sp_alloc).
- Accurate Code Annotation: Automatically annotates
sp.h function references with their full declarations, drawing from bundled reference files (references/index.md, references/sp.h, references/spn.c).
- Use Case: A C developer needs to implement a dynamic array using
sp.h. By activating this skill, the AI can generate correct, idiomatic sp_da code, including initialization with SP_ZERO_INITIALIZE(), pushing elements with sp_dyn_array_push(), and iterating with sp_dyn_array_for(), without the developer needing to manually consult the library documentation.
Quick Start
Explain how to use sp_dyn_array for dynamic arrays in sp.h, including initialization and iteration, providing code examples.