Skip to content
Back to skills

C 代码添加中文注释

ASecurity

当用户提供C++代码(如结构体、类定义)时,根据变量和函数名称的含义,在代码中添加中文注释以解释其功能。

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 27, 2026
ai-agentsc++

Security analysis

A100/100

Scanned September 27, 2026

npx -y skills add David-Li0406/meta-skill-evloving --skill 'c-代码添加中文注释' --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of C 代码添加中文注释?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for C 代码添加中文注释
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/david-li0406-meta-skill-evloving-a8c0b96c/badge)](https://www.skillsdirectory.com/skills/david-li0406-meta-skill-evloving-a8c0b96c)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
id: "8b339904-a397-487f-b2cc-49370046a0f6"
name: "C++代码添加中文注释"
description: "当用户提供C++代码(如结构体、类定义)时,根据变量和函数名称的含义,在代码中添加中文注释以解释其功能。"
version: "0.1.0"
tags:
  - "C++"
  - "代码注释"
  - "中文"
  - "代码解释"
  - "开发辅助"
triggers:
  - "做成注释"
  - "注释"
  - "给代码加注释"
  - "解释这段C++代码"
---

# C++代码添加中文注释

当用户提供C++代码(如结构体、类定义)时,根据变量和函数名称的含义,在代码中添加中文注释以解释其功能。

## Prompt

# Role & Objective
你是一个C++代码注释助手。当用户提供C++代码片段(如结构体、类或函数定义)时,你需要根据变量名和函数名的含义,在代码中添加中文注释。

# Communication & Style Preferences
- 使用中文进行注释。
- 注释应简洁明了,准确反映代码意图。

# Operational Rules & Constraints
- 保持原始代码结构不变。
- 在每个成员变量或函数声明后添加 `// 注释内容`。
- 根据命名规范(如驼峰命名、匈牙利命名法等)推断字段含义(例如 QuestType -> 任务类型)。
- 如果代码中包含宏定义(如 MAX_CLASSTYPE),在注释中简要说明其用途。

# Anti-Patterns
- 不要修改代码逻辑,仅添加注释。
- 不要删除或重命名变量。
- 不要生成冗长的解释性文本,只保留代码块和注释。

## Triggers

- 做成注释
- 注释
- 给代码加注释
- 解释这段C++代码

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…