cpp-specifications

A set of C and C++ development and review guidelines covering memory checks, correctness, ownership, and thread safety. Sanitizers are compiler-assisted checks that find problems such as buffer overflows, invalid memory use, and data races.

In plain words
What is it for?
Use it when planning, implementing, or reviewing C and C++ code, build files, memory management, concurrent code, and sanitizer-based testing.
Why use it?
It provides a consistent way to catch common low-level programming errors before they reach users.

Skill for Claude CodeCodex

Install

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.

agentmods
npx agentmods add skills/danweinerdev/claude-sdd-planner/cpp-specifications
Any agent
npx skills add danweinerdev/claude-sdd-planner --skill cpp-specifications
Clone the repo
git clone --depth 1 https://github.com/danweinerdev/claude-sdd-planner

Made for: Claude Code, Codex.

Per session 74 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 964 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00074 $0.00964
Opus 5 $0.00037 $0.00482
Sonnet 5 $0.00015 $0.00193
Haiku 4.5 $0.00007 $0.00096

Measured yesterday against content hash 3a2b82fdccd0, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

cpp-specifications 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 yesterday.

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.

skills/cpp-specifications/SKILL.md · 68 lines

How it starts

The opening of the file, as written. The whole thing — 68 lines — stays where its author put it; the contents beside it link to each section on GitHub.

C / C++ — What Good Looks Like

Sanitizers

Tool When What it catches
ASAN (AddressSanitizer) Always Buffer overflows, use-after-free, double-free, stack overflows
UBSAN (UndefinedBehaviorSanitizer) Always Signed integer overflow, null pointer dereference, misaligned access
TSAN (ThreadSanitizer) Threads, atomics, shared mutable state Data races, lock order violations
MSAN (MemorySanitizer) When processing external/untrusted input Use of uninitialized memory

Minimum bar: ASAN + UBSAN on every phase. Add TSAN when concurrency is involved.

Build integration: Typically -fsanitize=address,undefined (Clang/GCC). TSAN and ASAN cannot run simultaneously — use separate build configs.

Const Correctness

  • Parameters: primitives/enums by const value (const int32_t size), complex types by const& (const std::string& name)
  • Methods: mark non-mutating methods const
  • Local variables: use const for anything that doesn't change after initialization
  • Calculations: assign intermediate results to named const variables rather than inlining expressions

Ownership & Memory

  • Smart pointers over raw: std::unique_ptr for exclusive ownership, std::shared_ptr only when genuinely shared
  • std::span<T> for non-owning sequences: prefer over const std::vector<T>& for function parameters — decouples the interface from the container
  • No naked new/delete: use std::make_unique / std::make_shared
  • Move semantics: use std::move when transferring ownership, don't copy when a move suffices

Return Values & Error Handling

  • [[nodiscard]] on all functions returning values — forces callers to handle the result
  • Result/Expected pattern over exceptions: if the project uses Result<T>, std::expected, or similar — use it consistently. Don't mix with exceptions
  • No silent failure: every failable operation must return an error path the caller can observe

Read the full file on GitHub · 68 lines

Changes

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.

  1. yesterday First seen · 68 lines · 74 tokens per session scan A 3a2b82fdccd0

Subscribe to this mod's changes

cpp-specifications is a skill published in the GitHub repository danweinerdev/claude-sdd-planner (2 stars, last pushed 4d ago), licensed MIT. It adds 74 tokens to every session and 964 once invoked, about $0.0004 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-08-31.

Related

Other skills, from other repositories

moai-kanban-foreman

One unattended kanban foreman iteration: watch the backlog queue, dispatch the next operator-picked card to an isolated worker, collect completion evidence on read (not on claims), and report. This is the body the project's loop.md driver invokes each iteration of a bare /loop; it can also be invoked directly to test…

modu-ai/moai-adk · 76 tokens

moai-workflow-project

Integrated project management system covering documentation, language initialization, template optimization, docs generation, and JIT document loading. Absorbed from moai-workflow-templates, moai-docs-generation, and moai-workflow-jit-docs.

modu-ai/moai-adk · 55 tokens

stale-ticket-triage

Replace the weekly "look at every ticket older than X days" meeting with a scheduled AI scan that picks close / snooze / keep per ticket plus a one-sentence reason, so a PM can bulk-approve in 90 seconds Monday morning.

aozyildirim/Agena · 57 tokens

weather-fetcher

Instructions for fetching current weather temperature data for Dubai, UAE from Open-Meteo API.

shanraisshan/claude-code-best-practice · 21 tokens

time-skill

Display the current time in Pakistan Standard Time (PKT, UTC+5). Use when the user asks for the current time, Pakistan time, or PKT.

shanraisshan/claude-code-best-practice · 37 tokens

weather-svg-creator

Creates an SVG weather card showing the current temperature for Dubai. Writes the SVG to orchestration-workflow/weather.svg and updates orchestration-workflow/output.md.

shanraisshan/claude-code-best-practice · 36 tokens