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

@chigichan24/crune

v0.1.5

Published

<div align="center"> <img src="public/favicon.svg" alt="crune logo" width="80" height="80" /> <h1>crune</h1> <p><strong>Claude Code Rune — Traces linger, skills emerge</strong></p> <p> <a href="https://www.npmjs.com/package/@chigichan24/crune"

Readme

Decipher the traces etched in past sessions and resurrect them as reusable skills. crune is a static web dashboard and CLI tool that analyzes Claude Code session logs, providing session playback, analytics, a semantic knowledge graph, and skill synthesis.

Features

  • Session Playback --- Turn-by-turn conversation replay with minimap navigation, tool call inspection, and subagent branch expansion
  • Overview Dashboard --- Activity heatmap, project distribution, tool usage trends, duration distribution, model usage, and top edited files
  • Semantic Knowledge Graph --- TF-IDF + Tool-IDF + structural features, Truncated SVD, agglomerative clustering, Louvain community detection, Brandes centrality (algorithm details)
  • Tacit Knowledge --- Extracted workflow patterns, tool sequences, and pain points (long sessions, hot files)
  • Session Summarization --- Automatic session summary and classification (no LLM required), enriched with /insights facets data when available
  • Skill Synthesis --- Synthesize reusable skill definitions from the knowledge graph (algorithm details)

Overview Dashboard

Session Playback

Semantic Knowledge Graph (Rune)

CLI — Generate Skills via npx

Generate reusable Claude Code skill definitions directly from your session logs. No clone required.

npx @chigichan24/crune --dry-run                    # Preview skill candidates
npx @chigichan24/crune --skip-synthesis              # Generate heuristic skills (no LLM)
npx @chigichan24/crune --count 3 --model haiku       # LLM-synthesized skills (requires claude CLI)
npx @chigichan24/crune --output-dir ~/.claude/skills  # Install skills directly

Output follows the Claude Code skill format (<name>/SKILL.md), ready to use as /skill-name commands.

| Flag | Description | |------|-------------| | --sessions-dir <path> | Session logs directory (default: ~/.claude/projects) | | --output-dir <path> | Output directory for skill files (default: ./skills) | | --count <n> | Number of skills to generate (default: 5) | | --model <model> | Claude model for synthesis (e.g. haiku, sonnet) | | --skip-synthesis | Skip LLM synthesis, output heuristic skills only | | --dry-run | Show candidates without writing files |

Web Dashboard

Quick Start

npm install

# Analyze Claude Code session logs (~/.claude/projects/)
npm run analyze-sessions

# Start dev server
npm run dev

Data Pipeline

npm run analyze-sessions reads JSONL session files from ~/.claude/projects/ and outputs structured JSON to public/data/sessions/.

~/.claude/projects/**/*.jsonl
  -> parse & build turns
  -> extract metadata, subagents, linked plans
  -> session summarization (centrality-based representative prompt, workType classification)
  -> TF-IDF + Tool-IDF + structural features -> Truncated SVD -> agglomerative clustering
  -> /insights facets integration (narrow cluster merging, goal-based labeling)
  -> Louvain community detection
  -> skill synthesis (reusability score top-N -> claude -p, enriched with facets insights)
  -> output:
       public/data/sessions/index.json      (session list)
       public/data/sessions/overview.json   (cross-session analytics + knowledge graph)
       public/data/sessions/detail/*.json   (individual session playback data)

Custom paths:

npm run analyze-sessions -- --sessions-dir /path/to/sessions --output-dir /path/to/output

/insights Integration

Before analysis, analyze-sessions automatically runs /insights to refresh facets data. This enriches the pipeline with:

  • Better topic labels using LLM-generated underlying_goal instead of TF-IDF keywords
  • Narrow cluster merging based on shared goal categories
  • Quality-aware reusability scoring using session outcome and helpfulness
  • Richer synthesis prompts with friction details and success rates
  • Session summaries using brief_summary from facets

Skip with --skip-facets or customize the facets path with --facets-dir <path>.

Session Summarization

The session list displays auto-generated summaries. When /insights facets data is available, the LLM-generated brief_summary is used. Otherwise, summaries are processed locally without LLM.

  • Representative prompt selection: Selects the most representative prompt from plan mode turns using Jaccard centrality with position weighting
  • workType classification: Automatically classifies each session into one of four types:
    • investigation --- Exploratory, read-heavy sessions
    • implementation --- Edit/write-heavy coding sessions
    • debugging --- Bash-heavy sessions with edits
    • planning --- Plan mode sessions with few tool calls
  • Keyword extraction: Extracts top keywords from session prompts
  • Scope estimation: Infers the session scope from the common directory prefix of edited files

Skill Synthesis

Synthesizes reusable skill definitions from knowledge graph analysis. Follows the anthropics/skills format.

  • Pre-synthesis: Automatically synthesizes the top 5 skill candidates via claude -p during analyze-sessions
  • Instant display: Synthesized skills are immediately viewable and copyable in the UI
  • On-demand re-synthesis: The re-synthesis button generates a full version enriched with graph context (connected topics, community, centrality)
  • Local server: npm run skill-server starts the synthesis API server (localhost:3456)

Synthesis options:

# Specify model (e.g. haiku for speed)
npm run analyze-sessions -- --synthesis-model haiku

# Change number of candidates to synthesize (default: 5)
npm run analyze-sessions -- --synthesis-count 10

# Skip LLM synthesis (graph construction only)
npm run analyze-sessions -- --skip-synthesis

Scripts

| Command | Description | |---------|-------------| | npm run dev | Start Vite dev server | | npm run build | Type-check + production build | | npm run preview | Preview production build | | npm run lint | Run ESLint | | npm run analyze-sessions | Run data pipeline | | npm run skill-server | Skill synthesis local server (localhost:3456) | | npm run dev:full | skill-server + Vite dev server together |

Options for analyze-sessions

| Flag | Description | |------|-------------| | --synthesis-model <model> | Model to use for synthesis (e.g. haiku for speed) | | --synthesis-count <n> | Number of candidates to synthesize (default: 5) | | --skip-synthesis | Skip LLM synthesis | | --facets-dir <path> | Custom facets directory (default: ~/.claude/usage-data/facets) | | --skip-facets | Skip /insights refresh and facets integration |

Tech Stack

  • React 19 + TypeScript 5.9
  • Vite 8
  • Chart.js + react-chartjs-2
  • react-force-graph-2d (d3-force)
  • Plain CSS (no CSS-in-JS, no Tailwind)

Project Structure

src/
  components/
    overview/     # Dashboard cards, session list, charts
    playback/     # Session replay, tool call blocks, subagent branches
    knowledge/    # Force graph, node detail, tacit knowledge, skill synthesis
  hooks/          # Data fetching (useSessionIndex, useSessionDetail, useSessionOverview)
  types/          # TypeScript type definitions
scripts/
  cli.ts                     # npx CLI entry point
  session-parser.ts          # JSONL parsing, turn building, metadata extraction
  analyze-sessions.ts        # Dashboard JSON pipeline
  session-summarizer.ts      # Session summarization (local NLP)
  skill-synthesizer.ts       # Skill synthesis (claude -p)
  skill-server.ts            # Synthesis HTTP server
  knowledge-graph-builder.ts # Semantic embedding + graph construction
  knowledge-graph/
    facets-reader.ts         # /insights facets data reader + normalization
public/
  data/sessions/             # Generated JSON (gitignored)

Prerequisites

  • Node.js >= 18
  • Claude Code session logs at ~/.claude/projects/

License

Apache-2.0 license