DeepSeek Harness (DSH) adopts a plugin-based architecture. During use, developers often need to track token consumption, model invocation frequency, and skill usage patterns. The native DSH environment lacks fine-grained entry points for visual analysis. The dsh-usage-analytics plugin uses local index calculations to provide visual usage insights on the Settings page, meeting the tracking needs of individuals or small teams for usage data.

Plugin Positioning

This is a local-first personal usage analytics plugin. The author is 3361805598-gif, and it is released under the MIT License. It does not depend on remote services and generates 1-day, 7-day, and 30-day statistical views directly locally, including heatmaps, model distribution, and skill invocation details.

Core Features

  1. Settings page integration: Adds a “Personal Analytics” section to the DSH Settings page, providing a unified entry point to view data.
  2. Multi-window statistics: Supports switching among three time windows: 1 day, 7 days, and 30 days.
  3. Visual charts:
    • Hourly bar chart for today.
    • 7-day hourly heatmap.
    • Clickable 30-day calendar; clicking a date views the details of usage for that day.
  4. Token composition analysis: Displays the token composition bar and category share; reasoning usage is described separately as a subset of output and is not double-counted.
  5. Model and skill distribution:
    • Model distribution: displays provider, invocation count, tokens, and usage share.
    • Skill invocations: distinguishes automatic / explicit sources, and displays the number of successful, failed, and incomplete invocations, as well as the success rate.
  6. Data maintenance: Provides a “Rebuild statistics cache” feature to re-aggregate data.

Installation and Activation

Prerequisites: Node version ≥ 20, and dsh web runs normally.

  1. Download the .tgz installation package for the corresponding version from GitHub Releases (each release notes includes the SHA-256 checksum for the package).
  2. Place the downloaded dsh-usage-analytics-0.2.1.tgz in the ~/.dsh/profiles/web/vendor/ directory.
  3. Run the following command to add the plugin:
dsh plugin --profile web add file:vendor/dsh-usage-analytics-0.2.1.tgz
  1. After installation, restart dsh web and hard refresh the page in the browser.

Typical Usage

  1. Open the DSH Settings page and find the “Personal Analytics” section.
  2. Click the time window switcher to view 1-day, 7-day, or 30-day statistical views.
  3. In the 30-day calendar view, click a specific date to view the token usage details and skill invocation status for that day.

Use Cases and Notes

  • Supported platform: Web platform only.
  • Style adaptation: The UI style follows DSH Appearance (Light / Dark / System) and reads the official --dsw-alias-* tokens.
  • Security mechanism: The API is protected by a local same-origin trust fence; the POST /rebuild endpoint has no additional authentication outside the fence.
  • Privacy protection: The plugin only writes its own derived index (timestamps, numeric token usage, model identifiers, skill names, invocation sources, and results). It does not write prompts, model responses, tool parameters, tool results, working directories, or secrets. Token and skill details are cleaned based on a 90-day retention window.
  • Language support: The UI is entirely Chinese, with no internationalization layer.

Summary

dsh-usage-analytics provides the DSH Web platform with a lightweight, localized data pivot tool. It ensures data accuracy by rebuilding caches and strictly limits the scope of data writes, ensuring privacy security while providing visual insights.