Reviews Ascend C operator code for security and coding standard violations using hypothesis-driven analysis. Detects memory leaks, integer overflow, null pointer dereference, and other defects.
Ships in external-gitcode-ascend-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
调用此技能时,必须明确提供以下参数:
参数1:代码片段
参数2:检视规则描述
检查整数溢出、检查内存泄漏、检查空指针解引用等参数3:规范文件路径(可选)
如果缺少任何一个必需参数,应:
当用户指定检视规则描述时,按以下规则匹配规范文件:
数值运算、溢出、除零 → references/01_numeric_operations.md内存、指针、越界 → references/02_memory_pointer_safety.md资源、泄漏 → references/03_resource_management.md输入、验证 → references/04_input_validation.md并发、线程 → references/05_concurrency_safety.md算子接口、Runtime、Tiling、动态Shape → references/06_operator_interface.md接口兼容性、ABI → references/07_interface_compatibility.md步骤1:代码段识别
将目标代码划分为独立的代码段(函数、语句块、逻辑单元)
步骤2:假设建立
对每个代码段建立假设:
步骤3:证据收集与评估
按维度系统性寻找证据:
| 证据类型 | 分析动作 | 分值规则 |
|---|---|---|
| 红线规范违反 | 对照红线规范条款识别严重违规点 | 有效证据 +40% |
| 一般规范违反 | 对照一般规范条款识别违规点 | 有效证据 +20% |
| 上下文防御缺失 | 检查作用域内是否有防御代码 | 无防御 +30% |
| 函数调用链风险 | LSP/Grep 分析调用函数内部逻辑 | 发现风险 +25% |
| 数据流追踪风险 | 分析变量来源、运算过程 | 发现风险 +25% |
分析要求:
步骤4:证据有效性校验
排除误报:
步骤5:决策判断
计算自信值并决策:
详见:agents/ascendc-ops-reviewer/style/code_review_summary_style.txt
references/01_numeric_operations.md (opens in a new tab)references/02_memory_pointer_safety.md (opens in a new tab)references/03_resource_management.md (opens in a new tab)references/04_input_validation.md (opens in a new tab)references/05_concurrency_safety.md (opens in a new tab)references/06_operator_interface.md (opens in a new tab)references/07_interface_compatibility.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/external-gitcode-ascend-skills:external-gitcode-ascend-ascendc-operator-code-reviewfrom external-gitcode-ascend-skills
npx claudepluginhub ascend-ai-coding/awesome-ascend-skills --plugin external-gitcode-ascend-skills91 skills in this plugin
/external-gitcode-ascend-analyse-coverage分析测试覆盖率盲区,生成覆盖率分析报告/external-gitcode-ascend-arxiv-recommendation-npu自动化推荐系统论文发现流水线。抓取 arxiv 推荐论文,检测源码,生成待迁移任务清单,由 npu-model-migration skill 完成 NPU 适配。/external-gitcode-ascend-ascendc-operator-code-gen根据设计文档生成 AscendC 算子完整代码实现并完成框架适配。TRIGGER when: 设计文档已完成,需要生成 op_host/op_kernel 代码、注册到 PyTorch 框架、编译测试。关键词:代码生成、op_host、op_kernel、tiling、kernel、框架适配、算子注册。Other plugins' skills for the same job