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

codelens-claude-hooks

v1.1.1

Published

Claude Code hooks for automatic conversation capture and team coordination analytics

Readme

CodeLens: Claude Code Analytics Mirror

This repository contains the Claude Code hook configuration for the CodeLens team coordination analytics system. These hooks automatically capture Claude Code conversations and send them to a Supabase database for real-time team analysis.

🎯 What This Does

CodeLens transforms isolated Claude Code conversations into objective team coordination insights by:

  • Capturing every Claude interaction through automated hooks
  • Analyzing conversation patterns to detect developer flow states
  • Identifying file collisions when multiple developers work on the same code
  • Providing real-time team status without subjective scoring

🏗️ System Architecture

┌─────────────────┐    ┌─────────────────┐    ┌─────────────────┐
│   Claude Code   │    │   Supabase      │    │  React Frontend │
│   + This Config │───►│   Database      │◄───│  (CodeLens UI)  │
└─────────────────┘    └─────────────────┘    └─────────────────┘
    Hooks capture           Stores chat           Real-time team
    conversations           conversations         coordination view

📁 Repository Contents

.claude/settings.local.json

Hook configuration that triggers Python scripts on:

  • UserPromptSubmit: When you send a prompt to Claude
  • Stop: When Claude finishes responding

.claude/hooks/user-prompt-submit.py

Captures user prompts and:

  • ✅ Creates anonymous user tracking (UUID-based)
  • ✅ Extracts project name from working directory
  • ✅ Initiates conversation logging in Supabase
  • ✅ Sets up session tracking for response correlation

.claude/hooks/claude-response-submit.py

Captures Claude responses and:

  • ✅ Reads Claude's response from conversation transcripts
  • ✅ Updates the conversation record with the complete interaction
  • ✅ Maintains conversation threading
  • ✅ Includes comprehensive error logging and debugging

🚀 How It Works

1. Automatic Capture

Every time you use Claude Code in this directory:

You: "Fix the authentication bug in auth.js"
Claude: "I'll help you fix that. Let me examine the code..."

→ Both sides automatically logged to Supabase

2. Team Analysis

The backend analyzes patterns across all team conversations:

  • Flow Detection: Quick solutions indicate smooth progress
  • Collision Detection: Multiple devs working on same files
  • Stuck Detection: Extended back-and-forth on single issues

3. Real-Time Coordination

The frontend provides live team status:

  • 🟢 Flow: Developer making steady progress
  • 🟡 Slow: Multiple iterations, debugging mode
  • 🔴 Stuck: Extended time on single issue
  • ⚠️ Collision: Multiple devs on same file

🔧 Configuration Details

Data Collection

  • Anonymous: Uses generated UUIDs, no personal data
  • Project-Based: Extracts project name from $(pwd)
  • Session-Linked: Correlates prompts with responses
  • Remote Storage: Logs sent to agfvdbmbebuawvhapmyi.supabase.co

Privacy & Security

  • No code content is logged, only conversation metadata
  • Anonymous user identification
  • Temporary session files cleaned up automatically
  • Local debug logging for troubleshooting

Dependencies

# Required Python packages
pip install requests uuid json pathlib

📊 What Gets Analyzed

From your Claude conversations, the system extracts:

  • File mentions → Collision detection
  • Success/error indicators → Flow state analysis
  • Question patterns → Learning opportunity identification
  • Time between interactions → Productivity insights
  • Problem resolution patterns → Team knowledge mapping

🎯 Integration with CodeLens

This hook configuration is part 1 of the complete CodeLens system:

  1. This Repository: Captures Claude conversations
  2. Backend Service: Analyzes patterns and provides API
  3. React Frontend: Displays real-time team coordination

What makes this incredible is the literally zero setup experience - just clone this repository into your project directory and start using Claude Code. The hooks activate automatically and begin capturing your conversations immediately, providing instant team coordination insights without any manual configuration, server setup, or additional tooling required!

🚀 Getting Started

npm install codelens-claude-hooks

That's it! The hooks automatically activate and start capturing Claude conversations with zero configuration.

The hooks will start capturing your Claude conversations immediately, feeding data to the CodeLens analytics system for team coordination insights.

🔍 Debugging

  • Debug logs: stop_hook_debug.log shows hook execution
  • Error logs: stop_hook_error.log captures failures
  • Session files: /tmp/claude_session_* for conversation linking
  • Config file: ~/.claude-code-logger/config.json stores user ID

CodeLens transforms individual Claude conversations into team coordination intelligence - no manual tracking required! 🚀