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

docs-sync文档同步

Agent Skill

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

总安装

11,832

周安装

498

GitHub Stars

1

下载量

4,143
OpenClaw

安装说明

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

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

ClawHubOpenClaw
openclaw skills install docs-sync

简介

自动同步项目文档与代码变更,确保 PR 合并后 README 等内容及时更新。

  • 智能识别受影响文档清单,起草更新草案并纳入版本管理流程。
  • 减少人工维护成本,提升开源项目协作透明度与规范性水平。
  • 依赖 git hook 机制触发,需配置仓库 webhook 地址保证事件捕获正常。
  • 敏感信息变更时应暂停自动同步,防止意外暴露机密数据。

SKILL.md

name
docs-sync
description
>

Docs Sync

Prerequisites

  • git
  • gh (GitHub CLI, authenticated via gh auth login)

Keep project documentation current with code changes. Three modes:

  1. Content sync — update doc content after code changes
  2. Site management — maintain doc site structure and navigation
  3. Docs audit — identify stale docs that need attention

Repo Discovery

Before doing anything, discover the project's documentation setup:

  1. Run git rev-parse --show-toplevel to find the repo root
  2. Check for .docs-sync.yml at the repo root — if it exists, read it and use its

values for all paths, roles, and site config

  1. If no config file, auto-discover:

- Doc site engine: look for mkdocs.yml, docusaurus.config.js, .vitepress/config.* - Doc directory: look for docs/, documentation/, wiki/ - Known doc files: scan for common patterns (see Doc Roles below) - Convention files: CLAUDE.md, AGENTS.md, CONTRIBUTING.md

  1. Run gh repo view --json name,owner to confirm the repo

Config File: .docs-sync.yml

Optional config file at repo root. All fields are optional — auto-discovery fills gaps. See docs-sync.yml in the skill directory for a starter.

# Map your doc files to roles so the skill knows what content belongs where
docs:
  - path: docs/features.md
    role: features

  - path: docs/architecture.md
    role: architecture

  - path: CHANGELOG.md
    role: changelog
    format: keep-a-changelog

  - path: CLAUDE.md
    role: conventions

  - path: README.md
    role: readme

# Doc site configuration (optional)
site:
  engine: mkdocs               # mkdocs | docusaurus | vitepress
  config: mkdocs.yml           # path to site config
  auto_nav: true               # update navigation when docs change

Doc Roles

Roles tell the skill what kind of content a file contains, so it knows *how* to update it.

RoleContentUpdated when...
featuresUser-facing feature descriptions, shortcuts, statusNew feature added, feature behavior changes
architectureApp structure, data flow, patterns, diagramsNew components, changed patterns, refactors
conventionsDev setup, coding rules, build commandsBuild process changes, new conventions adopted
changelogVersion-based change historyAny significant change (follows format: keep-a-changelog, conventional, custom)
readmeProject overview, install instructions, quick startMajor features, install process changes
apiAPI reference, endpoints, function signaturesPublic API changes
guideTutorials, how-tos, walkthroughsWorkflow changes, new capabilities
customAnything else — describe in the description fieldBased on your description

Auto-Detection (No Config)

Without a config file, the skill detects roles by filename:

PatternInferred role
*feature*, *capability*features
*architect*, *design*, *structure*architecture
CLAUDE.md, AGENTS.md, CONTRIBUTING.md, *convention*conventions
CHANGELOG*, CHANGES*, HISTORY*changelog
README*readme
*api*, *reference*, *endpoint*api
*guide*, *tutorial*, *howto*guide

Files not matching any pattern are skipped unless listed in the config.

Workflow: Content Sync

When the user says docs need updating (or after a PR merge):

  1. Identify what changed — determine the scope of code changes:

- If a PR number is provided: gh pr view <N> --json files,title,body - If a commit range: git diff --name-only <range> - If unspecified: git diff --name-only HEAD~1 (last commit) - Read the actual diffs for changed files to understand *what* changed, not just *which* files

  1. Map changes to affected docs — for each changed file, determine which doc

roles are affected: - New UI component → features, architecture - Changed data model → architecture - New keyboard shortcut → features - Changed build command → conventions - Bug fix → changelog (if tracking fixes) - New API endpoint → api, readme (if it's a headline feature)

  1. Read current docs — read each affected doc file to understand current content,

structure, and style

  1. Draft updates — write the specific changes needed for each doc:

- Match the existing writing style and structure - Add to existing sections rather than creating new ones (unless clearly needed) - For changelog: add entry under the appropriate version/section - For features: add or update the feature entry, not rewrite the whole file - For architecture: update the affected section, preserve diagrams

  1. Apply or propose — based on user preference:

- Direct apply: edit the files, commit to a branch, report what changed - Review first: show the proposed changes and ask for approval - Issue: create a GitHub issue listing which docs need updating and why

Quality Checklist

Before committing doc updates:

  • [ ] Each update matches the existing style of that doc file
  • [ ] No content was removed that's still accurate
  • [ ] New entries are placed in the correct section (not appended randomly)
  • [ ] Cross-references between docs are consistent
  • [ ] Changelog entries follow the file's existing format
  • [ ] Feature descriptions are user-facing (not implementation details)

Workflow: Site Management

When docs are added, moved, or deleted — keep the site structure current.

mkdocs

  1. Read mkdocs.yml and parse the nav: section
  2. For new docs: determine the correct nav section based on the doc's role and path
  3. Add the entry to nav: in the right position
  4. For moved docs: update the nav path
  5. For deleted docs: remove the nav entry

docusaurus

  1. Check sidebars.js or sidebars.ts
  2. For auto-generated sidebars: ensure the doc has correct frontmatter (sidebar_position, sidebar_label)
  3. For manual sidebars: add/update/remove entries

vitepress

  1. Check .vitepress/config.* for sidebar configuration
  2. Add/update/remove sidebar entries as needed

General Rules

  • Preserve existing organization — don't reorganize the nav, just maintain it
  • Follow naming patterns — if existing entries use Title Case, match that
  • Respect ordering — add new entries at logical positions, not always at the end
  • Update indexes — if a section has an index.md with a list, update it too

Workflow: Docs Audit

When the user asks "which docs are stale?" or "audit my docs":

  1. Discover all doc files (see Repo Discovery)
  2. For each doc file, check git log -1 --format="%ar" -- <path> for last modified
  3. Compare with recent code changes in related areas
  4. Report docs that may be stale:

- Doc hasn't been updated in a long time but related code changed recently - Doc references files/functions/patterns that no longer exist - Doc describes behavior that the code no longer implements

  1. Suggest specific updates needed for each stale doc

Important Rules

  • Match existing style — read the doc before updating it. Don't impose a new format.
  • Be surgical — update the specific section that changed, don't rewrite entire docs
  • Features are user-facing — don't write "Added SyncSettingsView.swift", write

"Added sync settings with enable/disable toggle, status indicator, and Sync Now button"

  • Don't remove accurate content — only remove content that's now wrong
  • Commit to a branch — never push directly to main
  • One concern per update — if a PR changed both features and architecture, update

both docs but keep the changes focused on what actually changed

  • Respect repo conventions — if the repo has CLAUDE.md or CONTRIBUTING.md, read

and follow its branch naming, commit message, and PR conventions

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

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

04

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

补充不同宿主或平台的使用分布数据

能力 5

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

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

平台分布

OpenClaw

84.31%
按下载量换算3,493

安全审计

VirusTotal

通过

ClawScan

可疑

Static analysis

未展示

权限和风险

需要联网

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

安装前确认

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

来源信息

继续浏览同类 Skills