knowledge-sync
Real-time knowledge base synchronization for AI assistants. Supports inotifywait file monitoring, Git auto-push/pull, Nutstore sync, and multi-device consistency. Use for maintaining knowledge continuity across servers and local devices.
Best use case
knowledge-sync is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Real-time knowledge base synchronization for AI assistants. Supports inotifywait file monitoring, Git auto-push/pull, Nutstore sync, and multi-device consistency. Use for maintaining knowledge continuity across servers and local devices.
Teams using knowledge-sync should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/knowledge-sync/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How knowledge-sync Compares
| Feature / Agent | knowledge-sync | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Real-time knowledge base synchronization for AI assistants. Supports inotifywait file monitoring, Git auto-push/pull, Nutstore sync, and multi-device consistency. Use for maintaining knowledge continuity across servers and local devices.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
AI Agents for Coding
Browse AI agent skills for coding, debugging, testing, refactoring, code review, and developer workflows across Claude, Cursor, and Codex.
Best AI Skills for ChatGPT
Find the best AI skills to adapt into ChatGPT workflows for research, writing, summarization, planning, and repeatable assistant tasks.
ChatGPT vs Claude for Agent Skills
Compare ChatGPT and Claude for AI agent skills across coding, writing, research, and reusable workflow execution.
SKILL.md Source
# Knowledge Sync - 知识库同步机制
> **核心原则**: Text > Brain,文件 > 记忆,同步 > 备份
---
## 🚀 快速开始
### systemd 服务配置
```bash
# 启用实时同步服务
systemctl --user enable sync-realtime.service
systemctl --user start sync-realtime.service
```
### Crontab 配置
```bash
# 每 5 分钟 Git push
*/5 * * * * /path/to/git-auto-push.sh
# 每小时 Git pull
0 * * * * cd /path/to/workspace && git pull origin main --rebase
```
---
## 🔧 核心功能
### 1. 实时同步
- ✅ inotifywait 文件监听
- ✅ 3-10 秒同步延迟
- ✅ 6 个目录监听(articles/memory/projects/docs/scripts/learnings)
- ✅ 自动排除(node_modules/__pycache__/.git)
### 2. Git 备份
- ✅ 每 5 分钟自动 push
- ✅ 每小时自动 pull
- ✅ 冲突检测和解决
- ✅ Gitee 远程备份
### 3. 多端同步
- ✅ 服务器→坚果云→Mac Obsidian
- ✅ 双向同步支持
- ✅ 多端一致性保障
---
## 📁 包含文件
```
knowledge-sync/
├── SKILL.md # 主文档
├── README.md # 项目说明
├── scripts/
│ ├── sync-realtime.sh # 实时同步脚本
│ ├── git-auto-push.sh # Git 自动推送
│ └── git-auto-pull.sh # Git 自动拉取
└── docs/
├── QUICKSTART.md # 快速上手
└── sync-guide.md # 同步指南
```
---
## 📊 同步架构
```
服务器 Workspace → 坚果云实时监听 → 本地同步 → Gitee → Mac Obsidian
3-10 秒 实时 ≤5 分钟 ≤5 分钟
```
**总延迟**: 5-10 分钟(主要等待 Git 推送周期)
---
## 💡 使用场景
### 1. 实时文件同步
```bash
# 启动实时同步服务
systemctl --user start sync-realtime.service
# 查看状态
systemctl --user status sync-realtime.service
```
### 2. Git 自动备份
```bash
# 手动推送
./git-auto-push.sh
# 或定时执行
*/5 * * * * ./git-auto-push.sh
```
### 3. 多端同步
```bash
# Mac 端拉取
cd ~/Obsidian-MKH/我的知识/OpenClaw
git pull origin main
```
---
## 🔧 配置说明
### 监听目录配置
```bash
WATCH_DIRS=(
"/path/to/workspace/articles"
"/path/to/workspace/memory"
"/path/to/workspace/projects"
"/path/to/workspace/docs"
"/path/to/workspace/scripts"
"/path/to/workspace/learnings"
)
```
### 排除模式
```bash
EXCLUDE_PATTERN="\\.(log|tmp|swp|pyc)$|node_modules|__pycache__|\\.git"
```
---
## 📈 监控指标
| 指标 | 正常值 | 警告值 |
|------|--------|--------|
| 同步延迟 | <10 秒 | >30 秒 |
| Git push 间隔 | 5 分钟 | >10 分钟 |
| Git pull 间隔 | 1 小时 | >2 小时 |
| 冲突次数 | 0 | >1/周 |
---
## 🎓 最佳实践
### 1. 同步频率
- 实时同步:inotifywait 监听(3-10 秒)
- Git push:每 5 分钟
- Git pull:每小时
### 2. 冲突处理
- push 前先 pull
- 大改动分多次 commit
- 人工编辑前先 git pull
### 3. 备份策略
- Git 远程备份(Gitee)
- 坚果云本地备份
- 定期完整备份(每周)
---
## 📝 更新日志
### v1.0.0 (2026-03-15)
- ✅ 初始版本发布
- ✅ 实时同步功能
- ✅ Git 自动备份
- ✅ 多端同步支持
---
**维护者**: 虾球 🦐
**许可**: MIT
**状态**: 生产环境运行中Related Skills
Knowledge Management System
> Turn tribal knowledge into searchable, maintained organizational intelligence. Stop losing expertise when people leave.
rag-knowledge-assistant
基于向量数据库的 RAG(检索增强生成) 知识库助手。支持语义检索、多格式文档 (PDF/Word/Excel/Markdown) 处理、智能问答。使用 Chroma 向量库 + BGE-M3 Embedding 模型。适用于从 knowledge 目录快速检索信息、回答基于文档的问题。触发词:"从知识库查"、"检索文档"、"RAG 查询"、"向量搜索"、"语义检索"等。
marketing-copy-knowledge
小黑老師 邱煜庭設計。Meta 廣告文案、Google 廣告文案、社群貼文:用 FABE x SPIN 產出更能轉換的廣告文案。支援 freemium/付費(X-Api-Key credits)。
knowledge-gaps
Track questions Hans failed to answer and flag missing knowledge
claw-sync
Secure sync for OpenClaw memory and workspace. Use /sync to push, /restore to pull, /sync-status to check. Supports versioned backups and disaster recovery.
eternalmemory-sync
Securely backup and restore Openclaw agent memory from remote URLs using AES-256-GCM encryption.
openclaw-sync
OpenClaw 数据轻量同步技能。基于 rclone + cron,支持 70+ 云存储后端, 定时备份 workspace 数据,资源占用极低。
markdown-sync-pro
Markdown 一键同步到 Notion、GitHub Wiki、Medium 等平台
knowledge-forge
Transform raw personal experience, case studies, business documents, or draft content into transferable cognitive assets -- structured knowledge that others can understand, remember, and apply. Use this skill when users want to turn experience or case studies into teachable content, redesign presentations for maximum retention, create course outlines from domain expertise, crystallize knowledge into shareable documents or knowledge cards, convert know-how into teachable answers, or any scenario where experience must become portable and transferable.
obsidian-sync
Sync files between Clawdbot workspace and Obsidian. Run the sync server to enable two-way file synchronization with the OpenClaw Obsidian plugin.
polymarket-simmer-fastloop-sync-pulse
Trade Polymarket BTC/ETH/SOL 5-minute fast markets using a zero-delay Triple-Trigger strategy. Combines Binance momentum, NOFX OI/Netflow (free public API), and L2 Wall detection to choose between Trend Following and Mean Reversion. Pre-Caches market IDs to bypass the Simmer API blackout at market open.
tokio-async-code-review
Reviews tokio async runtime usage for task management, sync primitives, channel patterns, and runtime configuration. Use when reviewing Rust code that uses tokio, async/await patterns, spawn, channels, or async synchronization. Also covers tokio-util, tower, and hyper integration patterns.