sync-docs

sync-docs is a skill for Claude Code, Codex from ZhangShenao/harness9. It costs 43 tokens per session (1,424 once invoked), scanned A, original, MIT.

A documentation synchronisation workflow that updates Chinese feature documents from code changes and then keeps their English copies aligned. It uses a file map and Git changes to find affected documents.

In plain words
What is it for?
Use it after changing source code or documentation to find stale, missing, or outdated pages and update the relevant documentation.
Why use it?
It reduces drift between code, the main Chinese documentation, and its English mirror before a pull request. A pull request is a proposed code change for review.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it after changing source code or documentation to find stale, missing, or outdated pages and update the relevant documentation.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/zhangshenao/harness9/sync-docs
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add ZhangShenao/harness9 --skill sync-docs
Clone the repo
git clone --depth 1 https://github.com/ZhangShenao/harness9

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for sync-docs

README.md
[![agentmods](https://agentmods.dev/badge/skills/zhangshenao/harness9/sync-docs/github.svg)](https://agentmods.dev/skills/zhangshenao/harness9/sync-docs)
Your own site
<a href="https://agentmods.dev/skills/zhangshenao/harness9/sync-docs"><img src="https://agentmods.dev/badge/skills/zhangshenao/harness9/sync-docs/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for sync-docs

Your own site · 80×15
<a href="https://agentmods.dev/skills/zhangshenao/harness9/sync-docs"><img src="https://agentmods.dev/badge/skills/zhangshenao/harness9/sync-docs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 43 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,424 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00043 $0.01424
Opus 5.5 $0.00017 $0.00570
Sonnet 5.5 $0.00009 $0.00285
Haiku 4.5 $0.00004 $0.00142

Measured 14d ago against content hash 446631eb829d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

sync-docs scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 14d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.dsh/skills/sync-docs/SKILL.md · 105 lines

How it starts

The opening of the file, as written. The whole thing — 105 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Sync Docs(文档同步管线)

DSH 斜杠命令:输入 /sync-docs 会把本技能全文注入当前回合,/sync-docs 之后的文本作为参数;模型也可按描述自动加载。

Overview

维护 docs/核心功能/(中文,唯一信息源)与 docs/core-features-en/(英文镜像)的完整同步:

  • Phase 1: 代码变更 → 中文文档更新(基于 docs/doc-map.json 模块映射 + git diff)
  • Phase 2: 中文文档 → 英文镜像同步(MISSING / STALE 扫描)
  • Phase 3: 统一收尾报告

CI 中有对应的机械式漂移检测(scripts/check-doc-drift.sh,warn 模式),本命令是其 LLM 辅助的落地执行手段:提 PR 前先跑本命令补文档。

When to Run

  • 修改了任何 internal/、cmd/、skills/ 源码之后、提交 PR 之前
  • 创建或修改了 docs/核心功能/ 下任何文件之后
  • 用户执行 /sync-docs(/sync-docs 后的文本为可选 diff 范围参数,如 /sync-docs HEAD~3)

Phase 1: 代码变更 → 中文文档

  1. 确定变更范围:用户显式指定时以用户为准;否则优先工作区未提交改动(git status --porcelain + git diff),无未提交改动时用 git diff --name-only master...HEAD。
  2. 过滤出变更的源码路径(忽略 *_test.go 与生成产物)。
  3. 读取 docs/doc-map.json,对每个映射条目:paths 中任一模式命中变更文件、且 docs 非空时,将其 docs 列入候选更新清单。映射表之外的模块不强制;若发现明显的未登记模块→文档对应关系,在报告中建议补充映射表。
  4. 对每个候选文档:
    • 通读文档全文 + 相关代码 diff
    • 判断需要更新的内容:新增功能 / 新增接口与类型 / 行为变更 / 删除的内容 / 过时的代码片段与文件结构描述
    • 直接编辑中文文档,保持现有章节结构与写作风格;无实质影响的变更(注释措辞、测试内部调整)可跳过并在报告中说明理由
  5. 候选清单为空时,报告"代码变更无需文档同步",直接进入 Phase 3。

Phase 2: 中文 → 英文镜像

2.1 Scan for mismatches

Run this check to identify missing or stale English docs:

for f in docs/核心功能/*.md; do
  name=$(basename "$f")
  en_path="docs/core-features-en/$name"
  if [ ! -f "$en_path" ]; then
    echo "MISSING: $en_path"
  elif [ "$f" -nt "$en_path" ]; then
    echo "STALE: $en_path (Chinese version is newer)"
  fi
done

Classify results:

  • MISSING: English doc does not exist--must be created
  • STALE: English doc exists but Chinese version was modified more recently--should be reviewed and updated
  • OK: Both exist and English is not older than Chinese

If all docs are OK, report success and go to Phase 3.

2.2 For each MISSING doc: create the English version

read the Chinese doc in full. Then create the English counterpart at docs/core-features-en/<same-filename> following these rules:

Translation principles:

  • The English version is an independently written technical document, not a machine translation
  • Content and structure must align with the Chinese version (same sections, same code blocks, same tables)
  • Follow English technical writing conventions: active voice, concise sentences, no unnecessary hedging
  • Code blocks, Go struct definitions, and CLI examples remain identical (they are language-neutral)
  • Chinese-specific UI strings shown in examples (e.g., TUI output) should be translated to English equivalents
  • Comments in code blocks: translate Chinese comments to English

Read the full file on GitHub · 105 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 14d ago First seen · 105 lines · 43 tokens per session scan A 446631eb829d

Subscribe to this mod's changes

sync-docs is a skill published in the GitHub repository ZhangShenao/harness9 (166 stars, last pushed yesterday), licensed MIT. It adds 43 tokens to every session and 1,424 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-22.

Related

sync-docs compared with skills from other repositories

sync-docs next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
sync-docsZhangShenao/harness9Skill166yesterdayMITA43Claude Code, Codex
merge-batchdiegosouzapw/OmniRouteSkill92ktodayMITA46Claude Code
prowler-commitprowler-cloud/prowlerSkill15k2d agoApache-2.0A44Claude Code, Codex
gh-auth-isolationgithub/gh-awSkill5.8ktodayMITA20Claude Code, Codex
comet-githubrpamis/cometSkill3.3ktodayMITA72Claude Code, Codex
github-skillzeenie-ai/OpenCompanySkill1.1k5d agoMITA51Claude Code
re0-mergeLilMGenius/paperthinSkill1.5kyesterdayMITA51Claude Code, Codex