Preface¶
In the DeepSeek Harness (DSH) workflow, Git commits typically involve the model reading large amounts of raw git output to generate Shell commands, which not only consumes tokens but is also error-prone. dsh-plugin-git-commit-push is a 0-Token Git commit and push plugin designed to compress this process into 1-2 tool calls or a single slash command. It automatically generates commit messages for each changed file according to the Conventional Commits specification, splits them by type(scope), and pushes them to the remote repository in one go.
Core Features¶
- Slash Command Invocation: Used via
/git-commit-push, completely bypassing the model to achieve true 0-Token commit and push. - Tool Invocation: Called via the
git_commit_pushtool, requiring minimal tokens to complete high-quality annotated and split commits. - Auto-generate Commit Messages: Automatically generates commit messages for each changed file according to Conventional Commits.
- Split Commits: Splits changes into multiple commits by
type(scope)and pushes them in a single operation. - Cross-platform Support: Supports Windows, macOS, and Linux.
Installation¶
Install using the plugin command. You must restart DSH after installation to enable it.
dsh plugin --profile web add dsh-plugin-git-commit-push
Usage¶
1. Slash Command¶
Directly enter /git-commit-push in the input box, and the script will automatically execute the commit and push.
2. Tool Invocation¶
The model can complete operations via tool calls.
// Automatically commit and push
git_commit_push({ action: 'auto' })
// Summarize changes only, do not modify the repository (for user to select commit messages)
git_commit_push({ action: 'prepare' })
// Commit and push with a custom commit message
git_commit_push({ action: 'apply', message: 'feat(x): …' })
// Automatically commit and push with a tag
git_commit_push({ action: 'auto', tag: 'v1.2.3' })
Notes¶
- Trigger Conditions: The plugin is triggered only when the user enters the slash command or explicitly requests it; it never triggers automatically. For example, editing a file does not constitute a request to commit.
- Environment Requirements: Requires DSH version
>=0.2.0-rc.1 <0.3.0, Node.js>=24, and git>=2.36. - Token Consumption: The slash command path consumes 0 Tokens; the tool invocation path consumes a small amount of Tokens (parameters + card). As long as the plugin is installed and the tool is visible, its schema is included in every request, consuming approximately 600 Tokens.