fprime-component-implementation
What it does
It guides the AI through filling in the handler functions generated from an approved FPP model. It is for engineers writing C++ for F Prime components.
When to use it
- βWhen the FPP model for an F Prime component is approved and the C++ code needs writing.
- βWhen you need to fill in command or port handler functions for a component.
- βWhen you want C++ code that follows F Prime's style and design rules.
Skill link
https://github.com/nasa/fprime/blob/devel/.github/skills/fprime-component-implementation/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βThe FPP model is approved. Can you write the C++ handlers for this F Prime component?β
5 new skills a week. 1 minute to read.
How it works
The AI implements the generated handler functions in the component's own class, following F Prime's style guidelines and design rules.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Skill: F Prime Component Implementation (C++)
Implementation fills in the handler stubs generated from the FPP model. The autocoder produces base classes with pure-virtual handlers; you implement the derived class.
For the full reference on autocoded functions (port handlers, command handlers, telemetry, events, parameters, initialization), see Autocoded Functions and Component Classes.
Use F Prime design patterns where possible β standard solutions exist for common needs:
- Rate Group Pattern β
docs/user-manual/design-patterns/rate-group.md - Health Checking β
docs/user-manual/design-patterns/health-checking.md - Manager-Worker β
docs/user-manual/design-patterns/manager-worker.md - Application-Manager-Driver β
docs/user-manual/design-patterns/app-man-drv.md - Common Port Patterns β
docs/user-manual/design-patterns/common-port-patterns.md
Follow F Prime Style Guidelines for naming and code style.
Prerequisites
The FPP model must be confirmed (see
fprime-component-design-fpp) and C++ design rules
(fprime-cpp-design, CPP-1 through CPP-37) are mandatory.
The confirmed requirements and FPP model should provide all the
information needed for implementation.
Step-by-Step Process
Step 1 β Generate Implementation Stubs
fprime-util impl
This produces <Component>-template.cpp and <Component>-template.hpp
files. If this is the first time:
mv <Component>-template.cpp <Component>.cpp
mv <Component>-template.hpp <Component>.hpp
If iterating on an existing design, copy new handler stubs from the template into your existing files.
Step 2 β Implement Handlers
Implement all pure-virtual handlers generated from the FPP model. See Autocoded Functions for handler naming conventions, argument types, and the full API provided by the base class.
Key rules to follow during implementation:
- No dynamic memory after construction (CPP-1) β size all arrays at compile time
- Fixed-size types:
U32,FwSizeType, etc. (CPP-3, CPP-28) - No STL containers β use
Fw/DataStructuresor fixed arrays (CPP-22, CPP-25) - No
FW_ASSERTon untrusted inputs (CPP-4) β validate and return an error response instead - All variables initialized (CPP-19)
Fw::Stringoverchar*(CPP-24)- Every command handler must call
cmdResponse_outβ omitting it hangs the command in the dispatcher - Events for each command (CPP-37) β add an event that describes what the command did, including the command arguments. This is frequently forgotten and is very useful for recreating what happened.
- One event emission per call site (CPP-36) β never emit the same event with the same argument set from two places; use a distinct event or a site-identifying argument.
- Mark copy/move as deleted for components (CPP-17)
Step 3 β Build and Fix Errors
fprime-util build
Iterate until compilation succeeds. Common issues:
- Missing
#includefor types used in handlers - Incorrect argument types (check the generated base class)
- Missing
cmdResponse_outcall in command handlers
Step 4 β Review Against C++ Design Rules
Before considering implementation complete, verify compliance with
fprime-cpp-design (CPP-1 through CPP-37).
Anti-Patterns
- Using
FW_ASSERTon command arguments or hardware inputs - Forgetting
cmdResponse_out(command will hang in dispatcher) - Command handlers that emit no event describing what the command did (CPP-37)
- The same event emitted from several sites with indistinguishable arguments (CPP-36)
- Using
new/deletein handler code - Using
std::string,std::vector, or other STL containers - Leaving member variables uninitialized
- Implementing behavior not covered by a requirement
FAQ
What are the handler functions?
The autocoder generates them as stubs that you fill in with the component's real behavior.
Which rules must the code follow?
The skill says the F Prime C++ design rules are mandatory for implementation.
Can I skip the FPP model?
No. The skill requires a confirmed FPP model before implementation begins.
Details
Original description by the author
C++ implementation phase of F Prime component development. Guides the agent through implementing handler functions generated from the FPP model. Must follow fprime-cpp-design rules (CPP-1 through CPP-37). Trigger when the FPP model is confirmed and the next step is to write the C++ implementation. Keywords: F Prime, C++, implementation, handler, component, flight software, autocoded.
repo: nasa/fprime
Popularity
- GitHub stars
- 12k
- Ranking position
- #11496
- License
- Apache-2.0
- Updated
- 11/2/2026
Comments
- β¦
More skills from this repository
fprime-cmake-build-system
12kHelps your agent add modules, build targets and platform settings to an F Prime flight software project through its CMake layer.
fprime-component-design-fpp
12kHelps your agent turn approved F Prime component requirements into an FPP model of its ports, commands, events and telemetry.
fprime-component-development
12kHelps your agent guide an F Prime component through each development phase, from requirements to integration testing.
fprime-component-integration-test
12kHelps your agent write reusable pytest integration tests for an F Prime component that run against a live deployment.
Similar skills
api-connector-builder
280kHas your agent build new API connections following the existing pattern. Use when you need to add one more integration without creating a new way of doing things.
api-design
280kHelps your agent design REST APIs following best practices. It's useful for defining how APIs communicate, how errors are shown, and how to organize data.
backend-patterns
280kHelps your agent with server-side architecture patterns and database optimization. It's useful for building or reviewing code that runs on the server.