npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

dsh-insights

v0.2.0

Published

DSH plugin: replica of Claude Code's /insights command — cross-workspace session usage analysis powered by the global session-query corpus, with per-session LLM facet extraction (cached), 8 analysis prompts, and a self-contained interactive HTML report. R

Readme

dsh-insights

Replica of Claude Code's /insights for DeepSeek Harness: cross-workspace session usage analysis that writes a self-contained interactive HTML report.

Published on npm as [email protected] with a dsh.bundle.patch — one command installs and auto-mounts (takes effect on the next dsh start):

dsh plugin --profile web add dsh-insights

Local checkout (development): dsh plugin --profile web add ./plugins/dsh-insights, or ./scripts/install.sh web plugins/dsh-insights.

Usage

In any session:

/insights                       # analyze new sessions and generate the report
/insights --refresh             # ignore facet cache; re-analyze everything
/insights --window 30           # last 30 days only (0 = all)
/insights --max 20              # analyze at most 20 new sessions this run

Loader config is optional — without it, outputs default under the harness home ($DSH_HOME/storages/insights/, else ~/.dsh/storages/insights/). To customize, add an id-targeted config patch in the profile's cordis.patch.yml (last write wins per row):

- insert:
    - id: insights
      name: 'dsh-insights'
      config:
        reportPath: !!js dshHomePath('storages/insights/report.html')
        facetDir: !!js dshHomePath('storages/insights/facets')
        # optional: cheaper model for facet/analysis (must be a pair)
        # provider: deepseek
        # model: deepseek-chat

| key | default | notes | | --- | --- | --- | | reportPath | $DSH_HOME/storages/insights/report.html | HTML report output path | | facetDir | $DSH_HOME/storages/insights/facets | per-session facet cache directory | | maxNewSessionsPerRun | 50 | cap on new sessions analyzed per run | | transcriptCharLimit | 30000 | longer sessions are chunk-summarized first | | chunkChars | 25000 | summary chunk size | | facetMaxOutputTokens | 4096 | facet extraction max output tokens | | analysisMaxOutputTokens | 8192 | analysis prompt max output tokens | | timeoutMs | 120000 | per LLM call timeout | | openReport | true | open the report in a browser when done | | provider / model | (unset) | facet/analysis route override; both or neither | | locale | zh | report and prompt language (zh / en) |

The assistant orchestrates these tools (or you can ask it to call insights_run once):

| tool | role | | --- | --- | | insights_collect | scan the global corpus, extract metadata, return new session ids | | insights_facet | LLM facet extraction for a batch (cached per session, failures isolated); safe to fan out across subagents | | insights_aggregate | aggregate cached facets + 8 analysis LLM calls (7 prompts + overview); writes insights-latest.json | | insights_render | render the HTML report and try to open it | | insights_run | one-shot serial pipeline (fallback; no subagent fan-out) |

Uninstall

dsh plugin --profile web remove dsh-insights

Limits and privacy

  • Analysis runs on this machine; LLM requests leave the machine. The report is a local file — sharing it is your choice.
  • The plugin writes three locations: reportPath, facetDir (one JSON file per analyzed session), and insights-latest.json next to facetDir (aggregate handoff). It does not append events to session logs.
  • Token totals only cover sessions whose adapter reported usage (the report shows coverage). Input tokens use the billing formula inputTokens + cacheReadTokens + cacheWriteTokens.
  • Git activity, languages, and touched files are heuristics.
  • Facet cache is one-shot per session id; later turns in the same session are not re-analyzed unless you pass --refresh.

How it works

Execution model: foreground in-session command.

The host registers /insights and the insights_* tools. The command handler calls agent.steer; the current assistant then drives the pipeline as an ordinary, interruptible turn:

/insights (host) → agent.steerinsights_* tools → HTML render

Default orchestration: collect → fan out insights_facet on subagents → aggregate → render. insights_run is the serial fallback.

Tests

cd plugins/dsh-insights
node --test tests/

Part of the dsh-plugins collection.