home / skills / openclaw / skills / bobagent-git-sync
/skills/bobdevibecoder/bobagent-git-sync
This skill automatically syncs local workspace changes to the remote GitHub repository, ensuring up-to-date backups after significant edits.
npx playbooks add skill openclaw/skills --skill bobagent-git-syncReview the files below or copy the command above to add this skill to your agents.
---
name: git-sync
description: Automatically syncs local workspace changes to the remote GitHub repository. Use after significant changes or periodically.
tags: [git, sync, backup, version-control]
---
# Git Sync Skill
Automatically syncs local workspace changes to the remote GitHub repository.
Designed to be called by PCEC cycles or after significant changes.
## Tools
### git_sync
Commit and push changes.
- **message** (optional): Commit message. Defaults to "Auto-sync: Routine evolution update".
## Safety
- Uses `.gitignore` and `pre-commit` hooks (ADL-compliant) to prevent secret leakage.
- Checks if there are changes before committing.
## Implementation
Wrapper around `git add . && git commit && git push`.
This skill automatically syncs local workspace changes to a remote GitHub repository. It is implemented in Python and designed to be invoked after significant edits or on scheduled cycles. The goal is reliable, low-effort backups and version continuity for active development.
The skill stages changed files, creates a commit with a configurable message, and pushes the commit to the configured remote branch. It first checks for any changes to avoid empty commits, and relies on .gitignore and pre-commit hooks to reduce the risk of committing secrets. A default commit message is used when none is provided.
What happens if there are no changes to commit?
The skill detects the absence of changes and skips creating a commit or pushing, avoiding empty commits.
How does the skill avoid accidentally committing secrets?
It respects .gitignore and is designed to run pre-commit hooks including secret scanners to help prevent leaks before commits are made.