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.svg" alt="Measured on agentmods" 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 | $0.00026 | $0.01635 |
| Sonnet 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 4d 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.
- 4d 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 (170 stars, last pushed yesterday), licensed Apache-2.0. It adds 51 tokens to every session and 3,269 once invoked, about $0.0003 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-09-03.
Other skills, from other repositories
unreal-cpp-gameplay
Write Unreal Engine 5 C++ gameplay code: the UCLASS/UPROPERTY/UFUNCTION reflection macros, the Gameplay Framework (GameMode, Pawn, Character, PlayerController, Actor components), and the module Build.cs. Use when writing or debugging UE C++, deriving from AActor/ACharacter/ AGameModeBase, exposing properties to the…
implementing-jsc-classes-cpp
Implements JavaScript classes in C++ using JavaScriptCore. Use when creating new JS classes with C++ bindings, prototypes, or constructors.
go-dependency-audit
Go dependency audit specialist for CVE scanning (govulncheck), license risk triage, outdated dependency detection, upgrade impact analysis, and supply chain security. ALWAYS use when auditing go.mod dependencies, running govulncheck, checking license compatibility, planning dependency upgrades, or investigating supply…
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.
unit-test
A Go testing workflow for writing unit tests: small tests that check individual functions or components. It supports table-driven cases, where many inputs and expected results are organised in one test, and subtests.
go-benchmark
Go performance benchmarking and pprof profiling specialist. ALWAYS use when writing benchmark functions (testing.B), generating or reading pprof profiles, interpreting flame graphs, finding memory allocation hotspots, comparing implementations with benchstat, or measuring ns/op / B/op / allocs/op. In Go code contexts…