跳到主内容
智客 ZICQ

技能库 智客分类:文档办公 docs-guard

Docs Guard

向它发运的检讨生成或更改的文件——READMEs,API参考文献,docstrings,PHPDoc/JSDoc,更改日志,教程,和doc站点. 在代理写作或编辑docs后,在代码更改记录的行为后,或在发布docs之前,最佳反应使用. 当用户说“ 审查 docs ” 时使用, “ 此文档是否准确 ” , “ 更新 docs ” , “ 写入 README ” , “ 文档 API ” , “ 添加 docstring ” , 或 “ 添加更改日志条目 ” 。 核心任务:核对每个引用的函数、旗帜、端点、配置密钥和代码样本,对照源;捕捉docs-vs-code漂移;条形填充器和无法核实的索偿要求。 禁止使用生产代码审查(使用干净码-护卫)、测试审查(使用测试-护卫)、营销副本或博客文章、非技术写作的散文风格编辑、或文献网站主题.

3677 安装量

官方网址:skills.sh

技能介绍

先看中文介绍;官方 description 原文单独保留,不改写 SKILL.md。

做什么

向它发运的检讨生成或更改的文件——READMEs,API参考文献,docstrings,PHPDoc/JSDoc,changelogs,教程和doc站点. 在代理撰写或编辑docs后、在代码更改后记录的行为后、或在发布docs之前,最佳反应使用

何时用

用户表示“ 审查文件” 、 “ 此文档是否准确 ” 、 “ 更新文件 ” 、 “ 写入 README ” 、 “ 文档此 API ” 、 “ 添加docstring ” 或 “ 添加更改日志条目 ” 。 核心任务:对照源头验证每个被引用的函数、旗帜、终点、配置密钥和代码样本;

代理如何加载

按 Agent Skills 渐进披露:启动时只加载 name 与 description(约 100 token);任务匹配后才读入整份 SKILL.md 正文;scripts/、references/、assets/ 仅在需要时再读。 本文件正文结构:Docs Guard、How to use this skill、Adapt to the project first、The Rules、Accuracy — must fix、Versioning and drift。

文件分析

文件分析:除 SKILL.md 外,正文引用了 references/review-checklist.md、references/verification.md、references/code-samples.md、references/docstrings.md,属于带资源的技能包,这些文件按需再读。

官方 description(原文)

Review generated or changed documentation before it ships — READMEs, API references, docstrings, PHPDoc/JSDoc, changelogs, tutorials, and doc sites. Best used reactively after an agent writes or edits docs, after code changes documented behavior, or before publishing docs. Use when the user says 'review the docs', 'is this documentation accurate', 'update the docs', 'write a README', 'document this API', 'add a docstring', or 'add a changelog entry'. Core job: verify every referenced function, flag, endpoint, config key, and code sample against the source; catch docs-vs-code drift; strip filler and unverifiable claims. DO NOT USE for production code review (use clean-code-guard), test review (use test-guard), marketing copy or blog posts, prose style editing of non-technical writing, or documentation site theming.

Docs GuardHow to use this skillAdapt to the project firstThe RulesAccuracy — must fixVersioning and driftSubstance — should fixStructure — worth notingSelf-check before deliveryReporting format (review mode)Severity guideReferences

来源分类:skills.sh agent-skill

SKILL.md 与 Agent 调用

官方规范 ↗
name
docs-guard
description
Review generated or changed documentation before it ships — READMEs, API references, docstrings, PHPDoc/JSDoc, changelogs, tutorials, and doc sites. Best used reactively after an agent writes or edits docs, after code changes documented behavior, or before publishing docs. Use when the user says 'review the docs', 'is this documentation accurate', 'update the docs', 'write a README', 'document this API', 'add a docstring', or 'add a changelog entry'. Core job: verify every referenced function, flag, endpoint, config key, and code sample against the source; catch docs-vs-code drift; strip filler and unverifiable claims. DO NOT USE for production code review (use clean-code-guard), test review (use test-guard), marketing copy or blog posts, prose style editing of non-technical writing, or documentation site theming.
  1. 发现技能客户端向 Agent 提供名称与描述目录。
  2. 匹配与调用用户指定或任务匹配后,载入 SKILL.md 指令。
  3. 按需加载按步骤读取参考文档、使用脚本与素材。
指令中引用的文件 · 4
  • references/review-checklist.md
  • references/verification.md
  • references/code-samples.md
  • references/docstrings.md

以下路径提取自原文;文件是否齐全请以来源仓库中的完整目录为准。

具体调用语法与可用工具以目标 Agent 客户端为准。 查看调用机制说明 ↗

安装这个技能

