Token导航 LogoToken导航

Agent Skill · 研究检索

cpp-api-documentation(CPP API 文档)

用于辅助 API 设计、接口文档、请求响应结构和服务集成说明。它适合让 Agent 梳理 endpoint、生成 OpenAPI 草稿、检查字段命名、整理错误码或辅助前后端联调。使用时需要确认真实业务语义、鉴权方式、分页和错误处理规则;涉及生成接口文档时,应避免凭空补字段,最好从现有代码、schema 或接口样例中提取事实。

cpp-api-documentation 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 56,650。

总安装 447周安装 19GitHub Stars 1下载 157核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:cpp-api-documentation(CPP API 文档)
来源仓库:https://github.com/sentenz/skills
仓库路径:skills/cpp-api-documentation
安装命令:
npx skills add https://github.com/sentenz/skills --skill cpp-api-documentation
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/sentenz/skills --skill cpp-api-documentation

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

cpp-api-documentation 指导为 C++ 头文件添加 Doxygen 兼容的注释,提升接口可读性和可维护性。适用于 API 设计、文档生成和团队协作,支持命名空间、类和函数级别的说明。仅作用于 header 文件,不创建新资源(如 Doxyfile),需遵循特定注释模板和交叉引用规则。

建议与现有代码风格保持一致,避免过度注释,重点覆盖公共接口和设计意图。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/cpp-api-documentation

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/sentenz/skills --skill cpp-api-documentation;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

cpp-api-documentation 怎么安装?

在终端执行 npx skills add https://github.com/sentenz/skills --skill cpp-api-documentation。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

cpp-api-documentation 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

cpp-api-documentation 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

cpp-api-documentation 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

cpp-api-documentation 用的人多吗?

公开数据是累计安装 447 次,近一周安装 19 次,下载 157 次,GitHub 1 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

cpp-api-documentation 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
cpp-api-documentation

CPP API 文档 · 本页

4471需要联网未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

API Documentation

Instructions for AI coding agents on adding Doxygen-compatible documentation comments to C++ header files.

[!NOTE] This skill is for documenting header files only. Do NOT create new resource files (e.g., Doxyfile, scripts, README).

- 3.1. File Documentation - 3.2. Namespace Documentation - 3.3. Class Documentation - 3.4. Function/Method Documentation - 3.5. Cross-References - 3.6. Member Documentation - 3.7. Enumerations - 3.8. Grouping and Modules - 3.9. Inheritance - 3.10. Formula Documentation

- 6.1. File Header Template - 6.2. Namespace Template - 6.3. Class Template - 6.4. Function Template - 6.5. Member Variable Template - 6.6. Enumeration Template - 6.7. Module/Group Template - 6.8. Formula Template

1. Benefits

  • Discoverability Well-documented APIs enable developers to quickly understand and use components without reading implementation details.
  • Maintainability Documentation embedded in source code stays synchronized with implementation, reducing drift between code and documentation.
  • Traceability Documentation comments serve as living specifications, keeping API contracts synchronized with implementation.

2. Principles

Effective API documentation follows these core principles.

  • Complete Document all public APIs including classes, functions, parameters, return values, and exceptions. Private implementation details may be omitted.
  • Contextual Documentation provides context about usage patterns, performance characteristics, and thread safety guarantees.
  • Consistent Use a uniform style, format, terminology and structure throughout the API documentation using the patterns defined in this skill.
  • Concise Use clear, brief descriptions. Avoid redundant information that restates what is obvious from the signature.
  • Concrete Provide specific details about behavior, edge cases, and error conditions rather than vague statements.
  • Convenient Documentation should be easy to access and navigate, integrated with development tools and workflows.
  • Accurate Documentation must match the actual behavior. Update documentation whenever the implementation changes.
  • Actionable Include usage examples, preconditions, postconditions, and error handling to help developers use the API correctly.

3. Patterns

3.1. File Documentation

File-level documentation provides context for the entire header file.

  • Purpose Describes the file's role in the project architecture.
  • Author Identifies the original author(s) of the file.
  • License Specifies the licensing terms (typically SPDX identifier).

3.2. Namespace Documentation

Namespace-level documentation describes the purpose of the namespace.

  • Brief A one-line summary of what the namespace contains.
  • Details Extended description of the namespace's role and contents.

3.3. Class Documentation

