Introduction

In the development scenario of DeepSeek Harness, an Agent needs to clearly understand the topology of a Git repository, including commit history, branch merging status, and worktree state. The dsh-git-graph plugin provides Harness with a visualized commit graph view and tool interfaces, enabling the Agent to view the lane graph through the browser sidebar and directly call the git_graph and git_worktree tools for queries.

Plugin Overview

This is a DeepSeek Harness plugin maintained by DevViking-Persike and licensed under the MIT License.

Its core value lies in:
1. Providing a visualized commit graph view in the browser, displaying lanes, branches, and merge information.
2. Providing a worktree list.
3. Providing the Agent with reasoning-friendly textual tool interfaces.

Installation and Configuration

Run the following command in a terminal to install the plugin:

dsh plugin --profile web add github:DevViking-Persike/dsh-git-graph

After installation is complete, you need to restart the dsh process.

Usage

After restarting dsh, a ⎇ grafo button appears next to the input field. Click this button to open the panel, manually enter the repository path, and load the history. After the history is loaded, the Agent can use the git_graph and git_worktree tools.

Core Features

  • Commit Graph View: Each commit is displayed as a point on a colored lane. First-parent connections remain straight lines, while merge connections curve between different lanes. Branch and tag labels are displayed next to the corresponding commits, and the current branch is marked with *.
  • Worktree List: Below the graph, all worktrees and their branch status are listed (such as [detached] or [bare]).
  • Agent Tools:
    • git_graph: Provides history information that includes lanes, parents, refs, and worktree summaries.
    • git_worktree: Lists worktrees and their branches.
  • Security Mechanism: The plugin only provides read permissions and does not perform any commit, checkout, create, or remove operations.

Configuration Options

The plugin supports adjusting the history depth and route path through a configuration file.

  • limit: Limits the history depth, with a default value of 300.
  • route: The browser-side access path, with a default value of /git-graph.

Example configuration:

- id: dsh-git-graph
  name: 'dsh-git-graph'
  config:
    limit: 500

Applicable Scenarios and Notes

  • Applicable Scenarios: Agent tasks that require inspecting the topology of Git commit history, analyzing branch merges, or managing local worktrees.
  • Permission Constraints: The plugin runs in read-only mode and calls Git subprocesses with fixed arguments to avoid shell injection risks.
  • Known Limitations:
    • The history depth is limited (default: 300), so the full history cannot be loaded.
    • The repository path must be entered manually; the current working directory (cwd) of the session cannot be detected automatically.
    • Ref decorations do not display stash entries.
    • The panel does not provide operations for creating or removing worktrees.

Conclusion

dsh-git-graph provides Harness with intuitive Git visualization, making it suitable for scenarios that require a deep understanding of the codebase structure. For more details, see the SkillHub directory or the GitHub repository.