Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计提醒

docs-check-zh-cn文档检查 zh cn

Agent Skill

用于辅助文档、README、Markdown、说明文和内容稿件的整理与改写。它适合让 Agent 提炼结构、补齐章节、统一术语、检查链接或把零散材料整理成可读文档。使用时应保留项目已有事实、命令和路径,不要把未确认的信息写成确定结论;涉及对外文案时,还需要控制语气,避免过度营销或夸大能力。

总安装

461

周安装

19

GitHub Stars

18

下载量

150
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/openharmonyinsight/openharmony-skills --skill docs-check-zh-cn

简介

用于执行 OpenHarmony API 文档质量检查,强调模板合规性和实现对齐。

  • 聚焦于错误码覆盖率和文档一致性,仅输出存在问题部分。
  • 自动推断公共和系统 API 文档路径,减少人工输入需求。
  • 适用于 OpenHarmony 项目文档维护和标准化管理。
  • 可集成到 CI/CD 流程中以自动化文档审核。docs-check-zh-cn 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Documentation Check

Run OpenHarmony API documentation quality checks with emphasis on template compliance, documentation consistency, error code coverage, and implementation alignment. Focus the output on issues only. Do not repeat content that already complies.

Input Collection

Infer paths from the user context, current working directory, and repository layout whenever possible. Ask the user only if the needed files still cannot be located.

Collect or infer the following inputs:

  • public API doc path, optional, usually under /docs
  • system API doc path, optional, usually under /docs
  • error code doc path, optional, usually under /docs
  • API definition path, usually under /interface
  • repository root path, only if interface implementations cannot be found from the current workspace

By default, resolve /docs first from the workspace root, then /interface.

If the user provides a path starting with /docs/... or /interface/..., interpret it as a repository-root path first, not as a path relative to the current module directory.

If the user provides only part of the paths, start from the known inputs and continue auto-discovery under the workspace root /docs and /interface. Explicitly state any unchecked scope in the report.

Workflow

Follow this order.

  1. Locate the documents, interface declarations, and implementation code.
  2. Run scripts/check_api_doc_consistency.py first for the stable automatable checks.
  3. Read the relevant templates and extract the actual writing requirements.
  4. Perform manual review for issues that cannot be checked reliably by script.
  5. Cross-check documentation against implementation behavior when needed.
  6. Output a Markdown report containing issues, impact, and fixes only.

Use this lookup order by default:

  1. User-provided paths
  2. Walk upward from the current working directory to locate the workspace root that contains docs and interface
  3. Workspace root /docs
  4. Workspace root /interface
  5. Other source directories that may contain related implementations

If the current directory is a submodule, do not assume /docs or /interface exists under the current directory. Find the workspace root first.

Template Selection

Use this template priority:

  1. In-repo template
  2. External documentation link
  3. Default templates bundled with this skill

In-repo template paths:

  • JS API template: /docs/blob/master/zh-cn/contribute/template/native-template.md
  • ArkTS component API template: /docs/blob/master/zh-cn/contribute/template/ts-template.md
  • Error code template: /docs/blob/master/zh-cn/contribute/template/errorcodes-template.md

External links:

  • JS API template: https://gitcode.com/openharmony/docs/blob/master/zh-cn/contribute/template/native-template.md
  • ArkTS component API template: https://gitcode.com/openharmony/docs/blob/master/zh-cn/contribute/template/ts-template.md
  • Error code template: https://gitcode.com/openharmony/docs/blob/master/zh-cn/contribute/template/errorcodes-template.md

Bundled fallback templates:

  • references/js-template.md
  • references/ts-template.md
  • references/errorcodes-template.md

Try the in-repo template first. If it does not exist, try the external link. If that is still unavailable, fall back to the bundled template under references/. State the actual template source used in the final report.

Choose the template based on the interface category:

  • Regular JS APIs, C APIs, or module-oriented API docs: use the JS API template
  • ArkTS component interface docs: use the ArkTS component template
  • Error code docs: use the error code template

For ArkTS component detection, prefer the owning Kit:

  • If the interface belongs to ArkUI, treat it as an ArkTS component interface and use ts-template
  • If the interface clearly uses ArkUI component semantics such as component, property, event, Builder, or Modifier concepts, also treat it as an ArkTS component interface
  • For non-ArkUI Kits, default to regular API documentation unless the existing documentation structure clearly follows the ArkTS component template

Do not choose a template from the filename alone. Consider the Kit, interface type, current document structure, and d.ts content together.

Manual Review Focus