Class-level documentation describes the abstraction.

  • Brief A one-line summary of what the class represents.
  • Details Extended description of responsibilities, invariants, and usage patterns.
  • Template Parameters For template classes, document each template parameter's purpose and constraints.

3.4. Function/Method Documentation

Function-level documentation describes the contract.

  • Brief A one-line summary of what the function does.
  • Parameters Document each parameter with @param including direction ([in], [out], [in,out]).
  • Return Value Document the return value with @return or @retval for specific values.
  • Exceptions Document thrown exceptions with @throws or @exception.
  • Warnings Use @warning for critical warnings about misuse.
  • Notes Use @note for important information.
  • Preconditions Document preconditions with @pre.
  • Postconditions Document postconditions with @post.
  • Code Examples Use @code and @endcode blocks for usage examples.

3.5. Cross-References

Cross-references link related documentation.

  • See Also Use @see to reference related functions, classes, or external resources.

3.6. Member Documentation

Member-level documentation clarifies data semantics.

  • Inline Comments Use ///< description for trailing inline documentation.
  • Block Comments Use /// description for preceding documentation.

3.7. Enumerations

Enumerations document possible values and their meanings.

  • Values Document each enumerator with a brief Inline Comments description.

3.8. Grouping and Modules

Organize related elements into logical groups.

  • Defgroups Use @defgroup to create named documentation modules.
  • Ingroups Use @ingroup to add elements to existing groups.
  • Memberof Use @memberof for explicit class membership.

3.9. Inheritance

Class hierarchies and inherited documentation.

  • Base Classes Document inherited classes with @copydoc or @copybrief to reuse base class documentation.

3.10. Formula Documentation

Mathematical formulas using LaTeX syntax for algorithms and technical documentation.

  • Inline Formulas Use \f$..\f$ for formulas that appear within running text (opens LaTeX math mode).
  • Inline Text-Mode Formulas Use \f(...\f) for LaTeX elements that don't require explicit math mode (e.g., logos like \LaTeX).
  • Displayed Formulas Use \f[...\f] for centered, unnumbered equations on separate lines.
  • Environment Formulas Use \f{environment}{...\f} for specific LaTeX environments (e.g., eqnarray*, align).
  • MathJax Alternative Enable USE_MATHJAX in Doxyfile for client-side formula rendering without requiring LaTeX installation.
  • Custom Macros Use FORMULA_MACROFILE configuration to define reusable LaTeX commands with \newcommand.

4. Workflow

[!IMPORTANT] Do NOT create Doxyfile, scripts, or other resource files. Only modify header files.
  1. Identify Identify undocumented or poorly documented public APIs in header files (e.g., src/<module>/<header>.hpp).
  2. Add Documentation Comments Add Doxygen-compatible documentation comments directly to header files following the templates below.
  3. Documentation Coverage Requirements Include comprehensive documentation for:

- All public classes, structs, and enums - All public and protected member functions - All function parameters and return values - All template parameters - Exception specifications - Thread safety guarantees when applicable - Complexity guarantees for algorithms

  1. Apply Templates Structure all documentation using the template patterns below.
  2. Review Review documentation for accuracy and readability.

5. Style Guide

Doxygen supports multiple comment styles. Use the Javadoc style for consistency.

  • Language Write documentation in clear, concise English. Use present tense for descriptions ("Returns the sum" not "Will return the sum").
  • Line Length Keep documentation lines under 100 characters for readability.
  • Block Comments Use /**... */ for multi-line documentation blocks. Each line within the block should start with *.
  • Comment Style Prefer /// for single-line documentation and /** */ for multi-line documentation blocks. Use Javadoc-style commands (@param, @return) rather than Qt-style (\param, \return).
  • Brief Descriptions Use @brief for explicit brief descriptions.
  • Detailed Descriptions Add detailed descriptions after the brief, separated by a blank line or using @details.
  • Parameter Direction Always specify parameter direction using [in], [out], or [in,out] for clarity.
  • Code Examples Use @code and @endcode blocks for usage examples within documentation.
  • Cross-References Use @see to reference related functions, classes, or external resources.
  • Warnings and Notes Use @note for important information and @warning for critical warnings.
  • Deprecation Mark deprecated APIs with @deprecated including migration guidance.
  • TODO Items Use @todo for planned improvements visible in generated documentation.
  • Order of Tags Follow this order for function documentation: @brief @details (if needed) @tparam (for templates) @param @return @throws @pre @post @note @warning @see @deprecated

6. Template

Use these templates for new documentation. Replace placeholders with actual values.

6.1. File Header Template

[!NOTE] Place the @file block after the include guard (#pragma once or #ifndef/#define). This ensures the documentation is parsed once along with the declarations it describes and keeps preprocessor directives separate from API documentation.
#pragma once

/**
 * @file <filename>.hpp
 * @brief One-line description of the file's purpose.
 *
 * Detailed description of the file's contents and design decisions.
 *
 * @author <author_name>
 * @copyright Copyright (c) <year> <organization>
 * @license SPDX-License-Identifier: <license_identifier>
 */

6.2. Namespace Template

/**
 * @brief One-line description of namespace contents.
 *
 * Detailed description of the namespace's role, the types of
 * components it contains, and how they relate to each other.
 */
namespace namespace_name {

// Namespace contents

}  // namespace namespace_name

6.3. Class Template

/**
 * @brief One-line description of the class.
 *
 * Detailed description of the class responsibility, key invariants,
 * and usage patterns.
 *
 * @tparam T Description of template parameter and constraints.
 *
 * @note Thread safety: Describe thread safety guarantees.
 *
 * @see RelatedClass
 *
 * @code
 * ClassName<int> obj;
 * obj.method(param);
 * @endcode
 */
template <typename T>
class ClassName
{
  // ...
};

6.4. Function Template

/**
 * @brief One-line description of what the function does.
 *
 * Detailed description including algorithm details and edge cases.
 *
 * @param[in] param1 Description of the input parameter.
 * @param[out] param2 Description of the output parameter.
 * @param[in,out] param3 Description of bidirectional parameter.
 *
 * @return Description of the return value.
 * @retval specific_value Meaning of this specific return value.
 *
 * @throws std::invalid_argument If param1 is invalid.
 * @throws std::runtime_error If operation fails.
 *
 * @pre Preconditions that must be met before calling.
 * @post Postconditions guaranteed after successful execution.
 *
 * @note Important information for users.
 * @warning Critical warnings about potential misuse.
 *
 * @see relatedFunction()
 *
 * @code
 * auto result = functionName(input, output);
 * @endcode
 */
ReturnType functionName(const InputType& param1, OutputType& param2);

6.5. Member Variable Template

class ClassName
{
private:
  int count_;       ///< Number of items currently stored.
  bool is_valid_;   ///< Whether the object is in a valid state.

  /// Description for simple members.
  int simple_member_;

  /**
   * @brief Buffer for temporary storage.
   *
   * Detailed explanation of the member's purpose and
   * synchronization requirements.
   */
  std::vector<char> buffer_;
};

6.6. Enumeration Template

/**
 * @brief Description of what this enumeration represents.
 *
 * Detailed description of the enum's purpose and usage context.
 */
enum class EnumName
{
  Success,     ///< Operation completed successfully.
  Error,       ///< Operation failed with an error.
  Pending,     ///< Operation is still in progress.
  NotFound     ///< Requested item was not found.
};

6.7. Module/Group Template

/**
 * @defgroup module_name Module Display Name
 * @brief One-line description of the module.
 *
 * Detailed description of the module purpose and components.
 *
 * @{
 */

// Classes and functions belonging to this group

/** @} */  // End of module_name

6.8. Formula Template

/**
 * @brief Calculates the Euclidean distance between two points.
 *
 * The distance between \f$(x_1,y_1)\f$ and \f$(x_2,y_2)\f$ is
 * \f$\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}\f$.
 *
 * For complex equations, use displayed formulas:
 * \f[
 *   d = \sqrt{\sum_{i=1}^{n}(p_i - q_i)^2}
 * \f]
 *
 * Multi-line equations using eqnarray environment:
 * \f{eqnarray*}{
 *   E &=& mc^2 \\
 *   F &=& ma
 * \f}
 *
 * @param[in] x1 X-coordinate of the first point.
 * @param[in] y1 Y-coordinate of the first point.
 * @param[in] x2 X-coordinate of the second point.
 * @param[in] y2 Y-coordinate of the second point.
 *
 * @return The Euclidean distance \f$d \geq 0\f$.
 */
double distance(double x1, double y1, double x2, double y2);

7. References

平台分布

Codex

35.51%
按下载量换算56

Claude

29.38%
按下载量换算46

Cursor

19.44%
按下载量换算31

Gemini CLI

9.72%
按下载量换算15

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills