Token导航 LogoToken导航

Agent Skill · 开发规范

cpp-core-guidelines-review(CPP 核心指南审查)

cpp-core-guidelines-review 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

cpp-core-guidelines-review 是开发规范类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为只读;许可证信息还不明确,第三方扫描已通过,按安装量在开发规范类的 1,265 个 Skill 里排第 487。

总安装 1,317周安装 56GitHub Stars 18下载 461核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:cpp-core-guidelines-review(CPP 核心指南审查)
来源仓库:https://github.com/openharmonyinsight/openharmony-skills
仓库路径:skills/cpp-core-guidelines-review
安装命令:
npx skills add https://github.com/openharmonyinsight/openharmony-skills --skill cpp-core-guidelines-review
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/openharmonyinsight/openharmony-skills --skill cpp-core-guidelines-review

这个 Skill 是做什么的

开发规范类 Skill 用来统一代码风格、目录结构和评审口径,产出多为检查清单或改写建议。

cpp-core-guidelines-review 并行检查 C++ 代码是否符合 C++ Core Guidelines,提升审查覆盖率。适用于 Pull Request 审核、质量门禁和持续改进,支持多子代理分工协作。需明确审查范围、文件模式和排除项,避免遗漏关键路径或误判合法代码。

建议输出结构化报告,标注违规等级并提供修复建议,便于开发者快速响应。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/cpp-core-guidelines-review

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/openharmonyinsight/openharmony-skills --skill…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它标注为只读,先用只读任务试一次,确认行为符合预期再扩大使用范围。

常见问题

6 条

cpp-core-guidelines-review 怎么安装?

在终端执行 npx skills add https://github.com/openharmonyinsight/openharmony-skills --skill cpp-core-g…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

cpp-core-guidelines-review 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

cpp-core-guidelines-review 需要什么权限?

权限级别是只读。该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

cpp-core-guidelines-review 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

cpp-core-guidelines-review 用的人多吗?

公开数据是累计安装 1,317 次,近一周安装 56 次,下载 461 次,GitHub 18 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

cpp-core-guidelines-review 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。
  • 标注为只读权限,试用阶段不容易误改本地文件。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理开发规范类任务、又不想每次都手写提示词的人。
  • 只想先试试效果、不希望它改动本地文件的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

开发规范类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
vercel-react-best-practices

Vercel React 最佳实践 · Codex、Claude

8,490,72025,918操作浏览器MIT通过
web-design-guidelines

网页设计指南 · Codex、Claude

6,686,01625,885需要联网MIT有提醒
remotion-best-practices

Remotion 最佳实践 · Codex、Claude

6,505,6323,027操作浏览器MIT有提醒
supabase-postgres-best-practices

Supabase Postgres 最佳实践 · Codex、Claude

3,175,5232,030需要联网MIT通过
next-best-practices

Next.js 最佳实践 · Codex、Claude

1,848,240841操作浏览器MIT通过
cpp-core-guidelines-review

CPP 核心指南审查 · 本页

1,31718只读未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

C++ Core Guidelines Review

Overview

Review C++ code against the C++ Core Guidelines by launching parallel sub-agents, each analyzing code against a specific guideline section. This skill ensures comprehensive coverage while maintaining high confidence in violation identification.

Workflow

Step 1: Understand Scope Clarification

Before launching any sub-agents, clarify the review scope with the user:

  1. Target files/directories: Which C++ source files or directories to review?
  2. File patterns: What file extensions should be included? (e.g., .cpp, .h, .hpp)
  3. Exclusions: Any files or directories to exclude?

Important: Do not proceed until the scope is clearly defined and unambiguous.

Step 2: Launch Parallel Sub-Agents

CRITICAL REQUIREMENTS:

  • You MUST launch one sub-agent for EVERY file in references/Content/. Do not skip any files. Each guideline section requires its own dedicated sub-agent.
  • Use the guideline-section-reviewer agent in agents/guideline-section-reviewer.md from this plugin for each sub-agent.

Parallel launch strategy: To maximize performance, launch all sub-agents in parallel by sending multiple Task tool calls in a single response message. The Task tool documentation explicitly states: "When the user specifies that they want you to run agents 'in parallel', you MUST send a single message with multiple Task tool use content blocks."

Launch one sub-agent per guideline section. Each sub-agent:

  • Reviews only against rules in its assigned guideline file
  • Outputs findings to <current-working-directory>/review/<SectionName>.md
  • Reports violations with: file path, line numbers, code snippet, and specific rule(s) violated

Agent invocation process:

  1. Read the agent template: Read the agent definition from agents/guideline-section-reviewer.md
  2. Substitute parameters: Replace the template variables in the agent file with actual values:

- {{SECTION_NAME}}: The display name of the section (e.g., "Functions") - {{SECTION_FILE}}: The filename of the section in references/Content/ (e.g., "Functions.md") - {{TARGET_FILES_PATTERN}}: The files/directories to review (e.g., "src/**/*.cpp" or specific file paths) - {{OUTPUT_DIR}}: The output directory (typically <current-working-directory>/review) - {{DATE}}: Current date in YYYY-MM-DD format - {{FILES_COUNT}}: Number of files being reviewed - {{VIOLATION_COUNT}}: Placeholder, will be filled by agent

  1. Launch the agent: Use the Task tool with subagent_type=general and the substituted prompt as the agent's instruction

Example invocation:

For section "Functions":
- Read agent template from agents/guideline-section-reviewer.md
- Substitute: SECTION_NAME="Functions", SECTION_FILE="Functions.md", etc.
- Launch guideline-section-reviewer agent with substituted prompt

