cpp-safety
C++ memory safety and undefined behaviour prevention — bounds checking, lifetime management, and sanitizer usage
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
C++ memory safety and undefined behaviour prevention — bounds checking, lifetime management, and sanitizer usage
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Health check procedures D1–D14 for the Audit agent — structural validation, attention budget, version checks, workspace integrity, and static audit
Configure and manage Model Context Protocol servers for external tool access
Review a UI for accessibility — WCAG 2.1 AA compliance, semantic HTML, ARIA usage, keyboard navigation, focus management, colour contrast, and screen reader compatibility
Design or review a REST or GraphQL API — resource modeling, versioning strategy, error contract, OpenAPI/schema-first workflow, and security baseline
Generate a CHANGELOG.md entry from staged changes, a commit range, or a PR diff — following Keep a Changelog format with conventional commit classification
Set up and audit environment variable management — create .env.example, add startup validation, separate secrets from config, and document every variable
| name | cpp-safety |
| description | C++ memory safety and undefined behaviour prevention — bounds checking, lifetime management, and sanitizer usage |
| compatibility | >=1.4 |
Skill metadata: version "1.0"; license MIT; tags [cpp, c++, safety, sanitizers, memory]; recommended tools [codebase, editFiles, runCommands].
Applies to: **/*.cpp, **/*.hpp, **/*.cc, **/*.hh, **/*.cxx, **/*.hxx, **/*.h
-fsanitize=address) and UndefinedBehaviorSanitizer (-fsanitize=undefined) in debug/test builds.std::array or std::vector instead of C-style arrays. Access elements via .at() in debug code for bounds checking.std::move explicitly when transferring ownership. Don't access moved-from objects.nullptr instead of NULL or 0 for null pointers.reinterpret_cast — use static_cast or std::bit_cast (C++20) when type punning is needed.clang-analyzer-*, bugprone-*, and cppcoreguidelines-* checks.goto — use structured control flow, RAII, or scope guards.-fsanitize=thread) for concurrent code in test builds.