Skills CLI ↗

先选择目标 Agent 和安装范围,保留技能包的附属文件,安装后检查客户端能否发现该技能。

该技能引用了附属文件,请从来源获取完整目录;仅复制 SKILL.md 可能缺少依赖。

交给 Agent 安装

复制安装指令给支持 Agent Skills 的代理,确认其中的目标目录与客户端匹配。

把 Agent Skill「docs-guard」安装到我的项目:SKILL.md 原文与官方 description 见 https://zicq.com/zh/skills/skl-571b8647fb945b19-%E5%8C%BB%E7%94%9F%E8%AD%A6%E5%8D%AB.html
请存为 .cursor/skills/docs-guard/SKILL.md 或 .claude/skills/docs-guard/SKILL.md,frontmatter 的 name 与 description 保持原样,不要改写。
该技能还带 scripts/、references/、assets/ 等文件,请从 https://github.com/amelnagdy/guard-skills 取完整目录,不要只建一个 SKILL.md。

GitHub 完整包 ↗

终端安装 · Skills CLI

需要 Node.js 与 npx。先查看仓库技能列表,确认实际名称。

npx skills add 'https://github.com/amelnagdy/guard-skills' --list

npx skills add 'https://github.com/amelnagdy/guard-skills' --skill 'docs-guard'

CLI 会交互选择目标 Agent,默认安装到项目;用户级安装使用 -g。先通过查看命令核对仓库内容,再用 npx skills list 检查已安装技能。

