kb-sync

Synchronize a local knowledge base with a remote git repository via pull and push.

Updated Jun 22, 2026
One-click install
npx skills add https://github.com/ozand/knowledge-base-template --skill kb-sync-ozand
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: kb-sync
Source: https://github.com/ozand/knowledge-base-template/tree/main/_template/skills/kb-sync
Command: npx skills add https://github.com/ozand/knowledge-base-template --skill kb-sync-ozand

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When working on a local knowledge base across multiple machines or offline, commits accumulate locally and diverge from the remote repository. This Skill pushes pending commits and pulls remote changes so the local KB and its remote mirror stay consistent. ## Core Features & Use Cases - Pending Commit Detection: Counts unpushed commits with git log @{u}..HEAD and reports how many are waiting. - Safe Rebase Pull: Pulls remote changes with git pull --rebase and stops on conflicts instead of force-pushing, leaving resolution to the user. - Push with Summary: Pushes local commits and reports a clear summary of what was pulled, pushed, and the remote URL. - Use Case: After capturing several new error lessons offline, run the sync to push all accumulated commits to the remote ozand/knowledge-bases repository before switching to another machine. ## Quick Start Ask the agent to sync the knowledge base with the remote repository and report how many commits were pushed.

Frequently Asked Questions about kb-sync

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I sync a local git repository with a remote?▼

Check pending commits with git log @{u}..HEAD, run git pull --rebase to integrate remote changes, then git push to upload local commits. The skill reports how many commits were pulled and pushed.

How to push pending commits after working offline?▼

Run the sync procedure once back online: it counts unpushed commits, rebases onto any remote changes, and pushes everything to origin. A summary confirms how many commits were uploaded.

What happens if git pull --rebase hits a conflict?▼

The sync stops and reports the conflicting files without force-pushing. You must resolve the conflicts manually and run git rebase --continue before retrying the push.

Why does git sync fail with no remote configured?▼

The repository has no origin remote set, so there is nowhere to push or pull from. Configure the remote first (for example via the bootstrap setup) before running the sync.

Is it safe to force-push when syncing a knowledge base?▼

No. The procedure explicitly forbids force-pushing and always rebases instead, preserving remote history. If unexpected divergence appears, inspect git status and recent log entries before proceeding.