Community生产力与协作github.com

gener8v/gener8v.claude-skills.engineering

提交前检查所有与变更相关的文档并在同一提交中更新它们,或一行确认无需更改文档。捕获过时文本、缺失文档和多处存放的相同事实。用于任何提交或PR之前,以及当提问“文档是否最新”、“为此次变更更新文档”或“我是否遗漏了README更改”时。

gener8v.claude-skills.engineering 是什么?

该技能确保代码和文档始终同步,在同一个提交中同时变更。它通过三个步骤识别文档问题:过时、缺失和重复。技能要求先读取仓库自身的规则(如 CLAUDE.md 和 CONTRIBUTING.md),然后使用资源文件 doc-routing.md 将每个变更路由到其专属文档位置,并通过 git grep 查找并修复所有旧名称引用。技能还规定了当文档归属不明确时的处理方式——询问用户而非新建文档——并强调规格说明(SPEC.md 或 .gener8v/specifications/)优先于代码变更,若变更与规格矛盾,必须先更新规格。支持 Git 仓库、CLAUDE 规则和 gener8v 管道文档系统,但不适用于大规模文档创建或 gener8v 管道文件的手动编辑。

兼容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/gener8v/gener8v.claude-skills.engineering/tree/HEAD/skills/documentation-sync

Installed? Explore more 生产力与协作 skills: steipete/gemini, steipete/gh-issues, steipete/skill-creator · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

文档同步

代码和其文档应在同一个提交中一同变更。错误的文档比没有文档更糟糕。

文档出错的三种方式

  • 过时。 文档仍描述旧的行为、名称或命令。
  • 缺失。 新行为、新命令或新设置没有文档。
  • 重复。 同一事实位于两个地方。后来一个副本变更而另一个没有。

步骤

  1. 查看变更内容。
    git diff --cached --stat
    git diff --stat
    
  2. 查找仓库自身的规则。 阅读 CLAUDE.md、CONTRIBUTING.md 和 docs/README.md。如果它们规定了哪个文档负责哪个主题,请遵循它们。这些规则优先于第3步。
  3. 将每个变更路由到其所属文档。 使用 resources/doc-routing.md。每个事实只有一个归属地。其他文档链接到该归属地。
  4. 查找过时引用。 对于您重命名或移除的每个名称(函数、标志、端点、设置、文件路径、命令):
    git grep -n '<旧名称>'
    
    在文档中修复每个匹配项。再次运行 grep。后置条件是:没有匹配项,或只有必须保留的匹配项(例如关于重命名的 CHANGELOG 条目)。
  5. 编辑。 仅修改因代码变更而变得错误或不完整的内容。不要重写不相关的章节。如需清晰措辞,如果已安装 simple-english 技能,可以使用它。
  6. 一同提交。 将文档变更与代码一同暂存。不要将它们放在后续的 PR 中。
  7. 报告。 列出您修改的文档。如果没有任何文档需要变更,请用一行说明原因。例如:“无文档变更:内部重构,未改变行为、命令或设置。”

当所属文档不明确时

询问用户。不要为了回避问题而创建新文档。

一个有用的判断标准:这是一个关于当前状态的事实(设置、版本、状态)吗?如果是,放在参考或状态文档中。这是一个流程(某人遵循的步骤)吗?如果是,放在拥有该流程的指南、运行手册或技能中。

规格说明优先

如果仓库中有 SPEC.md(参见 engineering:spec-writing)或 .gener8v/specifications/ 下的 gener8v 规格说明,它们定义了预期行为。

  • 如果您的变更符合规格说明所述,则规格说明无需编辑。
  • 如果您的变更与规格说明矛盾,请停止。告知用户。首先通过其拥有者修改规格说明:SPEC.md 由 engineering:spec-writing 管理,管道规格说明由 gener8v:specification 管理。不要静默地修改规格说明以匹配代码。

管道文档

不要手动编辑 .gener8v/ 下的文件。gener8v 管道技能会编写和更新它们。

相关技能

  • engineering:documentation-bootstrap:当整个文档缺失(而不仅仅是一个段落)时使用。
  • engineering:github-pr-merge:在 PR 前运行此检查。
  • engineering:github-release:读取本技能保持最新的 CHANGELOG Unreleased 章节。

Individual skills in this repo

This repo contains 4 individual skills — each has its own dedicated page.

gener8v/gener8v.claude-skills.engineering

Find and run a project's test, lint, type-check, build and dev-server commands, read the results correctly, and seed a throwaway database when UI work needs realistic data. Never seeds the project's real or default database. Use before 'run the tests', 'lint this', 'does it build', 'start the app so I can see it', 'seed some demo data', and before you claim that a change works. Not for deployment or CI pipeline design; use the project's own deploy tooling for those.

gener8v/gener8v.claude-skills.engineering

Create or top up a project's documentation set: list what exists, let the user choose which document types to add, collect one shared fact sheet from the code, write the documents (in parallel when there are several), then check them against each other and against the code. Use when asked to 'bootstrap the docs', 'start the documentation', 'we have no README or ARCHITECTURE', or 'fill in the missing docs'. Not for the per-commit update of existing documents (documentation-sync), and not for gener8v pipeline documents (gener8v:brownfield and gener8v:planning make those).

gener8v/gener8v.claude-skills.engineering

Put work on the correct branch before the first edit. Finds the base branch, starts a well-named branch from the current remote tip, and sets up one worktree per agent for parallel work. Use at the start of any change to a tracked file, such as 'start on issue 42', 'fix this typo', 'set up branches for these three tickets', or before you start sub-agents that edit code. Not for opening or merging a PR (github-pr-merge) or for history rewrites and other risky git commands (git-safety).

gener8v/gener8v.claude-skills.engineering

Approval gate for git commands that destroy work or skip checks: force-push, --no-verify, signing bypass, reset --hard, clean -f, discarding uncommitted edits, branch or tag deletion, rewriting pushed commits and push --mirror. Each one needs the user's explicit approval at that moment; an earlier approval never carries over. Also covers a secrets check before a commit and what to do when a secret is already committed. Use before any of these commands, or when asked to 'force push', 'skip the hooks', 'throw away my changes' or 'delete that branch'. Not for normal branching (git-branching) or the PR flow (github-pr-merge).

相关技能