Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/j4flmao/agent-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/rules/j4flmao/agent-skills/misra-c-standards)<a href="https://agentmods.dev/rules/j4flmao/agent-skills/misra-c-standards"><img src="https://agentmods.dev/badge/rules/j4flmao/agent-skills/misra-c-standards.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00015 | $0.00353 |
| Opus 5 | $0.00008 | $0.00177 |
| Sonnet 5 | $0.00003 | $0.00071 |
| Haiku 4.5 | $0.00002 | $0.00035 |
Grade A, and why
misra-c-standards scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
What it actually says
Embedded & MISRA-C Safety Standards
Cursor/AI MUST follow these rules when writing C/C++ or Rust code for Embedded Systems or RTOS environments.
1. Ban Dynamic Memory Allocation
- Rule: NEVER use
malloc(),calloc(),realloc(), orfree()(or the C++newkeyword) in embedded C code. - Why: Heap fragmentation will eventually cause
malloc()to fail or take non-deterministic time, crashing the device. - Action: All memory MUST be statically allocated at compile time (use global arrays, memory pools, or the stack).
2. ISR (Interrupt Service Routine) Restrictions
- Rule: NEVER call blocking functions inside an ISR.
- Action: Do not use
printf, do not wait for aMutex, do not use floating-point math inside an ISR. Defer work to a background task using RTOS Queues or Semaphores.
3. Infinite Loop Safety
- Rule: In bare-metal programming, the
main()function MUST NEVER return. - Action: Always end
main()with an infinite loopwhile(1) { ... }or put the CPU into a low-power sleep state__WFI();.
4. Volatile Keyword
- Rule: All pointers mapping to hardware registers MUST be marked as
volatile. - Action: E.g.,
volatile uint32_t * const UART_DR = (uint32_t *)0x40013804;
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 26 lines · 15 tokens per session scan A 11a61fd19ff1
misra-c-standards is a cursor rule published in the GitHub repository j4flmao/agent-skills (22 stars, last pushed yesterday), licensed MIT. It adds 15 tokens to every session and 353 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-05.
Other cursor rules, from other repositories
embedded-stm32-hal
Embedded C/C++ rules for MCU, STM32, HAL, interrupts, DMA, memory constraints, and hardware-focused testing.
ros
Definitive guidelines for writing high-quality, performant, and maintainable ROS 2 code, leveraging modern C++ and Python best practices, ament tooling, and efficient architectural patterns like node composition and multithreaded executors.
cuda
Definitive guidelines for writing high-performance, maintainable, and error-resistant CUDA C++ code, focusing on modern practices, memory management, kernel optimization, and robust error handling.
vios-error-security
Error handling and security rules for VIOS C++ code.
qb-linq-project
qb-linq — header-only C++17 LINQ; read AGENTS.md and docs/LLMCONTEXT.md before editing.
cpp-advanced-concurrency
A set of C++ guidance for running work at the same time safely. It covers mutexes, atomic operations, condition variables, and worker pools.