safety-certification

A safety and certification specialist for STM32 embedded systems. It deals with standards for systems where failures could cause harm, such as industrial, automotive, medical, or aerospace equipment.

In plain words
What is it for?
Use it for IEC 61508 and ISO 26262 work, safety requirements, SIL assessment, Class B self-tests, diagnostic coverage, FMEA/FMEDA analysis, and safety documentation.
Why use it?
It helps connect embedded-system designs and documentation with functional-safety requirements and certification work.

Agent

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 agents/creativec09/stm32/safety-certification
Clone the repo
git clone --depth 1 https://github.com/creativec09/stm32
Per session 34 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 6,205 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.00034 $0.06205
Opus 5 $0.00017 $0.03102
Sonnet 5 $0.00007 $0.01241
Haiku 4.5 $0.00003 $0.00620

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

Security

Grade A, and why

safety-certification 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.

agents/safety-certification.md · 864 lines

How it starts

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

STM32 Safety/Certification Agent

You are the Safety and Certification specialist for STM32 development. You handle functional safety requirements, IEC 61508 compliance, and safety-critical embedded systems design.

Domain Expertise

Primary Responsibilities

  • IEC 61508 functional safety
  • SIL (Safety Integrity Level) assessment
  • Class B safety library implementation
  • Safety-critical code patterns
  • Diagnostic coverage analysis
  • FMEA/FMEDA analysis
  • Safety documentation

Safety Standards Overview

Functional Safety Standards Hierarchy:

IEC 61508 (Generic)
├── ISO 26262 (Automotive)
├── IEC 62061 (Machinery)
├── IEC 61511 (Process)
├── EN 50129 (Railway)
├── IEC 62304 (Medical)
└── DO-178C (Aerospace)

SIL Levels (IEC 61508):
┌─────┬────────────────────┬──────────────────────┐
│ SIL │ Probability (Low)  │ Probability (High)   │
├─────┼────────────────────┼──────────────────────┤
│  1  │ 10^-6 to 10^-5    │ 10^-2 to 10^-1      │
│  2  │ 10^-7 to 10^-6    │ 10^-3 to 10^-2      │
│  3  │ 10^-8 to 10^-7    │ 10^-4 to 10^-3      │
│  4  │ 10^-9 to 10^-8    │ 10^-5 to 10^-4      │
└─────┴────────────────────┴──────────────────────┘

STM32 Class B Safety Library

Core Self-Test Implementation

/**
 * @brief STM32 Class B Safety Library components
 * @note  Based on ST's X-CUBE-CLASSB implementation
 */

#include "stm32_safety.h"

/* Test result definitions */
typedef enum {
    SAFETY_TEST_PASS = 0,
    SAFETY_TEST_FAIL = 1,
    SAFETY_TEST_ONGOING = 2
} SafetyTestResult_t;

/* Safety state machine */
typedef enum {
    SAFETY_STATE_INIT,
    SAFETY_STATE_RUNNING,
    SAFETY_STATE_FAULT,
    SAFETY_STATE_SAFE
} SafetyState_t;

typedef struct {
    SafetyState_t state;
    uint32_t fault_code;
    uint32_t last_test_time;
    uint32_t test_interval_ms;
} SafetyContext_t;

static SafetyContext_t safety_ctx;

/**
 * @brief CPU register test (March C algorithm)
 * @note  Tests R0-R12, LR, APSR
 */
SafetyTestResult_t Safety_CPU_Test(void)
{
    /* Test pattern sequence */
    const uint32_t patterns[] = {
        0x00000000,
        0xFFFFFFFF,
        0xAAAAAAAA,
        0x55555555
    };

    for (int i = 0; i < 4; i++) {
        /* Test R0-R7 (low registers) */
        __asm volatile(
            "MOV R0, %0     \n"
            "MOV R1, %0     \n"
            "MOV R2, %0     \n"
            "MOV R3, %0     \n"
            "MOV R4, %0     \n"
            "MOV R5, %0     \n"
            "MOV R6, %0     \n"
            "MOV R7, %0     \n"
            "CMP R0, %0     \n"
            "BNE cpu_fail   \n"
            "CMP R1, %0     \n"
            "BNE cpu_fail   \n"
            /* ... continue for all registers ... */
            :
            : "r" (patterns[i])
            : "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7"
        );
    }

    return SAFETY_TEST_PASS;

    /* Failure handling */
    __asm volatile("cpu_fail:");
    return SAFETY_TEST_FAIL;
}

/**
 * @brief Program counter test
 * @note  Verifies PC increments correctly
 */
SafetyTestResult_t Safety_PC_Test(void)
{
    volatile uint32_t pc_sequence[3];
    uint32_t expected_diff;

    /* Capture PC at known points */
    __asm volatile(
        "MOV %0, PC     \n"
        "NOP            \n"
        "MOV %1, PC     \n"
        "NOP            \n"
        "MOV %2, PC     \n"
        : "=r" (pc_sequence[0]), "=r" (pc_sequence[1]), "=r" (pc_sequence[2])
    );

    /* Verify sequential increments */
    /* Note: PC value when read is current instruction + 4 in Thumb mode */
    expected_diff = 4;  /* Thumb instructions are 2 or 4 bytes */

    if ((pc_sequence[1] - pc_sequence[0]) < expected_diff ||
        (pc_sequence[2] - pc_sequence[1]) < expected_diff) {
        return SAFETY_TEST_FAIL;
    }

    return SAFETY_TEST_PASS;
}

Read the full file on GitHub · 864 lines

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. 2d ago First seen · 864 lines · 34 tokens per session scan A f3608e91ffcd

Subscribe to this mod's changes

safety-certification is an agent published in the GitHub repository creativec09/stm32 (11 stars, last pushed 5mo ago), licensed MIT. It adds 34 tokens to every session and 6,205 once invoked, about $0.0002 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.

Related

Other agents, from other repositories

apple-neural-performance-expert

Use this agent when you need expert guidance on optimizing neural network operations on Apple platforms, including Metal Performance Shaders (MPS), MLX framework optimization, low-level array operations, GPU kernel optimization, memory management for ML workloads, or performance profiling of neural network code. This…

FluidInference/FluidAudio · 0 tokens

automation-components

Automation devices, valves, lines, tanks, badges.

Ocean-Industries-Concept-Lab/openbridge-webcomponents · 13 tokens

embedded-arch

Use when starting any embedded competition project. Reads contest problem, routes to task type (MAIN+TAGS), dispatches 4-6 specialist subagents, writes hardware/interface contracts, manages decision gates, and integrates final deliverables. Vision tasks are handed off to the separate auto-vision skill. Always the…

DunCanYounG-1/auto-embedded · 74 tokens

cline

Cline is an autonomous coding agent for VS Code (and a CLI). It speaks MCP over stdio and HTTP.

oaslananka/kicad-mcp-pro · 0 tokens

antenna-engineer

Reasons from gain–directivity–efficiency, Chu–Harrington bandwidth limits, and array factor through HFSS/CST/FEKO synthesis, IEEE 149-2021 NF/FF/CATR metrology, CTIA TRP/TIS/ECC OTA, and Friis link budgets while treating ground-plane truncation, active impedance in arrays, range ripple, and S₁₁≠pattern conflation as…

K-Dense-AI/scientific-agents · 97 tokens

neuron-nki-agent

Unified NKI kernel development agent. CRITICAL: Before writing any NKI code, read the language constraint reference at skills/neuron-nki-writing/references/nki-language-constraint.md for the required API patterns and reference kernel template. Context: Kernel won't compile user: "Fix these compilation errors in my…

aws-neuron/neuron-agentic-development · 218 tokens