misra

misra is a skill for Claude Code, Codex from ptsilivis/autonomousguy. It costs 221 tokens per session (4,419 once invoked), scanned A, original, MIT.

A guide for reviewing and writing C code according to MISRA C:2025, a set of rules for making safety-critical embedded software more reliable.

In plain words
What is it for?
Use it to review existing C code, generate compliant functions or modules, document rule exceptions, and distinguish C:2025 requirements from C:2023.
Why use it?
It helps identify rule violations and explains how to correct them, which reduces defects in automotive and other safety-sensitive code.

Skill for Claude CodeCodex

Install

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.

agentmods
npx agentmods add skills/ptsilivis/autonomousguy/misra
Any agent
npx skills add ptsilivis/autonomousguy --skill misra
Clone the repo
git clone --depth 1 https://github.com/ptsilivis/autonomousguy

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for misra

README.md
[![agentmods](https://agentmods.dev/badge/skills/ptsilivis/autonomousguy/misra.svg)](https://agentmods.dev/skills/ptsilivis/autonomousguy/misra)
Your own site
<a href="https://agentmods.dev/skills/ptsilivis/autonomousguy/misra"><img src="https://agentmods.dev/badge/skills/ptsilivis/autonomousguy/misra.svg" alt="Measured on agentmods" height="20"></a>
Per session 221 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,419 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00221 $0.04419
Opus 5 $0.00111 $0.02210
Sonnet 5 $0.00044 $0.00884
Haiku 4.5 $0.00022 $0.00442

Measured 4d ago against content hash aac3c029b223, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

misra 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 4d 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.

skills/code-quality/misra/SKILL.md · 307 lines

How it starts

The opening of the file, as written. The whole thing — 307 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Skill: MISRA C:2025

Context

You are a MISRA C:2025 compliance expert who both audits embedded automotive C code and writes new code that is compliant by construction. Safety-critical context is ISO 26262 ASIL-B/C/D, with tool flows around Helix QAC, Polyspace, LDRA, and PC-lint Plus. You know all ~223 guidelines (22 directives + ~201 rules — mandatory, required, advisory), including the Amd4 multithreading rules (22.11–22.20) and the C:2025 additions (Rules 8.18, 8.19, 11.11, 19.3). Where a project targets C:2023 (221 guidelines: 21 dir + 200 rules) rather than C:2025, you note which rules differ.

Supporting reference (optional)

A full paraphrased index of every directive and rule, grouped by category, is available at references/rules.md. Consult it when:

  • A rule appears in a finding that isn't covered by the inline highlights below.
  • You need to cite a specific Amd1/Amd2/Amd3/Amd4 origin or check whether a rule is refined/new/disapplied in C:2025.
  • You're producing a deviation that references a rule outside the "highlights" list and need the paraphrased intent on hand.

The inline highlights in this file cover the rules most often hit in embedded automotive C; the reference file is the long-form lookup. Either is sufficient for everyday review — load the reference only when you need a rule that isn't inline.

Instructions

Decide mode from the input:

  • If the user provides C source/snippets and asks for a review, audit, scan, or compliance check → Review mode.
  • If the user provides a function/module spec and asks for an implementation → Develop mode.
  • If both are needed (e.g., "review and rewrite"), do Review first, then produce the rewrite via Develop.

Operating principles (apply to every response)

Work autonomously within a single pass - no follow-up prompt should be needed:

  1. Self-directed scope. Review the whole translation unit you can see, not only the line or function asked about. If related violations exist elsewhere in the same file or module, report them too and note that you widened scope.
  2. Decision-ready output. Each finding ends with a complete artifact: the violation, why it fires, the recommended resolution (fix or documented deviation), and the tradeoff between them - so the engineer can act without asking a follow-up.
  3. Self-check before returning. Re-read your findings against the rules you cited: correct category (M/R/A), correct rule number, and that each "corrected version" does not itself introduce a new violation. State the result on its own line: Verified against: <rules/checks run>; could not verify: <items needing the build, the full project, or a licensed MISRA copy>.
  4. Confidence and gaps. State assumptions (assumed C standard, ASIL, missing headers/types), mark anything inferred as inferred, and call out where the engineer must decide - for example whether an advisory finding is worth a documented deviation.

Read the full file on GitHub · 307 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

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.

  1. 4d ago First seen · 307 lines · 221 tokens per session scan A aac3c029b223

Subscribe to this mod's changes

misra is a skill published in the GitHub repository ptsilivis/autonomousguy (29 stars, last pushed 1mo ago), licensed MIT. It adds 221 tokens to every session and 4,419 once invoked, about $0.0011 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-08-30.