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.
npx skills add softspark/ai-toolkit --skill cpp-rulesgit clone --depth 1 https://github.com/softspark/ai-toolkitWrote 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.
[](https://agentmods.dev/skills/softspark/ai-toolkit/cpp-rules)<a href="https://agentmods.dev/skills/softspark/ai-toolkit/cpp-rules"><img src="https://agentmods.dev/badge/skills/softspark/ai-toolkit/cpp-rules/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/softspark/ai-toolkit/cpp-rules"><img src="https://agentmods.dev/badge/skills/softspark/ai-toolkit/cpp-rules.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00051 | $0.03269 |
| Opus 5.5 | $0.00020 | $0.01308 |
| Sonnet 5.5 | $0.00010 | $0.00654 |
| Haiku 4.5 | $0.00005 | $0.00327 |
Grade A, and why
cpp-rules 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 1mo 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.
How it starts
The opening of the file, as written. The whole thing — 276 lines — stays where its author put it; the contents beside it link to each section on GitHub.
C++ Rules
These rules come from app/rules/cpp/ in ai-toolkit. They cover
the project's standards for coding style, frameworks, patterns,
security, and testing in C++. Apply them when writing or
reviewing C++ code.
C++ Coding Style
Naming
- PascalCase: classes, structs, enums, type aliases, concepts.
- camelCase or snake_case: functions, methods, variables (be consistent per project).
- UPPER_SNAKE: macros, compile-time constants.
- Prefix member variables with
m_or suffix with_(pick one convention). - Namespace names: lowercase, short (
namespace io,namespace util).
Modern C++ (17/20/23)
- Use
autofor iterator types and complex template deductions. - Use
std::optional<T>instead of sentinel values or pointers for optional returns. - Use
std::variantover union types. Usestd::visitfor dispatch. - Use
std::string_viewfor non-owning string parameters. - Use structured bindings:
auto [key, value] = *map.begin();. - Use
constexprfor compile-time evaluation. Prefer over macros.
Memory Management
- Use RAII exclusively. Every resource acquisition is an initialization.
- Use
std::unique_ptrfor exclusive ownership (default choice). - Use
std::shared_ptronly when ownership is genuinely shared. - Never use raw
new/delete. Usestd::make_unique/std::make_shared. - Use
std::span<T>(C++20) for non-owning views over contiguous data.
Functions
- Pass small types by value. Pass large types by
const&. - Use
[[nodiscard]]on functions whose return value must not be ignored. - Use
noexcepton functions that do not throw (move constructors, destructors). - Limit function parameters to 4. Use structs for configuration objects.
- Use trailing return types for complex template return deductions.
Includes and Dependencies
- Use
#pragma onceor include guards. Prefer#pragma oncefor simplicity. - Order: corresponding header, C++ stdlib, third-party, project headers.
- Forward-declare in headers when possible to reduce compile times.
- Minimize header dependencies. Use the Pimpl idiom for ABI stability.
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.
- 1mo ago First seen · 276 lines · 51 tokens per session scan A c6b5dc2ae2d6
cpp-rules is a skill published in the GitHub repository softspark/ai-toolkit (181 stars, last pushed 11d ago), licensed Apache-2.0. It adds 51 tokens to every session and 3,269 once invoked, about $0.0002 per session on Opus 5.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-09-03.
Other skills, from other repositories
cpp-coding-standards
C++ coding standards based on the C++ Core Guidelines (isocpp.github.io). Use when writing, reviewing, or refactoring C++ code to enforce modern, safe, and idiomatic practices.
embedded-stm32
Best practices for embedded C/C++ development on STM32 microcontrollers using the HAL, covering peripherals, DMA, interrupts, memory constraints, and hardware-focused testing. Use when writing STM32 HAL code, configuring peripherals generated by STM32CubeMX, working with interrupts or DMA, debugging with SWD/JTAG…
cpp
Guidelines for modern C++ development with C++17/20 standards, memory safety, and performance optimization.
backend-development
Guidelines for backend development in C++ and Elixir/Phoenix, covering modern language features, best practices, and production-ready patterns.
agent-cpp-expert
Specialist subagent: C and C++ development, modern C++ (C++17/20/23), CMake, systems programming, and memory management specialist. Use when writing C/C++ code, debugging memory issues, or building systems-level software. Trigger phrases: C++, C language, CMake, modern C++, systems programming, memory management…
cpp-expert
Expert-level C++ development with modern C++20/23, STL, memory management, and performance. Use when the user mentions C++, C++20, C++23, the STL, templates, or performance, or when the task involves Modern C++ Features, Memory Management, Ranges and Views, or Coroutines.