Meddev Embedded Cpp logo

Meddev Embedded Cpp

Community
AminAlam
meddev-embedded-cpp

Define a constrained C++ subset suitable for medical device firmware, aligned to MISRA C++ guidance: safe types, RAII, limited dynamic features, and predictable behavior. Use when working on embedded cpp in medical device software.

Overview

PublisherAminAlam
Repositorymeddev-agent-skills
Skill namemeddev-embedded-cpp
Stars
40
Forks
8
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by AminAlam on GitHub. Read the source before you install it.

Installation

Install the Meddev Embedded Cpp AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/AminAlam/meddev-agent-skills/tree/main/skills/meddev-embedded-cpp
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/AminAlam/meddev-agent-skills.git /tmp/meddev-agent-skills
mkdir -p .claude/skills
cp -r /tmp/meddev-agent-skills/skills/meddev-embedded-cpp .claude/skills/meddev-embedded-cpp
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Meddev Embedded Cpp in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Meddev Embedded Cpp on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Meddev Embedded Cpp is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Embedded C++ Coding Standards for Medical Devices

Purpose

Define a constrained C++ subset suitable for medical device firmware, aligned to MISRA C++ guidance: safe types, RAII, limited dynamic features, and predictable behavior.

When to Apply

  • C++ firmware modules, drivers, and application logic in safety-related systems.
  • Code reviews and new module development using C++ on MCUs/RTOS.

Requirements (testable)

  1. Feature Set: No exceptions in safety-critical paths; RTTI disabled unless justified; avoid dynamic_cast on polymorphic hierarchies in critical code. Rationale: predictability and size.
  2. Memory: Prefer static allocation; where dynamic is needed, use RAII and bounded allocators/pools; no raw new/delete in safety paths. Rationale: determinism.
  3. Ownership: Use smart pointers (unique_ptr where supported); avoid shared ownership in critical code; no cycles. Rationale: leak/alias safety.
  4. Templates: Use templates for type safety and zero-cost abstractions; avoid template metaprogramming that obscures behavior; ensure instantiations are bounded. Rationale: clarity and analyzability.
  5. Constructors/Destructors: Keep trivial/constexpr where possible; no logic that can fail silently; avoid throwing constructors. Rationale: predictable init.
  6. Concurrency: If using std::atomic/RTOS primitives, ensure memory orderings are explicit; avoid volatile for concurrency except for HW-mapped registers. Rationale: correctness.
  7. Namespaces/Headers: Use namespaces to avoid collisions; headers self-contained; no using-directives in headers. Rationale: hygiene.
  8. Static Analysis: Run MISRA C++ checks; treat warnings as errors; deviations documented. Rationale: defect prevention.

Recommended Practices

  • Favor enum class for scoped enums.
  • Prefer constexpr for configuration constants.
  • Use span-like views (or simple pointer+len structs) instead of raw pointers.
  • Keep vtables/polymorphism out of ISR/critical loops; prefer CRTP/static dispatch.

Patterns

RAII guard for peripheral enable:

cpp
// REQ-CPP-RAII-01; TEST-CPP-03
class PeripheralGuard {
 public:
  PeripheralGuard() { periph_enable(); }
  ~PeripheralGuard() { periph_disable(); }
  PeripheralGuard(const PeripheralGuard&) = delete;
  PeripheralGuard& operator=(const PeripheralGuard&) = delete;
};

Bounded buffer view:

cpp
// REQ-CPP-API-02; TEST-CPP-05
struct BufferView {
  uint8_t* data;
  size_t len;
};

bool copy_bounded(BufferView dst, BufferView src) {
  if (src.len > dst.len) return false;
  std::copy(src.data, src.data + src.len, dst.data);
  return true;
}

No-exception init:

cpp
// REQ-CPP-INIT-03; TEST-CPP-07
class Sensor {
 public:
  bool init() noexcept {
    return hw_init() == 0;
  }
};

Anti-Patterns (risks)

  • Exceptions in ISRs or critical loops -> risk: uncontrolled unwinding.
  • Raw owning pointers with manual delete -> risk: leaks/double-free.
  • Unbounded template instantiations causing code bloat -> risk: flash overflow and review difficulty.
  • Using directives in headers -> risk: namespace pollution.
  • RTTI/dynamic_cast in timing-critical code -> risk: overhead and unpredictability.

Verification Checklist

  • Exceptions disabled/unused in safety paths; RTTI disabled or justified.
  • Dynamic allocation avoided; where used, RAII + bounded pools; no raw new/delete.
  • Ownership clear; unique_ptr or value semantics; no shared cycles.
  • Template use bounded and readable; avoids heavy metaprogramming.
  • Constructors/destructors simple, non-throwing; init outcomes explicit.
  • Concurrency primitives used with explicit memory orders; volatile only for HW.
  • Headers clean: guards, self-contained, no using-directives.
  • MISRA C++/SAST run; deviations documented; warnings treated as errors.

Traceability

  • Use REQ-CPP-### and TEST-CPP-### tags; link MISRA deviation records to requirements.

References

  • MISRA C++:2023 (current edition) - major update from MISRA C++:2008.
  • MISRA C++:2008 (legacy projects).
  • AUTOSAR C++14 (informative for safer subset concepts).
  • IEC 62304 implementation discipline.

Changelog

  • 1.0.1 (2026-01-04): Audit correction - updated MISRA C++ reference from 2008 to 2023 edition.
  • 1.0.0 (2026-01-04): Initial embedded C++ subset with RAII, bounded templates, and no-exception guidance.

Audit History

  • 2026-01-04: Audit performed. Corrections:
    • MISRA C++:2008 is now significantly outdated; MISRA C++:2023 added as current reference
    • AUTOSAR C++14 reference verified as appropriate informative source

Frequently asked questions

What does the Meddev Embedded Cpp AI skill do?

Define a constrained C++ subset suitable for medical device firmware, aligned to MISRA C++ guidance: safe types, RAII, limited dynamic features, and predictable behavior. Use when working on embedded cpp in medical device software.

Why use Meddev Embedded Cpp on TypingMind?

Because you install it once and use it with any model. Meddev Embedded Cpp is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Meddev Embedded Cpp in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/AminAlam/meddev-agent-skills/tree/main/skills/meddev-embedded-cpp. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Meddev Embedded Cpp?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Meddev Embedded Cpp?

As many as you like. As long as a model supports skills, you can use Meddev Embedded Cpp with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Meddev Embedded Cpp AI skill free?

Yes. It is published on GitHub by AminAlam under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