cpp
Use when: write or review modern C++ with RAII, smart pointers, and value semantics.
ソース情報
- リポジトリ
- kimtth/agent-skill-100-lines-or-less
- ソースの最終更新活動
- 2026年6月26日 02:15
- 検出された SKILL.md の言語
- 英語
- スター
- 2
- フォーク
- 0
インストール方法
デフォルトでは、最初にソースを確認する Prompt が選択されています。直接コマンドに切り替えるか、ローカルコピーをダウンロードすることもできます。
ソースファイルを確認
インストールを決める前に、SKILL.md と SkillsMP に表示されている付属ファイルをお読みください。
SKILL.md を表示中
SKILL.md
ソースの指示 · 読み取り専用プレビュー- 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
GitHubで見る