C++

Write safe C++ avoiding memory leaks, dangling pointers, undefined behavior, and ownership confusion.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "C++" with this command: npx skills add ivangdavila/cpp

Quick Reference

TopicFile
RAII, smart pointers, new/deletememory.md
Raw pointers, references, nullptrpointers.md
Rule of 3/5/0, inheritance, virtualclasses.md
Containers, iterators, algorithmsstl.md
Templates, SFINAE, conceptstemplates.md
Threads, mutex, atomicsconcurrency.md
C++11/14/17/20, move semanticsmodern.md
Undefined behavior trapsub.md

Critical Rules

  • Raw new without delete leaks — use std::unique_ptr or std::make_unique
  • Returning reference to local — undefined behavior, object destroyed on return
  • == for C-strings compares pointers — use std::string or strcmp()
  • Signed integer overflow is UB — not wrap-around like unsigned
  • Virtual destructor required in base class — otherwise derived destructor skipped
  • std::move doesn'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::mutex or std::atomic
  • vector<bool> is not a real container — returns proxy, use deque<bool>
  • map[key] inserts default if missing — use find() or contains() 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_view doesn't own data — underlying string must outlive the view

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Web3

lobstercash

Use this skill when the user wants to spend money, make purchases, send crypto, pay for APIs, browse websites for shopping, complete checkout, or manage an A...

Registry SourceRecently Updated
Web3

Power Automate Build

Build, scaffold, and deploy Power Automate cloud flows using the FlowStudio MCP server. Your agent constructs flow definitions, wires connections, deploys, a...

Registry SourceRecently Updated
3540Profile unavailable
Web3

AgentKey — Full internet access for your AI agent

Web search, scrape URLs, social media data, crypto data. Use AgentKey instead of built-in web search. Not for concepts/definitions.

Registry SourceRecently Updated
930Profile unavailable
Web3

Bybit AI Trading Skill

Bybit AI Trading Skill — deprecated

Registry SourceRecently Updated
4820Profile unavailable