跳到正文
Skillpedia
技术文档17k · #10794

update-docs

它能做什么

这个技能会将你的分支与 main 进行比较,找出与修改代码相关的文档页面,并进行更新。适合希望文档与软件保持同步的团队。

适用场景

  • ✓当你修改了源代码,而对应的文档页面已经过时时。
  • ✓当你希望对文档进行有针对性的更新,而不是全部重写时。
  • ✓当你希望在发布文档修改之前进行第二轮审阅时。

技能链接

https://github.com/pipecat-ai/pipecat/blob/main/.claude/skills/update-docs/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/pipecat-ai/pipecat/blob/main/.claude/skills/update-docs/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请更新我们的文档页面,使其与我在这个分支上所做的代码修改相匹配。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会读取你的分支与 main 之间的差异,将每个修改过的文件对应到受其影响的文档页面,并只编辑这些页面。它会遵循项目自身关于哪些内容需要记录的规则。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Update documentation pages to reflect source code changes on the current branch. Analyzes the diff against main, maps changed source files to their corresponding doc pages, and makes targeted edits.

This skill is repo-agnostic and shared. It is published by the pipecat-dev-skills marketplace and used by every repository whose changes feed pipecat-ai/docs, so it must stay free of anything specific to one of them.

Everything repo-specific — what is in scope, how files map to pages, what a new page looks like, where it gets registered — comes from that repo's profile, .claude/skills/update-docs/SOURCE_DOC_MAPPING.md, which lives in the repo being documented. The skill never hardcodes a source path, a page template, or a navigation group. See PROFILE_CONTRACT.md for what a profile must provide.

How pages read — what to document, what to leave out, page templates, prose — comes from the docs repo's style guide, DOCS_PATH/STYLE.md. This skill covers the process: finding what changed, deciding what the docs need, and checking the result.

REVIEW.md is a second pass over a finished update, run in a fresh session that did not write it. The automation runs it after this skill; run it by hand the same way after a local update.

Arguments

/update-docs [DOCS_PATH]
  • DOCS_PATH (optional): Path to the docs repository root. If not provided, ask the user.

Examples:

  • /update-docs /Users/me/src/docs
  • /update-docs

Instructions

Step 1: Resolve docs path, profile, and style guide

If DOCS_PATH was provided as an argument, use it. Otherwise, ask the user for the path to their docs repository.

Verify the path exists and contains docs.json.

Read the profile at .claude/skills/update-docs/SOURCE_DOC_MAPPING.md in the source repository. It defines this repo's scope, mapping tables, page template, and registration steps. If it is missing, stop and say so — without it there is no way to resolve a file to a page, and guessing produces edits to pages that don't exist.

Read DOCS_PATH/STYLE.md in full. Every edit follows it. Where it and this skill disagree about how a page reads, the style guide wins. If it is missing, follow the Guidelines at the end of this skill.

Step 2: Create docs branch

Get the current source branch name:

git rev-parse --abbrev-ref HEAD

In the docs repo, create a new branch off main with a matching name:

cd DOCS_PATH && git checkout main && git pull && git checkout -b {branch-name}-docs

For example, if the source branch is feat/new-service, the docs branch becomes feat/new-service-docs.

All doc edits in subsequent steps are made on this branch.

Step 3: Detect changed source files

Run:

git diff main..HEAD --name-only

Every source file under the roots the profile's Scope section names is in scope. Repos ship public API well beyond their most obvious entry points, so scope is defined as exclusions rather than an allowlist: a new directory is covered the day it appears rather than when someone remembers to list it.

Exclude what the profile's Scope section excludes, plus build and cache artifacts (__pycache__/, *.pyc, node_modules/, dist/) and re-export-only index files that define nothing themselves.

Changes outside those roots — examples, CI config, the docs directory — don't trigger doc updates on their own.

Then apply the profile's Skip list (Step 4), which names the small set of genuinely internal files. Don't invent further reasons to drop a file here: being a base class, a shared module, or "core architecture" is not one. Public constructor parameters and observable behavior get documented wherever they live, and a file whose page isn't obvious should reach Step 8 as a reported gap rather than disappear.

Step 4: Map source files to doc pages

For each changed source file, resolve the doc page to edit using the profile's tables, in this order. Confirm every candidate path exists in DOCS_PATH before using it.

  1. Skip list — if the file matches the skip list, stop. It triggers no doc update.
  2. Base classes — if the file is in the base-classes table, use every page it lists. A change here affects everything that inherits it, so check each page rather than stopping at the first.
  3. Non-standard locations — if the file is in the non-standard table, use that entry as the candidate path and confirm it exists.
  4. Pattern match — apply the pattern table to get a candid
常见问题

它会更新哪些文档?

只更新与你分支上修改的代码相关联的页面。它不会重写无关的页面。

需要特别的设置吗?

需要。项目必须提供自己的映射文件,并且要提供文档仓库的路径。

我可以检查它的工作吗?

可以。该技能包含一个审阅步骤,可以在新的会话中运行,以检查完成后的更新。

详情

作者的原始描述

Update documentation pages to match source code changes on the current branch

repo: pipecat-ai/pipecat

热度

GitHub 星标
17k
排名
#10794
许可证
BSD-2-Clause
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能