api-doc-check

api-doc-check is a skill for Claude Code, Codex from open-vela/.claude. It costs 46 tokens per session (903 once invoked), scanned A, original, Apache-2.0.

A checking tool for keeping public API documentation aligned with C header files, which define interfaces in systems software. It also checks Chinese and English translation consistency.

In plain words
What is it for?
Use it when adding or changing openvela APIs, auditing documentation coverage, or running the checks in a pre-commit hook or CI job.
Why use it?
It catches cases where an API changes but its reference documentation does not, before the change is committed.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: reads .claude/ paths.

Good fit Use it when adding or changing openvela APIs, auditing documentation coverage, or running the checks in a pre-commit hook or CI job.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/open-vela/.claude/api-doc-check
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.

Any agent
npx skills add open-vela/.claude --skill api-doc-check
Clone the repo
git clone --depth 1 https://github.com/open-vela/.claude

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for api-doc-check

README.md
[![agentmods](https://agentmods.dev/badge/skills/open-vela/.claude/api-doc-check/github.svg)](https://agentmods.dev/skills/open-vela/.claude/api-doc-check)
Your own site
<a href="https://agentmods.dev/skills/open-vela/.claude/api-doc-check"><img src="https://agentmods.dev/badge/skills/open-vela/.claude/api-doc-check/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for api-doc-check

Your own site · 80×15
<a href="https://agentmods.dev/skills/open-vela/.claude/api-doc-check"><img src="https://agentmods.dev/badge/skills/open-vela/.claude/api-doc-check.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 903 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00046 $0.00903
Opus 5.5 $0.00018 $0.00361
Sonnet 5.5 $0.00009 $0.00181
Haiku 4.5 $0.00005 $0.00090

Measured 3mo ago against content hash 952423e77830, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

api-doc-check 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 3mo ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/check-api-doc-sync.sh, scripts/check-zh-translation.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/api-doc-check/SKILL.md · 114 lines

How it starts

The opening of the file, as written. The whole thing — 114 lines — stays where its author put it; the contents beside it link to each section on GitHub.

API 文档检查 Skill

⚡ TL;DR 快速入门

# 检查头文件变更时文档是否同步
bash .claude/skills/api-doc-check/scripts/check-api-doc-sync.sh

# 检查本次变更的 API 文档翻译质量(中文检查中英混杂,英文检查混入中文)
bash .claude/skills/api-doc-check/scripts/check-zh-translation.sh

# 作为 pre-commit hook 安装(两项检查都会执行)
cp .claude/skills/api-doc-check/scripts/pre-commit .git/hooks/pre-commit

目标与适用场景

目标

确保 openvela 公开头文件(.h)与 API 参考文档(docs/zh-cn/api/)保持同步,防止头文件变更后文档未更新。

核心能力

能力 说明
✅ 头文件-文档映射 维护 50+ 个头文件到文档的对应关系
✅ 变更检测 检测 git staged 中的头文件变更
✅ 同步校验 验证头文件变更时对应文档是否也有更新
✅ 翻译质量检查 检测中英文文档的翻译质量问题
✅ pre-commit 集成 可作为 git hook 阻止不同步的提交

适用场景

  • 新增 API 头文件后,检查是否需要创建文档
  • 修改头文件后,提醒同步更新文档
  • 定期审计文档覆盖率
  • CI/CD 中自动检查文档同步状态

映射关系

当前维护的头文件 → 文档映射覆盖以下模块:

模块 映射数 头文件路径前缀
内核 5 nuttx/include/
蓝牙 13 frameworks/connectivity/bluetooth/framework/include/
多媒体 8 frameworks/multimedia/media/include/
Telephony 12 frameworks/connectivity/telephony/include/
系统框架 2 apps/system/ / frameworks/system/

详细映射见 scripts/check-api-doc-sync.sh 中的 HEADER_DOC_MAP。


使用方式

作为 pre-commit hook

cp .claude/skills/api-doc-check/scripts/pre-commit .git/hooks/pre-commit

这会同时执行两项检查:

  1. 头文件变更 → 文档同步检查
  2. API 文档 → 翻译质量检查(中文检查中英混杂,英文检查混入中文)

跳过检查

git commit --no-verify

新增模块时

  1. 在 scripts/check-api-doc-sync.sh 的 HEADER_DOC_MAP 中添加映射
  2. 创建对应的 API 文档文件

文档规范要点

生成 API 文档时遵循以下格式:

### 函数名

\`\`\`c
返回类型 函数名(参数列表);
\`\`\`

功能描述。

**参数**:

- \`param1\` 描述。

**返回值**:

成功时返回 X,失败时返回 Y。

关键规则

  • 全中文描述(函数名、类型名保留英文)
  • 每个 API 独立 ### 章节
  • 参数列表与函数签名严格一致
  • 返回值说明成功和失败两种情况
  • 头文件使用尖括号:#include <xxx.h>

Read the full file on GitHub · 114 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 3mo ago First seen · 114 lines · 46 tokens per session scan A 952423e77830

Subscribe to this mod's changes

api-doc-check is a skill published in the GitHub repository open-vela/.claude (6 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 46 tokens to every session and 903 once invoked, about $0.0002 per session on Opus 5.5. 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.

Related

api-doc-check compared with skills from other repositories

api-doc-check next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
api-doc-checkopen-vela/.claudeSkill62mo agoApache-2.0A46Claude Code, Codex
imagegenopenai/codexSkill137ktodayApache-2.0A113Codex
playwright-climicrosoft/playwrightSkill102ktodayApache-2.0A19Claude Code
browser-automationopenclaw/openclawSkill396ktodayMITA36Claude Code
free-llm-apismnfst/awesome-free-llm-apisSkill15ktodayCC0-1.0A113Claude Code, Codex
systematic-debuggingobra/superpowersSkill331k4d agoMITA21Claude Code
next-cache-components-adoptionvercel/next.jsSkill144ktodayMITA95Claude Code