Preface¶
When developing agents in DeepSeek Harness (DSH), committing, tagging, pushing, and creating remote repositories often follow a set of fixed conventions. A common practice is to write the entire Git specification into AGENTS.md so that it remains in the context via the system prompt; when it comes time to actually commit, the model must run git status, git diff, and git log itself to understand the current state of the repository. The former consumes tokens, while the latter is repetitive and prone to missing steps.
Below, we introduce the community plugin azazo1/dsh-git-commands: it consolidates the conventions for committing, tagging, pushing, and repository creation into the plugin configuration. When you input the corresponding slash command, it automatically collects read-only Git information and injects it into the session, shifting both specifications and status to a “load on demand” model.
What is this¶
dsh-git-commands, published by maintainer azazo1, is categorized as a workflow plugin in the DSH plugin directory. It registers five slash commands—/commit, /commit-fast, /tag, /push, and /repo-create. Each command triggers a set of read-only git (and a small number of project file) collections, then passes the plugin’s built-in (or configurable) workflow specification text along with the collection results to the model. The commands themselves do not perform write operations; generating commit messages, creating tags, pushing, and creating repositories via gh are still completed by the model within the session according to the specifications, and remote write operations still require DSH privilege escalation.
Core Functions¶
Five Commands and Collection Content¶
| Command | Arguments | Collected on Trigger (All Read-Only) |
|---|---|---|
/commit |
[path] |
git status --porcelain, staged diff stats and content; if the staging area is empty, switches to a diff relative to HEAD and includes diff snippets of untracked new files; the last N full commit messages |
/commit-fast |
[path] |
git status --porcelain, the last N full commit messages (no diff collection) |
/tag |
[version] [path] |
The last 5 tags, commits since the last tag (full messages), project version files, and working directory status |
/push |
[path] |
Branch, upstream, ahead/behind counts, remote list, and unpushed commits |
/repo-create |
[path] |
Whether the repository is initialized, remotes, commit count, package.json metadata, README header, top-level entries, and .gitignore status |
Argument conventions:
- The path can be absolute or relative to the current session’s working directory; if omitted, the session’s working directory is used;
~and~\expand to the home directory. /tagaccepts an optional version number (e.g.,0.2.0orv0.2.0). The order is/tag <version> <path>.- The target directory for
/repo-createdoes not need to begit init-ed yet; other commands require the target to be an existing Git repository.
When the staging area is empty, /commit treats the commit scope as all changes since the last commit according to the plugin’s conventions, avoiding the need for the model to run diffs itself. The total number of diff lines is constrained by diffLineLimit; if it is too large, it will be truncated and noted in the text.
Division of Labor with AGENTS.md¶
The plugin’s built-in specifications cover the sections originally in AGENTS.md related to commit, commit fast, tags, release, push, and gh repository creation. The correspondence is detailed in the README. Sections unrelated to these commands (e.g., restore / checkout / rebase, stage) do not have slash commands and are recommended to remain in AGENTS.md.
Cross-Platform and Shell Hints¶
The plugin calls git without going through a shell; arguments are passed directly to git as an array, ensuring consistent behavior on macOS, Linux, and Windows (requires git in PATH). When injecting context, it includes the runtime environment and default shell (e.g., Runtime: win32, Default Shell: cmd.exe). Based on this, the specification text requires the model to avoid cross-line quoting unsupported by cmd on Windows and use methods like git commit -F <file> instead.
Installation and Activation¶
Engine requirement: @deepseek-ai/dsh-* must be at least 0.1.7-rc.2 and remain within the 0.1.x range (<0.2.0). Older engine lines cannot install the current plugin version. Web and Desktop share the same Web application and the same installation package, requiring no separate builds.
Web Interface (installed into the web profile):
dsh plugin --profile web add azazo1/dsh-git-commands
After installation, restart dsh web and refresh the browser page once.
Desktop Application (installed into the desktop profile): Managed exclusively by the Electron application; the CLI command dsh plugin --profile desktop will be rejected. Enter the package name azazo1/dsh-git-commands or a local directory in the installation entry of the plugin manager within the application. Restart the application and refresh the window after installation.
Typical Usage¶
In a session where a Git repository is already open, simply select the command based on the task; the plugin will first run read-only collections, then inject the specifications and data.
- Prepare to commit (with diff): Input
/commitor/commit [path]. The model drafts the message based on the injected status, diff, and recent commit style, and executesgit add/git commitin the session (following your AGENTS or plugin specifications). - Fast commit (without viewing diff): Use
/commit-fast, suitable for scenarios where the scope of changes is already clear and only alignment with historical message style is needed. - Release tagging: Use
/tag 1.2.0or/tag v1.2.0 ./my-project. Combine tag history, commits since the last tag, and version files to determine tag and changelog actions. - Pre-push verification: Use
/pushto compare branches, upstreams, and unpushed commits before deciding whether to push. - Create new remote repository: Use
/repo-createfor directories that are not yet initialized or are just starting out. Combinepackage.json, README, and directory structure to generate repository creation steps (usually involvinggh, etc., which requires privilege escalation).
Configuration can be edited in the Settings → Plugins form; it can also be written into the profile’s cordis.patch.yml, for example:
- id: dsh-git-commands
name: dsh-git-commands
config:
logLimit: 10
diffLineLimit: 1500
The specification text for the five commands, as well as logLimit (number of history entries) and diffLineLimit (maximum number of diff lines), are all Config fields and can be reset to the built-in text by default.
Applicable Scenarios and Notes¶
Who it is for: Developers who already use AGENTS.md to constrain Git workflows in DSH but want to reduce persistent prompts and repetitive git exploration; team workflows requiring fixed entry points like /commit and /tag.
Permissions and Security: The plugin runs with the permissions of the current DSH process and only collects files within the repository in read-only mode. Before installation, it is recommended to review the source code and the MIT license on the GitHub repository (current package version 0.1.0). The star count on the directory page is 0, which does not indicate missing functionality, but merely reflects community exposure.
Privacy: Injected content enters the session log and is sent with model requests. Staged diffs, full changes when the staging area is empty (including non-ignored plain text untracked files), README snippets, etc., will leave the local machine, similar to pasting code in a normal conversation. Untracked files are only read if they are text files not ignored by .gitignore; binary files or files exceeding 64 KiB are only listed by name.
Ecosystem Note: DSH adopts an “everything is a plugin” extension method; the SkillHub plugin directory is a community site and has no official affiliation with DeepSeek / High-Flyer. Installation sources should be based on the directory page and GitHub.
Conclusion¶
dsh-git-commands moves Git commit, tag, push, and repository creation specifications from a persistent AGENTS.md to on-demand slash commands, automatically attaching repository status and history upon triggering, thereby reducing repetitive context and model-side read-only Git calls. If you are organizing your DSH workflow, you can install it from the directory page and fine-tune the specification text and logLimit / diffLineLimit in Settings.
- Plugin Directory: https://www.skillhub.cn/plugins/azazo1/dsh-git-commands
- Source Code and README: https://github.com/azazo1/dsh-git-commands