One-click install
npx skills add https://github.com/kmt-t/fireball --skill embedded-c-optimization
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Embedded C++ Optimization
Source: https://github.com/kmt-t/fireball/tree/main/.agent/skills/cpp_embedded
Command: npx skills add https://github.com/kmt-t/fireball --skill embedded-c-optimization

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This skill provides a framework for writing memory-efficient C++ in embedded environments by enforcing strict design rules and guiding decisions to avoid heap allocations and unsafe patterns.

Core Features & Use Cases

  • Enforces memory-conscious C++ practices: disallows dynamic containers and heap allocations; promotes fixed-size structures.
  • Guides safe library usage: selects safe alternatives like std::array, std::span, and std::string_view in constrained contexts.
  • Automated checks: includes a checker script to flag forbidden patterns in source files and guide refactoring.

Quick Start

Run the cpp_embedded checker on your project to identify forbidden patterns and receive remediation suggestions.

Frequently Asked Questions about Embedded C++ Optimization

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I optimize C++ code for memory-constrained embedded systems?

To optimize C++ for memory-constrained embedded systems, enforce static memory sizing and avoid dynamic containers. This skill provides strict design rules and an automated checker script to flag forbidden heap allocations.

Which C++ standard library features are safe for microcontroller projects?

Safe C++ standard library features for microcontroller projects include std::array, std::span, and std::string_view. These promote fixed-size structures and static allocation while avoiding unsafe heap allocations and dynamic container patterns.

How do I check my C++ source files for forbidden embedded patterns?

You can check C++ source files for forbidden embedded patterns by running the cpp_embedded checker script. It automatically flags forbidden patterns in your source files and provides remediation suggestions to guide refactoring.

Can I use dynamic containers in resource-limited cross-platform embedded builds?

No, dynamic containers are disallowed in resource-limited cross-platform embedded builds. This skill enforces memory-conscious C++ practices by disallowing dynamic containers and heap allocations in favor of fixed-size structures.

What are the limitations of enforcing static memory allocation in C++?

The limitation of enforcing static memory allocation in C++ is that it requires replacing dynamic containers with fixed-size structures. You must adhere to strict library usage guidelines and avoid heap allocations entirely in constrained contexts.