阅读排版
--- name: docs-guard description: "Review generated or changed documentation before it ships — READMEs, API references, docstrings, PHPDoc/JSDoc, changelogs, tutorials, and doc sites. Best used reactively after an agent writes or edits docs, after code changes documented behavior, or before publishing docs. Use when the user says 'review the docs', 'is this documentation accurate', 'update the docs', 'write a README', 'document this API', 'add a docstring', or 'add a changelog entry'. Core job: verify every referenced function, flag, endpoint, config key, and code sample against the source; catch docs-vs-code drift; strip filler and unverifiable claims. DO NOT USE for production code review (use clean-code-guard), test review (use test-guard), marketing copy or blog posts, prose style editing of non-technical writing, or documentation site theming." --- # Docs Guard You are reviewing generated or changed documentation before it ships. Apply the rules below as a guard pass after the first documentation pass. The core principle: documentation is a set of claims about a codebase, and every claim is checkable. Your job is to check them. These rules exist because AI agents document from memory of how APIs *usually* look, not from the code in front of them. Published research: half of AI answers to programming questions contain incorrect information, and models produce valid invocations for infrequent APIs barely a third of the time — yet the prose sounds authoritative either way. Readers cannot tell verified docs from hallucinated docs. You can, because you have the source. ## How to use this skill **Guard-pass mode** (recommended): after documentation or docstrings have been generated or edited, verify every claim against the source and run the self-check before delivery. **Live mode** (explicit): when the user invokes this skill before writing docs, verify before you write — read the actual implementation, then document what it does. Run the self-check before delivery. **Review mode** (the user asks you to review, audit, or fact-check docs): walk [references/review-checklist.md](references/review-checklist.md) against the target docs and produce a findings report with file:line evidence. Do not rewrite in review mode unless asked. ## Adapt to the project first 1. Read the project's agent instructions (CLAUDE.md, AGENTS.md) and any docs style guide. Project conventions win on conflict. 2. Identify the docs surfaces that must move together: README, reference docs, docstrings, changelog, examples, config samples. A change to one usually owes a change to others (Rule 6). 3. Note the documented version policy: which versions does the project support, and where are features version-tagged? ## The Rules ### Accuracy — must fix 1. **Every referenced symbol must exist.** Every function, method, class, hook, CLI command, flag, endpoint, config key, env var, and file path mentioned in the docs gets verified against the actual source, CLI help output, route table, or schema — by reading it, not recalling it. The verification procedure is in [references/verification.md](references/verification.md). An unverifiable reference does not ship. 2. **Every code sample must work.** Imports resolve, APIs exist with the documented signatures (names, argument order, defaults, return shape), and the sample runs outside the author's machine — no hardcoded local paths, no real credentials, no implicit prior state. Sample rules: [references/code-samples.md](references/code-samples.md). 3. **Document the code's actual behavior, not its intended behavior.** Read the implementation before describing it. Where code and comments/specs disagree, the code is the truth — and flag the disagreement to the user instead of silently picking a side. 4. **No unverifiable claims.** Performance numbers, compatibility matrices, scale limits, and "production-ready" assertions require a source in the repository (benchmark script, CI matrix, changelog entry) or they come out. "Fast" is marketing; "O(n log n), benchmarked in bench/sort.md" is documentation. ### Versioning and drift 5. **Versions are explicit.** Features, flags, and behaviors state the version that introduced them when the project tracks versions. Prerequisites are pinned or ranged, never "latest". Deprecated items say so, with the replacement. 6. **A code change owes a docs change.** When editing code whose behavior is documented — rename, signature change, new default, removed flag — update every doc surface that mentions it in the same change. Grep the docs for the old symbol before finishing. ### Substance — should fix 7. **No filler, no slop.** Delete: docstrings that paraphrase the signature ("Gets the user by ID" above `get_user_by_id`), sections that restate their heading, marketing adjectives in technical prose ("powerful", "seamless", "blazingly fast"), and intro padding ("In this section, we will explore…"). A docstring earns its place by adding contracts the signature cannot express: units, ranges, error conditions, side effects, threading/ordering guarantees. 8. **Don't paraphrase upstream docs.** Link to external documentation instead of restating it — paraphrased upstream docs drift the moment upstream changes. Document only your project's relationship to the external thing (which subset you use, what you configure differently). 9. **Examples cover the failure path too.** A tutorial that only shows the happy path documents half the API. Show what the error looks like and what the caller should do — using the error types the code actually raises (verify per Rule 1). ### Structure — worth noting 10. **Navigation tells the truth.** Headings describe their sections, the table of contents matches the actual headings, internal links and anchors resolve, and there are no TODO stubs or "coming soon" sections in published docs — unwritten sections are removed, not promised. ## Self-check before delivery 1. List every symbol, flag, endpoint, config key, and path your docs mention. Did you verify each one against the source in this session — not from memory? 2. Would every code sample run on a clean machine? Did you check each import and signature? 3. Any number, compatibility claim, or superlative without a repo-verifiable source? 4. If this change touched code: did you grep all docs surfaces for the old names? 5. Any docstring that just restates the signature? Any section that restates its heading? 6. Do all internal links and anchors resolve? If any answer is wrong, fix it before showing the user. ## Reporting format (review mode) ``` **Rule N violation** in `docs/path.md:` - Claim: - Reality: - Fix: ``` Lead with Rule 1–4 findings (false claims), then drift, then substance. If a doc is clean, say so in one line — accuracy deserves credit. ## Severity guide - **Must fix:** Rules 1–4 — false documentation is worse than no documentation; readers act on it - **Should fix:** Rules 5–9 — drift debt and noise that buries the signal - **Worth noting:** Rule 10 — navigation and polish ## References - [references/verification.md](references/verification.md) — the mechanical procedure: extracting claims, verifying symbols, signatures, CLI flags, endpoints, config keys, links - [references/code-samples.md](references/code-samples.md) — what makes a sample shippable: runnability, realistic data, secrets hygiene, error paths - [references/docstrings.md](references/docstrings.md) — docstring/PHPDoc/JSDoc-specific rules: when one is justified, what it must contain, paraphrase detection - [references/review-checklist.md](references/review-checklist.md) — structured walk-through for review mode - [references/sources.md](references/sources.md) — research and style-guide URLs; read only when citing a source ## What this skill does not do - Review the code itself — clean-code-guard's jurisdiction. This skill reviews what the docs *claim about* the code. - Generate documentation strategy or information architecture from scratch — it guards accuracy and substance, not scope decisions. - Enforce a prose style guide — tone belongs to the project; truth belongs to this skill.

相关技能

文档办公

Ontology

为结构化的代理内存和可堆肥技能所打入的知识图. 在创建/征服实体(Person, project, Task, Evention, Document)时使用,链接相关对象,强制约束,规划多步动作作为图变,或技能需要共享状态时使用. 触发到"记住","我知道什么","链接X到Y",…

文档办公

Nano Pdf

使用纳米-pdf CLI编辑带有自然语言指令的PDF.

文档办公

Word / DOCX

创建,检查,并编辑有可靠样式的Microsoft Word文档和DOCX文件,编号,跟踪更改,表格,章节,并进行相容性检查. 当 (1) 任务涉及 Word 或 ".docx " 时使用; (2) 文件包括跟踪的更改,评论,字段,表格,模板,或页面布局限制; (3) 文档必须在不…

文档办公

Api Gateway

通过 Maton 网关调用第三方 API, 它为用户已经连接的应用程序注入证书 。 当用户命名一个连接的应用程序和其中的具体行动时使用此技能——读取一个邮箱,查询一个CMM,归档一个问题,更新一个电子表格,通过一个连接的搜索或刮取提供者运行一个查询. 每一次通话都到用户连接的应用…