一键导入
source-command-cpp-review
Comprehensive C++ code review for memory safety, modern C++ idioms, concurrency, and security. Invokes the cpp-reviewer agent.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Comprehensive C++ code review for memory safety, modern C++ idioms, concurrency, and security. Invokes the cpp-reviewer agent.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
REST API design patterns including resource naming, status codes, pagination, filtering, error responses, versioning, and rate limiting for production APIs.
Django testing strategies with pytest-django, TDD methodology, factory_boy, mocking, coverage, and testing Django REST Framework APIs.
Spring Security best practices for authn/authz, validation, CSRF, secrets, headers, rate limiting, and dependency security in Java Spring Boot services.
为网页应用快速接入 OpenClaw 通道配置,自动输出可直接复制的 Webhook URL 与 Token。用于用户说“帮我配置 OpenClaw 通道”“给我 Webhook 和 Token”“一键生成接入参数”“OpenClaw 对话接入配置”这类场景,支持外部网页与本地网页两种模式,减少手工查配置和复制错误。
基于 AI 自动生成高质量 PPT 图片和视频,支持智能转场和交互式播放。
Enforce TDD workflow for Kotlin. Write Kotest tests first, then implement. Verify 80%+ coverage with Kover.
| name | source-command-cpp-review |
| description | Comprehensive C++ code review for memory safety, modern C++ idioms, concurrency, and security. Invokes the cpp-reviewer agent. |
Use this skill when the user asks to run the migrated source command cpp-review.
This command invokes the cpp-reviewer agent for comprehensive C++-specific code review.
.cpp, .hpp, .cc, .h files via git diffclang-tidy and cppcheckUse /cpp-review when:
new/delete without RAIIsystem()std::lock_guard / std::scoped_lockstatic_cast/dynamic_castconst correctnessconst&)reserve() on known-size containersusing namespace std; in headers[[nodiscard]] on important return values# Static analysis
clang-tidy --checks='*,-llvmlibc-*' src/*.cpp -- -std=c++17
# Additional analysis
cppcheck --enable=all --suppress=missingIncludeSystem src/
# Build with warnings
cmake --build build -- -Wall -Wextra -Wpedantic
User: /cpp-review
Agent:
# C++ Code Review Report
## Files Reviewed
- src/handler/user.cpp (modified)
- src/service/auth.cpp (modified)
## Static Analysis Results
✓ clang-tidy: 2 warnings
✓ cppcheck: No issues
## Issues Found
[CRITICAL] Memory Leak
File: src/service/auth.cpp:45
Issue: Raw `new` without matching `delete`
```cpp
auto* session = new Session(userId); // Memory leak!
cache[userId] = session;
Fix: Use std::unique_ptr
auto session = std::make_unique<Session>(userId);
cache[userId] = std::move(session);
[HIGH] Missing const Reference File: src/handler/user.cpp:28 Issue: Large object passed by value
void processUser(User user) { // Unnecessary copy
Fix: Pass by const reference
void processUser(const User& user) {
Recommendation: FAIL: Block merge until CRITICAL issue is fixed
## Approval Criteria
| Status | Condition |
|--------|-----------|
| PASS: Approve | No CRITICAL or HIGH issues |
| WARNING: Warning | Only MEDIUM issues (merge with caution) |
| FAIL: Block | CRITICAL or HIGH issues found |
## Integration with Other Commands
- Use `/cpp-test` first to ensure tests pass
- Use `/cpp-build` if build errors occur
- Use `/cpp-review` before committing
- Use `/code-review` for non-C++ specific concerns
## Related
- Agent: `agents/cpp-reviewer.md`
- Skills: `skills/cpp-coding-standards/`, `skills/cpp-testing/`