doc-sync-tool

doc-sync-tool is a skill for Claude Code, Codex from littleben/awesomeAgentskills. It costs 34 tokens per session (826 once invoked), scanned C, original, MIT.

A tool that keeps Agents.md, claude.md, and gemini.md instruction files in each project folder synchronized. It can create missing copies, update them, and watch for changes.

In plain words
What is it for?
Use it for one-time or continuous synchronization of agent configuration documents across project folders, including background operation with PM2.
Why use it?
It removes the need to manually edit the same agent instructions in several files and helps keep different coding assistants aligned.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Gemini CLI.

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /Users/ben/Downloads/go\.

Good fit Use it for one-time or continuous synchronization of agent configuration documents across project folders, including background operation with PM2.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

There is no command for this one: it runs only inside a plugin, and the catalogue could not identify which plugin ships it. The source is linked below.

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 doc-sync-tool

README.md
[![agentmods](https://agentmods.dev/badge/skills/littleben/awesomeagentskills/doc-sync-tool.svg)](https://agentmods.dev/skills/littleben/awesomeagentskills/doc-sync-tool)
Your own site
<a href="https://agentmods.dev/skills/littleben/awesomeagentskills/doc-sync-tool"><img src="https://agentmods.dev/badge/skills/littleben/awesomeagentskills/doc-sync-tool.svg" alt="Measured on agentmods" height="20"></a>
Per session 34 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 826 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. 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.00034 $0.00826
Opus 5 $0.00017 $0.00413
Sonnet 5 $0.00007 $0.00165
Haiku 4.5 $0.00003 $0.00083

Measured 8d ago against content hash fb5be90b49c2, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade C, and why

doc-sync-tool scanned grade C with 1 finding 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 8d ago.

The scan reads SKILL.md. This mod also ships 7 executable files (rename-quick.js, rename-to-uppercase.sh, run-sync.sh, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf node_modules package-lock.json
Origin

Copies of this mod

2 near-identical copies found in the catalogue:

doc-sync-tool/SKILL.md · 110 lines

What it actually says

文档同步工具 (Doc Sync Tool)

功能说明

这个工具用于自动同步项目中的 AI Agent 配置文档,确保 Agents.mdclaude.mdgemini.md 三个文件内容保持一致。

核心功能

  1. 自动发现: 递归扫描当前目录下所有文件夹,查找这三个文档
  2. 智能同步: 发现任意一个文档时,自动创建/更新其余两个
  3. 文件监听: 实时监听文件变化,自动同步最新内容
  4. 手动触发: 支持命令行手动执行同步

使用场景

  • 在多个 AI Agent 之间共享相同的项目配置
  • 自动保持不同 AI 的工作指令一致
  • 避免手动维护多个相同文档的麻烦

使用方法

安装依赖

cd /Users/ben/Downloads/go\ to\ wild/auto-website-system/_skills/doc-sync-tool
pnpm install

手动同步(单次执行)

# 在项目根目录执行
node /Users/ben/Downloads/go\ to\ wild/auto-website-system/_skills/doc-sync-tool/sync.js

# 或者使用 npm script
pnpm run sync

自动监听(持续运行)

# 启动文件监听服务
node /Users/ben/Downloads/go\ to\ wild/auto-website-system/_skills/doc-sync-tool/watch.js

# 或者使用 npm script
pnpm run watch

后台运行(推荐)

# 使用 PM2 在后台运行
pm2 start /Users/ben/Downloads/go\ to\ wild/auto-website-system/_skills/doc-sync-tool/watch.js --name doc-sync

# 查看状态
pm2 status

# 停止服务
pm2 stop doc-sync

工作原理

  1. 扫描阶段: 递归遍历指定目录,查找 Agents.mdclaude.mdgemini.md 文件
  2. 分组阶段: 将同一文件夹下的这三个文件归为一组
  3. 同步阶段:
    • 如果某组只有一个文件,复制内容创建其余两个
    • 如果某组有多个文件,选择最新修改的作为源,同步到其他文件
  4. 监听阶段 (watch 模式): 持续监听文件变化,触发同步

配置选项

可以在 sync.js 中修改以下配置:

const CONFIG = {
  targetFiles: ['Agents.md', 'claude.md', 'gemini.md'],  // 目标文件列表
  scanPath: process.cwd(),                                // 扫描路径(默认当前目录)
  excludeDirs: ['node_modules', '.git', '.next', 'dist'] // 排除目录
};

注意事项

  • 工具会自动跳过 node_modules.git.nextdist 等目录
  • 同步时会保留文件的原始格式和内容
  • 建议在 Git 仓库中使用,方便追踪文件变化
  • 监听模式会持续运行,建议使用 PM2 管理进程

故障排除

权限问题

chmod +x sync.js watch.js

Node.js 版本要求

需要 Node.js 14+ 版本

依赖安装失败

rm -rf node_modules package-lock.json
pnpm install
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. 8d ago First seen · 110 lines · 34 tokens per session scan C fb5be90b49c2

Subscribe to this mod's changes

doc-sync-tool is a skill published in the GitHub repository littleben/awesomeAgentskills (187 stars, last pushed 7mo ago), licensed MIT. It adds 34 tokens to every session and 826 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

workers-best-practices

Cloudflare Workers best practices for production applications. Use when writing, reviewing, or configuring Workers.

cloudflare/skills · 25 tokens

find-journalists

Build, refine, dedupe, and enrich small fit-checked journalist lists for newsjack campaigns. Uses the newsjack CLI (preferred) or the medialyst MCP for news search and journalist enrichment, and falls back to a best-effort local mode with no verified contacts; the agent owns how returned data is organized.

elvisun/newsjack · 69 tokens

story-origin-check

Recover the first public timestamp and canonical major coverage for a newsjacking signal, then decide whether newer coverage is the same story, a different story, or a materially new development.

elvisun/newsjack · 40 tokens

relevance-coarse-filter

Cheap, high-recall first-pass filter that removes obvious junk from a detector candidate pool before expensive story-origin research and PR judgment. Decides keep, monitoronly, or reject — never ranks, writes angles, verifies dates, or decides whether to pitch.

elvisun/newsjack · 57 tokens

annotating-task-lineage

Annotate Airflow tasks with data lineage using inlets and outlets. Use when the user wants to add lineage metadata to tasks, specify input/output datasets, or enable lineage tracking for operators without built-in OpenLineage extraction.

astronomer/agents · 51 tokens

managing-astro-local-env

Manage local Airflow environment with Astro CLI (Docker and standalone modes). Use when the user wants to start, stop, or restart Airflow, view logs, query the Airflow API, troubleshoot, or fix environment issues. For project setup, see setting-up-astro-project.

astronomer/agents · 63 tokens