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.
npx agentmods add commands/zhangshenao/harness9/sync-docsgit clone --depth 1 https://github.com/ZhangShenao/harness9What 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00024 | $0.01341 |
| Opus 5 | $0.00012 | $0.00671 |
| Sonnet 5 | $0.00005 | $0.00268 |
| Haiku 4.5 | $0.00002 | $0.00134 |
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 2d 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.
How it starts
The opening of the file, as written. The whole thing — 102 lines — stays where its author put it; the contents beside it link to each section on GitHub.
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(可附带 diff 范围参数,如/sync-docs HEAD~3)
Phase 1: 代码变更 → 中文文档
- 确定变更范围:用户显式指定时以用户为准;否则优先工作区未提交改动(
git status --porcelain+git diff),无未提交改动时用git diff --name-only master...HEAD。 - 过滤出变更的源码路径(忽略
*_test.go与生成产物)。 - 读取
docs/doc-map.json,对每个映射条目:paths中任一模式命中变更文件、且docs非空时,将其docs列入候选更新清单。映射表之外的模块不强制;若发现明显的未登记模块→文档对应关系,在报告中建议补充映射表。 - 对每个候选文档:
- 通读文档全文 + 相关代码 diff
- 判断需要更新的内容:新增功能 / 新增接口与类型 / 行为变更 / 删除的内容 / 过时的代码片段与文件结构描述
- 直接编辑中文文档,保持现有章节结构与写作风格;无实质影响的变更(注释措辞、测试内部调整)可跳过并在报告中说明理由
- 候选清单为空时,报告"代码变更无需文档同步",直接进入 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
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.
- 2d ago First seen · 102 lines · 24 tokens per session scan A a0b7a8c00eb0
sync-docs is a command published in the GitHub repository ZhangShenao/harness9 (135 stars, last pushed 3d ago), licensed MIT. It adds 24 tokens to every session and 1,341 once invoked, about $0.0001 per session on Opus 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-08-30.
Other commands, from other repositories
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.
analyze
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
converge
Assess the current codebase against the feature's spec, plan, and tasks, then append any remaining unbuilt work as new tasks to tasks.md so implement can complete it.
implement
Execute the implementation plan by processing and executing all tasks defined in tasks.md.