name: git_sync_notes description: Safely sync a notes Git repository with GitHub by pulling with rebase, staging note changes, committing with a generated message, and pushing. Use after note-writing skills to automate repo sync without manual git steps.
Git Sync Notes
Run the skill
python -m skills.git_sync_notes.skill < input.json
Behavior
- Verify the repo path and
.gitdirectory exist. - Pull with rebase, stage changes (default
notes/), validate staged note files, commit, and push. - Return structured JSON with actions performed and truncated git output.
- Fail fast with clear errors on conflicts or git failures.
- Reject invalid staged notes when they violate naming/front matter/H1/UTF-8 checks.
- A masked default repo path is built in. Replace
DEFAULT_NOTES_REPO_PATHinskill.pyafter installing, or passrepo_pathin input.
Input/Output
- Read JSON from stdin by default.
- Write JSON to stdout with
ok,actions, and optionalcommit_hash. - See
config.schema.jsonfor the input schema.