/odin-native:modern-cpp-practicesfrom ODIN Native
Provides a structured guidance report for writing or reviewing modern C++ code, checking feature-test macros and cataloging available C++20/23/26 idioms based on compiler and standard level.
Ships in ODIN Native. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
| Field | Bound contract |
|---|---|
| Trigger | C++ code is being written, modernized, or reviewed and the selected compiler and standard permit newer safe idioms. |
| Authority | Read-only. No file, VCS, credential, paid, published, deployed, or remote mutation. Chat output only. |
| Side effect | Emits a structured guidance report to chat. No source files are modified. |
| Done | A guidance report is emitted listing applicable modern idioms, anti-pattern replacements, recommended hardening flags, and unavailable features with deferral notes. |
-std= value or project-agreed standard (e.g., C++20, C++23).CMakeLists.txt, Makefile, meson.build, compiler command lines) or from the supplied inputs. If the compiler or standard level cannot be determined, report the ambiguity and stop. Done when: the compiler, version, and standard are identified, or the ambiguity is reported.__cpp_concepts >= 201907L, __cpp_lib_format >= 202110L, __cpp_constexpr >= 202211L, __cpp_modules >= 201907L, __cpp_lib_expected >= 202211L, __cpp_lib_print >= 202207L, __cpp_lib_ranges >= 202110L, __cpp_lib_generator >= 202207L, __cpp_lib_mdspan >= 202207L). A feature is available only when its macro is defined and meets the required value for the compiler and standard in use. Done when: every relevant feature-test macro is checked.co_await/co_yield/co_return), std::format, three-way comparison (<=>), consteval, constinit, modules, designated initializers, std::span, std::jthread, std::source_location. Done when: the C++20 feature catalog is complete for the identified compiler.std::expected, std::print/std::println, std::generator, std::mdspan, std::flat_map/std::flat_set, if consteval, multidimensional subscript operator, std::stacktrace, deducing this. Done when: the C++23 feature catalog is complete for the identified compiler.std::inplace_vector, <contracts> (pre/post/contract_assert), reflection (^/[:/:]), and pattern matching (inspect, proposal-only). Gate each standardized feature on its feature-test macro; if the macro is absent or below threshold, mark the feature as unavailable for this compiler. Done when: the C++26 feature and proposal catalog is complete with availability gates, and proposals are marked as not available for production use.new/delete -> smart pointers (std::unique_ptr, std::shared_ptr) or RAII wrappers.static_cast, reinterpret_cast, std::bit_cast.std::experimental::scope_success/std::experimental::scope_fail (LFTS TS) / std::experimental::unique_resource.NULL/0 for null pointers -> nullptr.enum -> enum class.typedef for type aliases -> using.requires clauses.std::bind / std::bind1st / std::bind2nd -> lambdas.throw() / dynamic exception specifications -> noexcept.#pragma once in multi-TU builds -> include guards (or modules when available).std::auto_ptr -> std::unique_ptr.volatile for thread synchronization -> std::atomic.-Wall -Wextra -Wpedantic -Wshadow -Wconversion -Wsign-conversion -Wnull-dereference -Wimplicit-fallthrough.-Werror.-fsanitize=address,undefined -fno-sanitize-recover=all.-fstack-protector-strong.-D_FORTIFY_SOURCE=2 (GCC/libc) or -D_FORTIFY_SOURCE=3 (glibc 2.38+).-Wformat -Wformat-security -Wformat=2.-fcf-protection (GCC/Clang x86) or -fsanitize=cfi (Clang).-fPIE -pie for executables, -fPIC for shared libraries.| Failure class | Behavior |
|---|---|
| Compiler or standard undetermined | Report the ambiguity with the evidence examined. Do not guess. Guidance is blocked until the compiler and standard are identified. |
| Feature-test macro absent or below threshold | Mark the feature as unavailable for this compiler. Recommend the closest available alternative or defer the feature. Do not assume availability from the standard level alone. |
| Hardening flag unsupported | Omit the flag from the recommendation. Note which compiler rejects it. Recommend the subset that compiles cleanly. |
| Code uses a feature not yet standardized | Report the feature, its current proposal status, and the compiler-specific extension if one exists. Do not recommend non-standard features as portable. |
| Anti-pattern has no direct modern replacement | Report the anti-pattern, explain why no drop-in replacement exists, and recommend the closest safe alternative or a refactor path. |
No partial result is claimed complete. If any step cannot finish, the guidance report states which steps succeeded and which are blocked.
A structured guidance report containing:
What SKILL.md sets; muted values are Claude Code's defaults
138 skills in this plugin
/abi-and-calling-conventionsUse when explaining System V AMD64, ARM AAPCS, RISC-V psABI, stack frames, variadic calls, or FFI register rules. Not for the Rust FFI binding layer: use rust-ffi./adc-dac-baremetalUse when configuring ADC sampling time, DMA-driven ADC, calibration, or DAC channel setup on bare-metal MCUs. Not for the DMA stream itself: use dma-baremetal./af-xdpUse when creating AF_XDP sockets, configuring UMEM and XSK rings, writing an XDP redirect program, or choosing copy versus zero-copy mode. Not for full kernel bypass: use dpdk./apple-siliconUse when tuning or profiling native code on Apple M-series Macs: unified memory, 16 KiB pages, Accelerate and Metal for matrix work, xctrace and leaks, Rosetta 2, or sysctl hardware queries./arm-sveUse when writing or porting AArch64 SIMD to SVE or SVE2: arm_sve.h intrinsics, predicates, vector-length-agnostic loops, auto-vectorization, or SVE registers in GDB. Not for NEON: use simd-intrinsics./assembly-armUse when reading or writing AArch64 or AArch32 Thumb assembly, inline asm in C, AAPCS64 register roles, or NEON and SVE vector code. Not for ABI detail across ISAs: use abi-and-calling-conventions.npx claudepluginhub outlinedriven/odin-claude-plugin --plugin odin-nativeOther plugins' skills for the same job