{"enrichment":{"faq":[{"a":"Cpp Idioms teaches RAII (Resource Acquisition Is Initialization) as the cornerstone of C++ memory safety. Smart pointers\u2014unique_ptr and shared_ptr\u2014encode ownership semantics directly in the type system. unique_ptr provides exclusive ownership with zero-cost abstraction; shared_ptr enables shared ownership with reference counting. Together they eliminate manual delete calls and prevent leaks, dangling pointers, and use-after-free bugs. Cpp Idioms shows how to choose the right pointer type for each ownership pattern.","q":"What are RAII, smart pointers, unique_ptr, and shared_ptr in Cpp Idioms?"},{"a":"Cpp Idioms focuses on writing safe, efficient code using C++17/20/23 features and proven design patterns. It teaches move semantics, value semantics, structured bindings, std::optional, and std::variant for expressive type-safe designs. The skill emphasizes zero-cost abstractions, the rule of five and rule of zero, and how to avoid anti-patterns. Practical code examples ground each concept, helping you apply idioms immediately in real projects.","q":"How does Cpp Idioms cover modern C++ idioms and best practices?"},{"a":"Cpp Idioms covers structured bindings for elegant tuple unpacking, constexpr for compile-time evaluation, std::optional and std::variant for safe optional and union types, and string_view for zero-copy parameter passing. C++20 concepts and ranges enable type-safe generic programming with clearer error messages. C++23 additions continue this trend toward safer, more expressive abstractions. Each feature is shown in context with real-world use cases.","q":"What C++17, C++20, and C++23 features does Cpp Idioms teach?"},{"a":"Cpp Idioms teaches std::expected as a modern alternative to exceptions for error handling. It represents either a success value or an error, enabling composable, exception-safe code paths. The skill contrasts std::expected with exceptions, showing when each is appropriate. You'll learn how to write exception-safe code, understand strong and weak guarantees, and use std::expected to encode error states in the type system for compile-time safety.","q":"How does Cpp Idioms approach error handling with std::expected?"},{"a":"Cpp Idioms guides you through setting up a modern C++ project with CMake, Google Test for unit testing, Google Mock for mocking, clang-format for consistent code style, and clang-tidy for static analysis. These tools enforce idioms and catch bugs early. The skill shows how to integrate them into your workflow, configure them for your team's standards, and use them to maintain code quality and catch anti-patterns automatically.","q":"What testing, formatting, and static analysis tools does Cpp Idioms cover?"},{"a":"Cpp Idioms teaches move semantics as the mechanism for efficient resource transfer without copying. You'll learn when to use move constructors, move assignment, and std::move, and how they interact with copy operations. Value semantics\u2014treating objects as values rather than pointers\u2014is emphasized for safety and clarity. The skill shows how move semantics enable zero-copy abstractions and how to design types that are both efficient and easy to reason about.","q":"How do move semantics and value semantics fit into Cpp Idioms?"}],"shadow_tags":["memory-safety","type-system","compile-time-optimization","resource-lifecycle","functional-programming","template-metaprogramming","static-analysis-tools","testing-frameworks","design-patterns"],"summary_rewrite":"Cpp Idioms teaches you how to write safe, efficient C++ code using modern language features and proven design patterns. Learn RAII principles, smart pointer ownership models, move semantics, and error handling with std::expected\u2014all grounded in C++17/20/23 standards. The skill covers interfaces, dependency injection, testing strategies, and anti-patterns to avoid, with practical code examples and tooling guidance."},"files":[{"bytes":8242,"path":".agents/skills/cpp-idioms/SKILL.md","sha256":"6520119de50f1ada39947de4729ab835ec3b1b1b192ab63de5762e5e43b0f368","url":"https://skillfed.io/files/irahardianto/awesome-agv/cpp-idioms/f1aaa60a/SKILL.md"}],"id":"irahardianto/awesome-agv/cpp-idioms","links":{"html":"https://skillfed.io/irahardianto/awesome-agv/cpp-idioms","md":"https://skillfed.io/irahardianto/awesome-agv/cpp-idioms.md","repo":"https://github.com/irahardianto/awesome-agv"},"meta":{"agents_supported":[],"first_seen":"2026-07-28","forks":48,"language":"JavaScript","last_updated":"2026-07-17","license":"MIT","name":"Cpp Idioms","publisher":"irahardianto","stars":150},"relations":{"similar":[{"id":"xu-xiang/everything-claude-code-zh/cpp-coding-standards"},{"id":"affaan-m/ECC/cpp-coding-standards"},{"id":"miles990/claude-software-skills/cpp"},{"id":"personamanagmentlayer/pcl/cpp-expert"},{"id":"softspark/ai-toolkit/cpp-rules"},{"id":"Mindrally/skills/cpp"},{"id":"Jeffallan/claude-skills/cpp-pro"},{"id":"irahardianto/awesome-agv/swift-idioms"},{"id":"mohitmishra786/low-level-dev-skills/cpp-coroutines"},{"id":"margelo/react-native-skills/cpp"}]},"slug":{"owner":"irahardianto","repo":"awesome-agv","skill":"cpp-idioms"},"version":"f1aaa60a"}