After the script finishes, focus manual review on the parts that are not reliable to automate:

  • prose clarity, ambiguity, terminology consistency, and typo-level language quality
  • whether examples are genuinely useful, runnable, and well explained
  • whether the document structure really follows the template in spirit, not just in surface markers
  • whether scenarios, constraints, preconditions, and failure modes are explained well enough for developers
  • whether the documented causes for each error code are truly the union of real triggering scenarios
  • whether the documentation matches implementation behavior, capability boundaries, and product changes
  • whether ArkTS component docs provide enough guidance on parameters, defaults, ranges, and edge behavior

Implementation Alignment Checks

Use implementation code to identify missing or incorrect documentation such as:

  • Incomplete feature scenarios, sub-scenarios, or functional coverage
  • Missing concept, principle, or usage-scenario explanations that leave developers without enough context
  • Product, interface, or behavior changes that were not synchronized into the docs
  • Missing environment requirements, specification limits, preconditions, or failure scenarios

If the implementation cannot be located from the current repository, pause this part and ask the user for the correct repository path.

Output Requirements

Produce a Markdown report with the following rules:

  • Do not list content that already complies
  • For each issue, include line number or location, issue description, reasoning or impact, suggested fix, and concrete wording when possible
  • If you can provide corrected text directly, do so
  • Separately note unchecked scope, missing inputs, or anything that cannot be confirmed

Preferred issue fields:

  • Location
  • Issue
  • Suggestion
  • Proposed Fix

Resource Usage

Read files under references/ only when needed. Do not load everything by default. If a template is long, search for the relevant section first and then read only the needed part.

Use scripts/check_api_doc_consistency.py whenever the user provides a d.ts file together with public/system/error Markdown paths. The script already covers the repetitive high-confidence checks, including:

  • d.ts tag extraction and @throws parsing
  • public/system placement and direction-of-link checks
  • structured field checks for @syscap, @permission, @atomicservice, @systemapi, model-only tags, @deprecated, and @useinstead
  • section-level and document-level error-code coverage
  • -sys.md naming, title, and Readme-CN.md entry checks
  • mixed-module note checks for system docs
  • required block checks in error-code documents
  • basic version-marker checks such as module since notes and <sup>x+</sup> presence
  • in-page and relative Markdown link resolution

For field-style checks, prefer the script result over manual keyword search. The current script parses labeled documentation fields such as 系统接口, 模型约束, and 需要权限, which reduces noise from unrelated prose matches.

For @since handling, interpret tags from the dynamic-API documentation perspective only:

  • @since x means the dynamic API starts at version x
  • @since x dynamic means the dynamic API starts at version x
  • @since x dynamic&static means both dynamic and static forms start at version x; for the current checker, use x as the dynamic version
  • @since x static is ignored by the current doc checker
  • @since x dynamiconly means the API is dynamic-only and starts at version x
  • @since x staticonly is ignored by the current doc checker

Do not treat static-only version tags as documentation-version requirements for the current checks.

Do not hardcode evolving template wording in SKILL.md. The script reads its change-prone literals from scripts/doc_check_rules.json.

When the in-repo template or external template changes:

  1. Compare the new template wording against scripts/doc_check_rules.json.
  2. Update scripts/doc_check_rules.json first if only the expected text or required blocks changed.
  3. Update scripts/check_api_doc_consistency.py only when the rule logic itself is no longer valid.
  4. When template files are available locally, run the script with --js-template, --ts-template, and --error-template so it can warn when the configured rules no longer match the current template text.

Run it like this:

python3 scripts/check_api_doc_consistency.py \
  --api /path/to/file.d.ts \
  --public-doc /path/to/public.md \
  --system-doc /path/to/system.md \
  --error-doc /path/to/error.md \
  --readme-doc /path/to/Readme-CN.md \
  --js-template /path/to/native-template.md \
  --ts-template /path/to/ts-template.md \
  --error-template /path/to/errorcodes-template.md

--readme-doc is optional. If omitted, the script tries to infer Readme-CN.md from the public/system doc directory. The template arguments are also optional, but provide an additional guard that warns when the rule file no longer matches the current template wording.

Treat the script output as the first pass. Do not duplicate those low-level rules manually in the report unless you are clarifying or confirming a script finding. Spend manual review time on semantic gaps, explanation quality, and implementation alignment instead.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude

32.4%
按下载量换算49

Codex

31.54%
按下载量换算47

Cursor

17.53%
按下载量换算26

Gemini CLI

9.45%
按下载量换算14

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

需要联网

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

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills