docs

A command for reviewing and completing technical documentation for a selected project module. It checks source-code comments, project documentation, and module README files.

In plain words
What is it for?
Use it to review C or C++ header comments, compare documented APIs with their implementation, check MkDocs pages, and fill in missing module documentation.
Why use it?
It helps find documentation that no longer matches the code, missing explanations, broken file references, and incomplete API details. Doxygen is a format for generating documentation from code comments, while MkDocs builds websites from Markdown files.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/awesome-embedded-learning-studio/cfdesktop/docs
Clone the repo
git clone --depth 1 https://github.com/Awesome-Embedded-Learning-Studio/CFDesktop

Made for: Claude Code.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 963 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00963
Opus 5 $0.00000 $0.00481
Sonnet 5 $0.00000 $0.00193
Haiku 4.5 $0.00000 $0.00096

Measured 2d ago against content hash e2db9d444111, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

docs scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/docs.md · 109 lines

What it actually says

/docs — 文档审查与补全

审查指定模块的文档准确性,补全缺失文档。

触发方式

  • /docs <模块路径> — 审查模块文档
  • 用户说"审查/改进 XXX 模块文档"

三大文档源

  1. Doxygen 源码注释 — 在 .h/.hpp 文件中的 /** *//// 注释
  2. MkDocs 文档document/HandBook/document/design_stage/ 目录
  3. 模块 README — 各模块目录下的 README 文件

审查流程

Step 1: 确定审查范围

  • 用户指定模块、文件或目录
  • 列出头文件和源文件清单
  • 识别对应的文档文件(document/HandBook/ 下)

Step 2: Doxygen 合规性检查

参考规范:document/DOXYGEN_REQUEST.md(权威标准)

对每个头文件检查:

文件级检查
  • @file 头部存在且路径正确
  • @brief, @author, @date, @version, @since, @ingroup 标签完整
  • 行宽 ≤ 100 字符
类型注释检查
  • 每个公共 class/struct/enum 前有 @brief
  • @details 描述生命周期和所有权(如有)
  • @ingroup 模块归属正确
函数注释检查
  • @brief 使用第三人称现在时
  • @param 包含方向标记 [in]/[out]/[in,out]
  • @param 顺序与函数签名一致
  • 非 void 函数有 @return,void 函数没有 @return
  • @throws, @note, @warning, @since, @ingroup 标签存在
  • 模板参数有 @tparam
风格一致性检查
  • 同一文件内统一使用 /** *////
  • 行宽 ≤ 100 字符
  • 无第一人称("we", "I", "our")

Step 3: 代码 vs 文档准确性

对每个已文档化的 API:

  1. @param 名称是否匹配函数签名
  2. @return 是否匹配实际返回类型
  3. @throws 是否匹配实际异常行为
  4. 描述的行为是否匹配实现
  5. 标记所有 @note FIXME 条目

Step 4: MkDocs 文档检查

  1. 验证 document/ 文件引用的路径是否存在
  2. 架构描述是否匹配当前代码结构
  3. 文档中的代码示例是否可编译且为最新
  4. document/design_stage/ 的完成度描述是否准确

Step 5: 输出报告 (中文)

# 文档审查报告: <module_name>

## Doxygen 合规性
### 合规文件
- `path/to/file.h` — 完全合规

### 违规文件
- `path/to/file.h` — 具体违规项:
  1. 缺少文件级 @file 头
  2. 函数 foo() 缺少 @param 方向标记
  3. ...

### 缺失文档的公共 API
- `Class::method()` — 完全无文档
- `Class::anotherMethod()` — 仅有 @brief,缺少标签

## 文档准确性
### 不一致列表
| 文件 | API | 文档描述 | 实际行为 |
|------|-----|----------|----------|

## MkDocs 文档状态
- 过时内容: ...
- 缺失页面: ...
- 路径失效引用: ...

## 修复优先级
1. **[高]** ...
2. **[中]** ...
3. **[低]** ...

集成现有基建

  • Doxygen 修复遵循 AGENT.md 的 5 步流程
  • 验证运行 python3 scripts/doxygen/lint.py
  • MkDocs 导航结构参考 mkdocs.yml
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 109 lines · 0 tokens per session scan A e2db9d444111

Subscribe to this mod's changes

docs is a command published in the GitHub repository Awesome-Embedded-Learning-Studio/CFDesktop (10 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 963 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.