Preface¶
After making code changes in DeepSeek Harness (DSH), the common workflow is to switch to a terminal: git add, think about a commit message while looking at the diff, then git commit. If a model route is already configured in the session, handing the task of “summarizing the staged diff” to the current session model is often more convenient than writing the title and bullet points by hand. dsh-git-commit is a community-maintained workflow plugin that registers the global slash command /commit on the host side: it runs git add -A in the current session’s working directory, uses the current session model to summarize git diff --cached and commits; you can also supply your own title to skip the model. It does not push, create branches, or open a browser UI — it is suitable for scenarios where you just want to make a standard local commit.
What is this¶
- Name and ownership: plugin package name
dsh-git-commit, maintained by qingyou002, repository github.com/qingyou002/dsh-git-commit, MIT license (source version 1.1.1). - Positioning: a DSH plugin that registers
/commitvia thecommandsservice; any profile that provides this service (not limited toweb) can use it. - Problem it solves: collapses “stage everything → generate commit message → local commit” into a single command, with a local fallback when the model fails, avoiding changes lingering in the “staged but uncommitted” state.
Community directory page: skillhub.cn/plugins/qingyou002/dsh-git-commit. The directory is an independent site and has no official affiliation with DeepSeek / High-Flyer.
Core functionality¶
Below is the five-step process described for /commit in the source material.
- Check whether the current session’s working directory is inside a Git working tree; otherwise stop and explain the reason.
- Run
git add -A(including untracked files). - If no custom message is passed, send
git diff --cachedto the model currently in use in the session (the route is taken from the latestmodel/selectionorrequest/header, and switching models mid-session takes effect), requiring a first line ofmodule: description(≤50 characters), followed by 3–8-bullet points summarizing the substantive changes by module or topic, without listing files one by one. - Commit using
git commit -m <title> -m <bullets>. - Output the short hash, the bullet list, and
+added / -deletedstatistics per file.
Two cases that skip the model call:
- Supply your own title:
/commit fix login timeoutuses that text as the title and does not call the model. - Automatic fallback: when no model route is configured, the call times out, or the reply is unusable, the plugin generates a deterministic Chinese title based on the changed paths and commits as usual; the output begins with a warning about the failure reason and the routes attempted. Model errors will not leave changes in a staged-only state.
What it explicitly does not do: no push, no branch creation or switching, no amend, no remote operations; it only runs git add -A and git commit in the working directory.
Optional configuration (defaults in the next section): timeoutMs, maxDiffChars, maxTokens, maxTitleChars, maxBullets.
Installation and enabling¶
Official installation command (from the README):
dsh plugin --profile web add github:qingyou002/dsh-git-commit
dsh plugin forwards to pnpm within the profile directory and writes the package into dsh.profile.bundles (the plugin declares dsh.bundle). After installation, /commit is available in every session of that profile; if DSH is already running, a restart is required for it to take effect.
Environment requirements (from the source material):
- The DSH build must provide
@deepseek-ai/dsh-commands,@deepseek-ai/dsh-llm,@deepseek-ai/dsh-util-values(peerDependencies; the docs state testing was done on0.1.5-rc.3). - Node.js ≥ 20.
giton the systemPATH; the plugin will clearly prompt when it is missing.- AI-generated commit messages require a model route configured within the session; without a route, commits can still proceed via the local fallback.
The plugin executes shell and git commands with the permissions of the current DSH process; it is recommended to review the repository source code and the MIT license before installation.
Configuration¶
All options are optional and can be overridden in the profile’s patch layer, e.g. ~/.dsh/profiles/web/cordis.patch.yml:
# ~/.dsh/profiles/web/cordis.patch.yml
- id: dsh-git-commit
config:
timeoutMs: 60000
| Option | Default | Meaning |
|---|---|---|
timeoutMs |
90000 |
Timeout (milliseconds) for the summarization model call. |
maxDiffChars |
48000 |
When the staged diff exceeds this character count before being sent, it is truncated (keeping the head and tail and marking the gap). |
maxTokens |
2048 |
Token cap for the summarization call. |
maxTitleChars |
100 |
Hard limit for the first line; excess is truncated with ... appended. |
maxBullets |
12 |
Maximum number of bullet points retained from the model reply. |
Typical usage¶
First, call it without arguments and let the model write the message:
/commit
If the title is already decided, write it directly after the command:
/commit fix login timeout
Output example from the README (format for reference, not a promise that every result is identical):
✅ Committed a1b2c3d: backend: fix not refreshing after token expiry
📝 Change highlights
- Switch to silent refresh and retry the original request when the token expires
- Add a sign-out prompt after refresh failure
📦 File list (3 files: 2 modified, 1 added)
Modified application/api/auth.js (+18 -4)
Added application/api/token.js (+42 -0)
Modified public/assets/app.js (+3 -1)
Suitable scenarios and caveats¶
Suitable for: after completing local changes within a DSH agent session, you want to stage and commit with a single command, and you want the commit message to match the style of the current session model; or you occasionally use a hand-written title for a quick commit.
Caveats:
- The command runs
git add -Ato stage all changes in the working directory; before committing, confirm there are no files that should not be committed. - Large diffs are truncated by
maxDiffCharsbefore being sent to the model; for very large changes, the quality of the generated message depends on the truncated content. - If you need to sync to a remote, you still need to run
git pushyourself; this plugin does not touch remotes.
Conclusion¶
dsh-git-commit collapses “staging + writing the message + commit” in the DSH workflow into /commit, with a local title fallback when the model is unavailable, and no dependency on a browser interface. For more information, visit the SkillHub directory page and the GitHub repository.