The agent will:

  1. Read the guideline section from the plugin's references/Content/ directory
  2. Review the target files against that section's rules
  3. Output findings to <OUTPUT_DIR>/<SECTION_NAME>.md
  4. Report violations with file paths, line numbers, code snippets, and specific rule violations

Step 3: Wait for All Sub-Agents

After launching all sub-agents, collect their task IDs and wait for completion:

Waiting process:

  1. Track task IDs: Store the task ID returned by each Task tool invocation
  2. Wait for completion: For each task ID, use TaskOutput with:

- task_id: The task ID from the sub-agent launch - block=true: Wait until the sub-agent completes - timeout=600000 (10 minutes): Maximum wait time per agent

  1. Verify success: Check that each sub-agent:

- Completed without errors - Created its output file in <current-working-directory>/review/<SectionName>.md - Did not modify any source files

Error handling:

  • If a sub-agent fails: Report the error to the user and continue with other agents
  • If timeout occurs: Note which agents timed out and report to user
  • If output file missing: Indicate which section's review is incomplete

Verification checklist:

  • All sub-agents have been launched
  • All sub-agents have completed (or reported failures)
  • Output files exist for each completed section
  • No source files were modified

Step 4: Generate Summary

After all sub-agents complete, create <current-working-directory>/review/Summary.md with a comprehensive analysis of all findings.

Process:

  1. Read all section review files from <current-working-directory>/review/*.md (excluding Summary.md itself)
  2. Aggregate violation counts, affected files, and rule violations
  3. Generate summary using the template below

Summary.md template:

# C++ Core Guidelines Review Summary

## Overview

**Date**: YYYY-MM-DD
**Review Scope**: <Files/directories reviewed>
**Total Sections Reviewed**: <Number of sections completed>
**Total Violations Found**: <Total count across all sections>

## Summary by Section

| Section | Violations | Most Violated Rule |
|---------|------------|-------------------|
| Functions | N | F.15, ... |
| Classes and Class Hierarchies | N | C.7, ... |
| Resource Management | N | R.1, ... |
| [Continue for all sections] | | |

## Summary by File

| File | Total Violations | Top Violation Categories |
|------|------------------|--------------------------|
| path/to/file1.cpp | N | Resource Management, Error Handling |
| path/to/file2.h | M | Const Correctness, Interfaces |
| [Continue for affected files] | | |

## Top Violations by Frequency

| Rank | Rule ID | Rule Summary | Count |
|------|---------|--------------|-------|
| 1 | F.15 | Prefer simple and default constructs | N |
| 2 | R.3 | Raw pointers should not be used | M |
| [Continue] | | | |

## Critical Findings

### High-Priority Issues
<List violations with high impact or security implications>

### Most Common Patterns
<Identify recurring violation patterns across the codebase>

## Detailed Section Breakdown

### Functions (N violations)
<Brief summary of key violations in this section>
See: [Functions.md](Functions.md)

### Classes and Class Hierarchies (N violations)
<Brief summary of key violations in this section>
See: [Classes and Class Hierarchies.md](Classes%20and%20Class%20Hierarchies.md)

### [Continue for all sections with violations]

## Recommendations

1. **Immediate Actions**: <Critical violations that should be addressed soon>
2. **Process Improvements**: <Suggestions to avoid common violations>
3. **Training Topics**: <Areas where team education may help>

## Review Metadata

- **Sections Completed**: <List of sections that completed>
- **Sections Skipped/Failed**: <List of sections that had issues>
- **Total Files Reviewed**: <Count>
- **Lines of Code Reviewed**: <If available>

Key requirements for summary:

  • Include exact violation counts aggregated from all section reports
  • Sort tables by violation count (descending) where applicable
  • Link to individual section reports for detailed findings
  • Highlight patterns and systemic issues
  • Provide actionable recommendations based on findings

Critical Constraints (Highest Priority)

  1. No modifications: This skill and all sub-agents MUST NOT modify reviewed files. Write operations ONLY to <current-working-directory>/review/ directory.
  2. Main session non-involvement: Main conversation MUST NOT perform code review. Only coordinate sub-agents.
  3. Section-specific enforcement: Each sub-agent reviews ONLY against its assigned section. Cross-section violations are not reported.
  4. Rule correspondence: Every reported violation MUST map to a specific guideline rule. Unmappable findings are invalid.
  5. High confidence threshold: Only report violations with high confidence. Uncertain cases must be omitted.
  6. Violations only: Report ONLY guideline violations. Do NOT report code that follows guidelines correctly. Positive/conforming code must NOT appear in findings.

C++ Core Guidelines Structure

The C++ Core Guidelines reference files are bundled in this skill's references/ directory:

  • Introduction.md - Overview and glossary
  • Content/ - Individual guideline sections

Each section contains multiple rules with:

  • Rule identifier (e.g., "C.7", "F.15")
  • Rule statement
  • Rationale (Reason)
  • Examples (positive/negative)
  • Exceptions (if applicable)
  • Enforcement suggestions

User Interaction Patterns

Example 1: Review specific files

User: "Review src/transaction.cpp and src/account.h against C++ Core Guidelines"

→ Clarify scope, then launch sub-agents for those files.

Example 2: Review directory

User: "Review all C++ files in the services/ directory"

→ Clarify file patterns and exclusions, then launch sub-agents.

Example 3: Review against specific sections

User: "Review using only Resource Management and Error Handling guidelines"

→ Launch only those two sub-agents.

平台分布

Codex

35.64%
按下载量换算164

Claude

26.81%
按下载量换算124

Cursor

19.54%
按下载量换算90

Gemini CLI

8.94%
按下载量换算41

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills