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

clinsight

v0.2.0

Published

Claude Code session analyzer & compound TUI dashboard

Readme


Why Clinsight?

If you use Claude Code, you've probably experienced this:

"What did I discuss with Claude yesterday..." "Session got lost, now I'm explaining everything from scratch" "That prompt was so good... which session was it again?" "Didn't realize I spent $30+ in a single session until it was too late"

Sessions are ephemeral, but the insights from them don't have to be.

Clinsight automatically records and analyzes your Claude Code usage, turning today's trial-and-error into tomorrow's assets.


npm (recommended)

npm install -g clinsight

# Register hooks with Claude Code (starts automatic session recording)
clinsight-setup

# Launch the dashboard
clinsight

From source

git clone https://github.com/wooo-jin/clinsight.git
cd clinsight
pnpm install && pnpm build

# Register hooks with Claude Code
pnpm setup

# Launch the dashboard
pnpm dev

See INSTALL.md for detailed installation instructions.


1 — Automatic Session Archive

Hooks into Claude Code's hook system to automatically record every conversation. Recording starts when a session begins and creates a complete archive when it ends. No manual steps — just use Claude Code as usual.

2 — TUI Dashboard

A 7-tab terminal dashboard accessible right from your terminal:

+-----------------------------------------------------------+
|  Clinsight  | 42 sessions | updated 17:30                 |
|                                                           |
|  Dashboard  Insights  Sessions  Cost  Compound  Archive   |
|                                                           |
|  +-- Today --+  +-- Week ---+  +-- Month --+             |
|  | Sessions: 8|  | Sessions: 34|  | Sessions: 142|       |
|  | Cost: $4.20|  | Cost: $18.5 |  | Cost: $72.30 |       |
|  | Score: 82  |  | Score: 78   |  | Score: 75    |       |
|  +-----------+  +------------+  +-------------+          |
|                                                           |
|  7-day cost trend    ............                          |
|  7-day efficiency    ............                          |
|                                                           |
|  [1-7] tabs  [Tab] navigate  [r] refresh  [q] quit       |
+-----------------------------------------------------------+

| Tab | Description | |---|---| | Dashboard | Today/weekly/monthly summary, cost trends, efficiency scores | | Insights | Churn detection, context saturation warnings, improvement suggestions | | Sessions | Per-session analysis (tokens, tool usage, edited files) | | Cost | Cost breakdown by model and project | | Compound | AI-powered pattern extraction and knowledge compounding | | Archive | Browse full session conversation history | | Settings | Configure archive retention periods |

3 — Session Analysis Engine

Each session is automatically analyzed and assigned an efficiency score (0-100).

Efficiency = f(first-try rate, churn index, exploration efficiency, context saturation, duration)

| Metric | How It's Measured | |---|---| | Churn Index | Number of edit reversions (not just repeated edits) | | Exploration Efficiency | Ratio of read-only files that didn't contribute to edits | | Context Saturation | Actual usage vs. model context window size | | First-Try Rate | Percentage of edits completed without reversions | | Cost Tracking | Based on actual per-token pricing by model |

4 — Compound (Knowledge Compounding)

A nightly cron job sends the day's sessions to Claude for deep analysis.

Today's sessions  -->  Pattern recognition   -->  Actionable rules
                       Solution extraction        for CLAUDE.md
                       Convention mining
                       Golden prompt preservation

Today's struggles become tomorrow's assets.

5 — Real-Time Alerts

Analyzes the current session on every prompt. When issues are detected, warnings are injected into Claude's context so Claude naturally addresses them in its responses.

| Condition | What Claude Says | |---|---| | Context 75%+ | "You may need /compact soon" | | Context 90%+ | "Running /compact is recommended" | | Cost $10+ | "Costs are getting high" | | 3+ reversions | "Consider re-evaluating your approach" | | 60min+ session | "40-50 minute sessions are more efficient" |

No separate notification popups. Claude mentions it naturally in conversation.

6 — Zombie Session Detection

Detects orphaned processes and abandoned session directories, with one-click cleanup.


Claude Code Session
       |
       +-- SessionStart --> Hook --> Initialize archive
       |
       +-- PromptSubmit --> Hook --> Sync conversation + real-time analysis
       |                              |
       |                              +--> If warning threshold met:
       |                                    Inject into Claude's context
       |
       +-- SessionStop  --> Hook --> Create complete archive
                                         |
                                    +----+-----+
                                    |          |
                              TUI Dashboard  Cron (23:00)
                              Live browsing  Compound analysis
                                             Pattern/solution extraction

Tech Stack

| | | |---|---| | Runtime | Node.js 18+ | | UI | Ink + React (Terminal UI) | | Language | TypeScript strict mode | | Architecture | Feature-Sliced Design (FSD) | | Integration | Claude Code Hooks | | Test | Vitest (109 tests) | | Platform | macOS, Linux, Windows |


Acknowledgements

Inspired by claude-session-tracker.


License

MIT