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

harness-tracker

v1.1.0

Published

Track file operations made by AI coding agents. One install, all projects.

Downloads

19

Readme

harness-tracker

Track file operations made by AI coding agents. One install, all projects.

harness-tracker hooks into Claude Code to record every Read, Edit, and Write operation to a local JSONL log. It gives you visibility into what your agent is doing with your files — which files it touches most, how often, and when.

Install

npm install -g harness-tracker

Prerequisites

  • Node.js >= 20
  • jq (used by the hook script)
    brew install jq  # macOS

Quick Start

# Register hooks in Claude Code
harness-tracker install

# Use Claude Code normally — operations are tracked automatically

# View file statistics
harness-tracker stats

# View recent operations
harness-tracker history

# View session overview
harness-tracker sessions

# Remove hooks (keeps existing data)
harness-tracker uninstall

Commands

harness-tracker install

Registers a PostToolUse hook in ~/.claude/settings.json. The hook runs after every Read, Edit, and Write operation and appends a record to the log.

Existing hooks are preserved — harness-tracker merges its configuration safely.

harness-tracker uninstall

Removes the hook from ~/.claude/settings.json. Log data is preserved in ~/.claude/harness-tracker/logs/.

harness-tracker stats [--project <path>]

Shows per-file operation counts (reads, edits, writes) and last access time, sorted by total operations.

File                                  Read  Edit  Write  Last Access
--------------------------------------------------------------
/src/components/App.tsx                 12     3      2  2026-03-23T14:30:08Z
/src/utils/helpers.ts                    8     1      1  2026-03-23T14:28:15Z

harness-tracker history [--limit N]

Shows the most recent N operations (default: 20) in chronological order.

Timestamp             Op     Path
--------------------------------------------------------------------------------
2026-03-23 14:30:01   Read   /src/main.ts
2026-03-23 14:30:05   Edit   /src/main.ts
2026-03-23 14:30:08   Write  /src/utils.ts [Explore]

harness-tracker sessions [--limit N]

Shows session overview with operation count and file count per session.

Data Format

Logs are stored as JSONL files in ~/.claude/harness-tracker/logs/, one file per day:

ops-2026-03-23.jsonl
ops-2026-03-24.jsonl

Each line is a JSON object with these fields:

| Field | Type | Present | Description | |-------|------|---------|-------------| | ts | string | always | ISO 8601 timestamp | | sid | string | always | Claude Code session ID | | op | string | always | Read, Edit, or Write | | path | string | always | Absolute file path | | offset | number | Read | Starting line offset | | limit | number | Read | Number of lines read | | old_len | number | Edit | Length of replaced text | | new_len | number | Edit | Length of new text | | size | number | Write | Total content size in bytes | | agent | string | subagent | Agent ID (when operation is from a subagent) | | agent_type | string | subagent | Agent type (e.g., Explore, Plan) |

Example:

{"ts":"2026-03-23T14:30:01Z","sid":"abc123","op":"Read","path":"/src/main.ts","offset":0,"limit":2000}
{"ts":"2026-03-23T14:30:05Z","sid":"abc123","op":"Edit","path":"/src/main.ts","old_len":45,"new_len":62}
{"ts":"2026-03-23T14:30:08Z","sid":"abc123","op":"Write","path":"/src/utils.ts","size":1823,"agent":"agent_03XYZ","agent_type":"Explore"}

How It Works

  1. harness-tracker install adds a PostToolUse hook to ~/.claude/settings.json
  2. When Claude Code executes a Read/Edit/Write, the hook script receives the operation details via stdin
  3. The script extracts relevant fields and appends a JSONL record to ~/.claude/harness-tracker/logs/ops-YYYY-MM-DD.jsonl
  4. The CLI commands read these JSONL files to generate reports

The hook script is a lightweight bash script (~30 lines) that targets < 5ms execution time.

License

MIT