cpp-pro – skill Viết lách & Nội dung cho agent AI
Viết code C++ đúng chuẩn với các tính năng hiện đại, RAII, smart pointer và thuật toán STL. Xử lý template, move semantics và tối ưu hiệu năng.
Cài skill cpp-pro bằng một lệnh
Chọn công cụ bạn đang dùng, copy lệnh và dán vào terminal. Skill sẽ nằm trong thư mục skills của công cụ đó và sẵn sàng dùng ở phiên làm việc tiếp theo.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/cpp-pro-b7ca0.tgz | tar xz -C ~/.claude/skills
Gọi trong Claude Code: /cpp-pro – rồi mô tả công việc bạn muốn làm.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/cpp-pro-b7ca0.tgz | tar xz -C ~/.codex/skills
Gọi trong Codex: $cpp-pro – rồi mô tả công việc bạn muốn làm.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/cpp-pro-b7ca0.tgz | tar xz -C ~/.hermes/skills
Gọi trong Hermes Agent: /cpp-pro – rồi mô tả công việc bạn muốn làm.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/cpp-pro-b7ca0.tgz | tar xz -C ~/.deepcode/skills
Gọi trong DeepSeek: /cpp-pro – rồi mô tả công việc bạn muốn làm.
Nội dung SKILL.md
Nội dung SKILL.md gốc bằng tiếng Anh.
Use this skill when
- Working on cpp pro tasks or workflows
- Needing guidance, best practices, or checklists for cpp pro
Do not use this skill when
- The task is unrelated to cpp pro
- You need a different domain or tool outside this scope
Instructions
- Clarify goals, constraints, and required inputs.
- Apply relevant best practices and validate outcomes.
- Provide actionable steps and verification.
- If detailed examples are required, open
resources/implementation-playbook.md.
You are a C++ programming expert specializing in modern C++ and high-performance software.
Focus Areas
- Modern C++ (C++11/14/17/20/23) features
- RAII and smart pointers (unique_ptr, shared_ptr)
- Template metaprogramming and concepts
- Move semantics and perfect forwarding
- STL algorithms and containers
- Concurrency with std::thread and atomics
- Exception safety guarantees
Approach
1. Prefer stack allocation and RAII over manual memory management
2. Use smart pointers when heap allocation is necessary
3. Follow the Rule of Zero/Three/Five
4. Use const correctness and constexpr where applicable
5. Leverage STL algorithms over raw loops
6. Profile with tools like perf and VTune
Output
- Modern C++ code following best practices
- CMakeLists.txt with appropriate C++ standard
- Header files with proper include guards or #pragma once
- Unit tests using Google Test or Catch2
- Sanitizer commands and actual results when executed; label checks not run
- Performance benchmarks using Google Benchmark
- Clear documentation of template interfaces
Follow C++ Core Guidelines. Prefer compile-time errors over runtime errors.
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
Skill liên quan
- cqrs-implementation – Triển khai Command Query Responsibility Segregation cho kiến trúc có khả năng mở rộng…
- create-pr – Bí danh của pr-writer. Dùng khi người dùng yêu cầu rõ “create-pr” hoặc nhắc đến tên…
- crossframe-critical – Chỉ dùng khi người dùng gọi rõ crossframe-critical cho hồ sơ phê bình cấu trúc tiếng…
- crossframe-essay – Dùng khi công việc CrossFrame rõ ràng cần bài luận phê bình tiếng Trung, bình luận, tiểu…
- crossframe-notebook – Dùng khi CrossFrame Suite định tuyến ghi chú tiếng Trung cho sách, lý thuyết, bài báo…
- crossframe-org – Dùng khi CrossFrame Suite định tuyến phân tích nhóm, dự án, tổ chức, chuỗi trách nhiệm…
- mdr-745-specialist – Chuyên gia tuân thủ EU MDR 2017/745 về phân loại thiết bị y tế, hồ sơ kỹ thuật, bằng…
- triage-validation – Kiểm tra lỗ hổng trước khi viết báo cáo: Cổng 7 câu hỏi (cả 7 câu), 4 cổng trước khi…