← ClaudeAtlas

cpp-commentslisted

How Tsukini writes comments in C++ (from libutils) - section separators, /* group */ labels, trailing comments on declarations and includes, short English block comments, no Doxygen. Use whenever adding, rewriting or reviewing comments in C/C++ code for the user, or when generating C++ code that needs comments.
TsukiNi22/ai-utils · ★ 1 · Code & Development · score 74
Install: claude install-skill TsukiNi22/ai-utils
# Tsukini comment style (C++) Always in **English**, short, no final period, never Doxygen (`@brief`/`@param`/`///` are never used, the only `@` tags are `@date`/`@author`/`@file` of the file header). Comment the **why** and the non-obvious behavior, never paraphrase the code. ## 1. Structure comments (exact strings) Section separator (64 `-`), then the section title in upper case: ```cpp //----------------------------------------------------------------// /* INCLUDE */ ``` Titles: `INCLUDE`, `DEFINE`, `MACRO`, `TYPEDEF`, `ENUM`, `STRUCT`, `PROTOTYPE`, `CLASS`, `MIGRATION` (`TYPE` is the old name of `TYPEDEF`: rename it when editing a file). `TYPEDEF` holds the `using` / `typedef` aliases, `STRUCT` the `struct` / `union` (forward declarations included), never mixed (`cpp-class` `reference/layout.md`). Indented by 4 inside the include guard (INCLUDE/DEFINE), at column 0 after `namespace x {` (and for the types declared at column 0 before it). Class blocks (exact strings, aligned like this): ```cpp // ---------- Pre-Function -------- // // ------------ Function ---------- // // ------------ Operator ---------- // // ---------- Constructor --------- // // ----------- Destructor --------- // ``` A section separator or class block is only written when something is linked to it: never leave one empty. The blocks say what they hold (`xstyle` rule `CPP-CLASS-BLOCK`): `Pre-Function` = declarations only (body in the .cpp), `Function` =