Introduction

DeepSeek Harness (DSH) adopts an “everything is a plugin” architectural philosophy. When an agent needs to analyze a new project, understanding its code scale and technology stack is the first step. Manually counting files and lines is inefficient. The dsh-code-stats plugin is designed to solve this problem by providing fast and accurate code statistics.

Plugin Introduction

dsh-code-stats is a client plugin maintained by uckkk. It scans a specified directory, counts the number of files and lines of code, groups the results by programming language, and lists the largest files. The tool is implemented in pure Node.js and does not rely on any external network services.

Core Features

  • Basic statistics: Counts files and lines of code.
  • Grouped display: Displays code distribution grouped by language.
  • Largest files list: Lists the largest files in the project.
  • Language support: Recognizes 30+ language file extensions, including JS, TS, Python, Go, Rust, Java, JSON, YAML, Markdown, and more.
  • Smart filtering: Automatically skips directories such as node_modules and .git, as well as binary files, images, archives, lock files, and similar items.

Installation and Enabling

To install and enable the plugin, configure the profile’s configuration file accordingly.

  1. Install the plugin:
    dsh plugin add dsh-code-stats
  1. In the profile’s package.json, add "dsh-code-stats" to the dsh.profile.bundles array.

Typical Usage

After installation, invoke the registered tool code_stats in the session. For example, scan the /workspace directory:

code_stats(root="/workspace")

This call returns the project’s language distribution and the largest files list.

Use Cases and Notes

This plugin is suitable for quickly understanding project scale, technology composition, or codebase health checks. Because it is implemented purely locally in Node and performs no network interactions, it is fast. However, the plugin code runs on your local machine, so review the source code and license (MIT) before installation.

References

  • Plugin directory: https://www.skillhub.cn/plugins/uckkk/dsh-code-stats
  • GitHub repository: https://github.com/uckkk/dsh-code-stats