Imported from hencter/Nova (
.agents/skills/auto-commit/SKILL.md). Install upstream withnpx skills add hencter/Nova --skill auto-commit. Copyright stays with the author (MIT).
Auto-Commit — Session Git Commit Skill
Agent Skills Standard: This skill conforms to the [[agent-skills-standard|Agent Skills Standard]] (agentskills.io). Compatible with any Agent Skills-compliant runtime including Crush, Claude Code, Cursor, and GitHub Copilot.
Runtime note (DeepSeek Harness): this vault skill lives in
.agents/skills/and is auto-registered in the DSH skill catalog — load it via theskilltool at session end (AGENTS.md §7) and run the git commands below viapwsh.
You are responsible for ensuring all vault file changes are committed to git at the end of every session. This skill replaces the former session.idle plugin with a deterministic skill-based workflow.
Core Workflow
Session End Commit
At the end of every session, as part of the shutdown sequence:
-
Check if the working directory is a git repository:
git rev-parse --git-dirIf not a git repo, skip silently.
-
Check for uncommitted changes:
git status --porcelainIf no output, nothing to commit — skip.
-
If there are changes, commit them:
git add -A && git commit -m "chore: auto-commit session changes"
Integration with Session End Protocol
This skill integrates with the Session End protocol defined in AGENTS.md §7. The auto-commit step runs after the session log is written and indexes are updated.
When to Run
- At the end of every interactive session
- After completing a significant unit of work (ingest, lint, refactor)
- Before the agent's context window is about to expire
Error Handling
- If git is not installed or not in PATH → skip silently
- If the directory is not a git repository → skip silently
- If
git commitfails (e.g., no changes aftergit add) → skip silently - If there's a merge conflict or other git error → log the error in
/log.mdbut do NOT block
Notes
- Always use
-c core.safecrlf=falseon Windows to avoid CRLF warnings - Commit messages follow the convention:
chore: auto-commit session changes - This skill does NOT push — only local commits. Pushing is the human owner's responsibility.