DeepSeek Harness (DSH) uses a plugin-based architecture. When an agent needs to operate on a local code repository during a session, it often lacks direct and safe tool support. Manually invoking shell commands is risky, and relying on remote interfaces increases latency. To solve this problem, we need a native, secure local Git toolset.

dsh-git-tools is a DeepSeek Harness plugin maintained by Shyboy0499. It provides four local Git tools (git_status, git_diff, git_log, git_commit), allowing the agent to directly inspect repository status and create commits within the session workspace, without relying on a UI or remote services, and running entirely on the Host side.

Core Features

  • git_status: Checks branch, ahead/behind status, and staged / unstaged / untracked files.
  • git_diff: Views changes. Supports staged or unstaged, statistics summary or full patch, and optional path filtering.
  • git_log: Lists recent commits in the format { hash, author, date, subject }.
  • git_commit: Stages specified paths (or all) and commits; a message is required.

Installation

Ensure that git is installed in the environment before installing.

dsh plugin --profile web add dsh-git-tools

Typical Usage

  • git_status: Inspect working tree and branch status.
  • git_diff: View changes. staged compares against the index, statOnly: true (default) returns a statistics summary, statOnly: false returns a full patch, and path filters a single file.
  • git_log: List recent commits. count defaults to 10 (maximum 100), and path filters files.
  • git_commit: Create a commit. message is required (non-empty). Use paths to stage specific files, or use all: true to stage all files. It never implicitly stages files.

Use Cases and Notes

This plugin is suitable for scenarios that require routine Git operations in DSH sessions (viewing status, comparing changes, viewing history, and committing code).

  • Security: All Git calls are executed via execFile, with arguments passed as an array, so there is no shell interpolation; user/model-controlled values are injection-safe.
  • Operation Limits: git_commit requires an explicit message and never implicitly stages files. The core scope excludes destructive operations (such as --amend, --force, rebase, reset).
  • Working Directory: All tools accept an optional cwd (defaults to the session workspace).

Summary

dsh-git-tools addresses the pain point of agents directly operating Git in the DSH environment, providing secure, native interfaces. The plugin list and source code can be referenced on the directory page and GitHub repository.