diff --git a/skills/repo-sync/SKILL.md b/skills/repo-sync/SKILL.md new file mode 100644 index 0000000..7c71608 --- /dev/null +++ b/skills/repo-sync/SKILL.md @@ -0,0 +1,8 @@ +# Repo Sync +Description: Sync the current workspace to the configured git repository. Use this after making significant changes to files. + +## Tools + +### sync +Description: Commit and push all current changes to the remote repository. +Command: ./skills/repo-sync/sync.sh diff --git a/skills/repo-sync/sync.sh b/skills/repo-sync/sync.sh new file mode 100755 index 0000000..4f75825 --- /dev/null +++ b/skills/repo-sync/sync.sh @@ -0,0 +1,12 @@ +#!/bin/bash +cd /Users/adolforeyna/.openclaw/workspace + +# Check if there are changes +if [[ -n $(git status -s) ]]; then + git add . + git commit -m "Auto-sync: $(date '+%Y-%m-%d %H:%M:%S')" + git push origin main + echo "Synced changes to repo." +else + echo "No changes to sync." +fi