odjaramillo/custom-rules154 installs
cpp
Modern C++ best practices with C++17/20 features. Trigger: When writing C++ code with modern standards.
How do I install this agent skill?
npx skills add https://github.com/odjaramillo/custom-rules --skill cppIs this agent skill safe to install?
- Gen Agent Trust Hubpass
No security issues detected. The skill provides standard C++ best practices and compilation instructions.
- Socketpass
No alerts
- Snykpass
Risk: LOW · No issues
What does this agent skill do?
Critical Patterns
Smart Pointers (REQUIRED)
// ✅ ALWAYS: Use smart pointers
auto user = std::make_unique<User>("John");
auto shared = std::make_shared<Config>();
// ❌ NEVER: Raw new/delete
User* user = new User("John");
delete user;
RAII (REQUIRED)
// ✅ ALWAYS: Resource management through constructors/destructors
class FileHandle {
std::fstream file_;
public:
FileHandle(const std::string& path) : file_(path) {}
~FileHandle() { if (file_.is_open()) file_.close(); }
};
Modern Patterns (REQUIRED)
// ✅ Use auto for type deduction
auto items = std::vector<int>{1, 2, 3};
// ✅ Use range-based for loops
for (const auto& item : items) {
process(item);
}
// ✅ Use structured bindings
auto [name, age] = getPerson();
Decision Tree
Need unique ownership? → std::unique_ptr
Need shared ownership? → std::shared_ptr
Need optional value? → std::optional
Need multiple types? → std::variant
Need string views? → std::string_view
Commands
g++ -std=c++20 -Wall -Wextra main.cpp -o app
clang++ -std=c++20 main.cpp -o app
cmake -B build && cmake --build build
How can the creator link this skill?
Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.
<a href="https://skillzs.dev/skills/odjaramillo/custom-rules/cpp">View cpp on skillZs</a>