Install
openclaw skills install cppWrite safe C++ avoiding memory leaks, dangling pointers, undefined behavior, and ownership confusion.
openclaw skills install cpp| Topic | File |
|---|---|
| RAII, smart pointers, new/delete | memory.md |
| Raw pointers, references, nullptr | pointers.md |
| Rule of 3/5/0, inheritance, virtual | classes.md |
| Containers, iterators, algorithms | stl.md |
| Templates, SFINAE, concepts | templates.md |
| Threads, mutex, atomics | concurrency.md |
| C++11/14/17/20, move semantics | modern.md |
| Undefined behavior traps | ub.md |
new without delete leaks — use std::unique_ptr or std::make_unique== for C-strings compares pointers — use std::string or strcmp()std::move doesn't move — it casts to rvalue, enabling move semanticsstd::mutex or std::atomicvector<bool> is not a real container — returns proxy, use deque<bool>map[key] inserts default if missing — use find() or contains() to check{} prevents narrowing — int x{3.5} errors, int x(3.5) truncatespush_back — vector may relocate, invalidating iteratorsstring_view doesn't own data — underlying string must outlive the view