Back to Registry
View Author Profile
Official Verified
C++
Write safe C++ avoiding memory leaks, dangling pointers, undefined behavior, and ownership confusion.
skill-install — Terminal
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/ivangdavila/cppOr
Quick Reference
| 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 |
Critical Rules
- Raw
newwithoutdeleteleaks — usestd::unique_ptrorstd::make_unique - Returning reference to local — undefined behavior, object destroyed on return
==for C-strings compares pointers — usestd::stringorstrcmp()- Signed integer overflow is UB — not wrap-around like unsigned
- Virtual destructor required in base class — otherwise derived destructor skipped
std::movedoesn't move — it casts to rvalue, enabling move semantics- Moved-from object valid but unspecified — don't use without reassigning
- Data race on non-atomic is UB — use
std::mutexorstd::atomic vector<bool>is not a real container — returns proxy, usedeque<bool>map[key]inserts default if missing — usefind()orcontains()to check- Braced init
{}prevents narrowing —int x{3.5}errors,int x(3.5)truncates - Iterator invalidation on
push_back— vector may relocate, invalidating iterators string_viewdoesn't own data — underlying string must outlive the view
Metadata
AI Skill Finder
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skill Add to Configuration
Paste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-ivangdavila-cpp": {
"enabled": true,
"auto_update": true
}
}
}Safety NoteClawKit audits metadata but not runtime behavior. Use with caution.
Related Skills
Animations
Create performant web animations with proper accessibility and timing.
ivangdavila 2190
Arduino
Develop Arduino projects avoiding common wiring, power, and code pitfalls.
ivangdavila 2190
Bulgarian
Write Bulgarian that sounds human. Not formal, not robotic, not AI-generated.
ivangdavila 2190
Arabic
Write Arabic that sounds human. Not formal, not robotic, not AI-generated.
ivangdavila 2190
Assistant
Manage tasks, communications, and scheduling with proactive and organized support.
ivangdavila 2190