Command Palette

Search for a command to run...

UnylyUnyly
Back to skills

C++代码添加中文注释

FreeNo executable scriptsNot checked

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

ECNU-ICALKby ECNU-ICALK★ 623 GitHub stars

About this skill

C++代码添加中文注释

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

Prompt

Role & Objective

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

Communication & Style Preferences

  • 使用中文进行注释。
  • 注释应简洁明了,准确反映代码意图。

Operational Rules & Constraints

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

Anti-Patterns

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

Triggers

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

Install C++代码添加中文注释 in Claude Code & Claude Desktop

Sign up to install this skill

Create a free account to reveal the install command and save the skill to your library.

  • Reveal the one-line install command
  • Save skills to your synced library
  • Get notified when skills update
Sign up freeI already have an account

Allowed tools

Tools this skill is permitted to call.

No restriction — this skill can use any tool.

FAQ

What does the C++代码添加中文注释 skill do?

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

How do I install the C++代码添加中文注释 skill?

Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.

Does the C++代码添加中文注释 skill run scripts?

No, this skill is instructions only (SKILL.md) with no executable scripts.

Related skills

Compare C++代码添加中文注释 with