DDDPG/dsh-plugins--plugins-dsh-insights0

dsh-insights

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. Runs as a foreground /insights command in the session, orchestrated via insights_collect / insights_facet / insights_aggregate / insights_render / insights_run model tools with subagent-parallel facet fan-out.

AI 분석

核心用途是分析跨工作区的会话历史并生成交互式分析报告。适合需要复盘、统计和可视化 AI 使用习惯与会话维度的用户。在会话中运行 `/insights` 即可触发。

패키지
dsh-insights
버전
0.2.0
라이선스
MIT
최근 업데이트
2026. 8. 15.

설치

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:DDDPG/dsh-plugins#543d4b046af0c67602be6d16cba7f6ed94239247&path: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
keydefaultnotes
reportPath$DSH_HOME/storages/insights/report.htmlHTML report output path
facetDir$DSH_HOME/storages/insights/facetsper-session facet cache directory
maxNewSessionsPerRun50cap on new sessions analyzed per run
transcriptCharLimit30000longer sessions are chunk-summarized first
chunkChars25000summary chunk size
facetMaxOutputTokens4096facet extraction max output tokens
analysisMaxOutputTokens8192analysis prompt max output tokens
timeoutMs120000per LLM call timeout
openReporttrueopen the report in a browser when done
provider / model(unset)facet/analysis route override; both or neither
localezhreport and prompt language (zh / en)

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

toolrole
insights_collectscan the global corpus, extract metadata, return new session ids
insights_facetLLM facet extraction for a batch (cached per session, failures isolated); safe to fan out across subagents
insights_aggregateaggregate cached facets + 8 analysis LLM calls (7 prompts + overview); writes insights-latest.json
insights_renderrender the HTML report and try to open it
insights_runone-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.