Skip to main content

cpp

Use when: write or review modern C++ with RAII, smart pointers, and value semantics.

Datos de origen

Repositorio
kimtth/agent-skill-100-lines-or-less
Última actividad en el origen
26 de junio de 2026 a las 02:15
Idioma detectado de SKILL.md
inglés
Estrellas
2
Forks
0

Opciones de instalación

De forma predeterminada está seleccionado el prompt que primero revisa el origen. Puedes cambiar a un comando directo o descargar una copia local.

Revisa los archivos de origen

Lee SKILL.md y los archivos complementarios que muestra SkillsMP antes de decidir si quieres instalarlo.

Mostrando SKILL.md

SKILL.md
Instrucciones de origen · Vista previa de solo lectura
name
cpp
description
Use when: write or review modern C++ with RAII, smart pointers, and value semantics.
Goal: safe, modern C++ that manages resources automatically. Use for: - new C++ code or modernizing raw-pointer code - reviewing memory management, ownership, and safety - replacing new/delete and manual resource handling Workflow: 1. Manage resources with RAII; tie lifetime to scope. 2. Use smart pointers (unique_ptr, shared_ptr) over raw owning pointers. 3. Prefer value semantics and move where copies are costly. 4. Use the standard library containers and algorithms. 5. Mark const correctness and noexcept where applicable. 6. Verify with tests, sanitizers (ASan/UBSan), and warnings-as-errors. Idioms: - rule of zero; let RAII types manage resources - unique_ptr for single ownership, shared_ptr only when shared - std::move to transfer, not to micro-optimize blindly - range-based loops and algorithms over index loops Rules: - no naked new/delete in application code - pass by const reference for non-trivial reads - run with sanitizers to catch UB and leaks - prefer the standard library before hand-rolling
Ver en GitHub