lasyard-home-accounts-cpp-instructions.ocm.json json Copy{
"ocm": "1",
"id": "lasyard-home-accounts-cpp-instructions",
"kind": "skill",
"name": "cpp",
"description": "编写代码时,如果存在 `.clang-format` 文件,请遵循其中的规则。",
"publisher": "lasyard",
"version": "1.0.0",
"capabilities": {
"domains": [
"general"
],
"tags": [
"skill-md",
"github-instructions"
],
"languages": [
"en"
]
},
"quality_prior": 0.6,
"examples": [
"编写代码时,如果存在 `.clang-format` 文件,请遵循其中的规则。"
],
"primary": false,
"metadata": {
"source": {
"provider": "github-instructions",
"repository": "https://github.com/lasyard/home-accounts",
"path": ".github/instructions/cpp.instructions.md",
"ref": "765c89b5c25951f5170b80df7cfca153c3dde421",
"url": "https://github.com/lasyard/home-accounts/blob/765c89b5c25951f5170b80df7cfca153c3dde421/.github/instructions/cpp.instructions.md",
"key": "lasyard/home-accounts/.github/instructions/cpp.instructions.md"
},
"applies_to": "**/*.cpp, **/*.c, **/*.h"
},
"instructions": "# 编码规范\n\n编写代码时,如果存在 `.clang-format` 文件,请遵循其中的规则。\n\n## 头文件包含顺序\n\n头文件分为以下几组,按顺序包含:\n\n1. C++ 标准库头文件\n2. C 标准库头文件\n3. 编程框架提供的头文件(如 Qt, Boost, wxWidgets 等)\n4. 当前文件对应的头文件\n5. 当前目录下的其他头文件\n6. 当前模块内其他目录下的头文件\n7. 当前项目内其他模块的头文件\n8. 第三方库头文件\n\n在头文件中引用其他类型时,优先使用前向声明,除非需要访问类型的定义。\n\n## 其他约定\n\n- 函数参数未使用时,使用 `[[maybe_unused]]` 标记参数\n- 确保注释清晰简洁,首字母不要大写,句末不加标点符号",
"cost": {
"context_tokens": 82
}
}