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

cc-memory-triage

v0.1.0

Published

Keyboard-driven local web UI for triaging Claude Code memory files

Readme

cc-memory-triage

Claude Code の memory ファイル(~/.claude/projects/*/memory/*.md)を棚卸しするためのローカル Web UI。

memory を1件ずつ確認し、不要なものはその場で削除、直したいものはテキストエリアで直接編集できます。判断材料(経過日数・参照実績・type・リンク切れ・索引との不整合)はバッジとして前置され、怪しい順に並びます。すべての操作はマウスで完結します。

起動

インストール不要。

npx cc-memory-triage

~/.claude/projects を対象に 127.0.0.1 で起動し、ブラウザを開きます。実行時依存は hono / @hono/node-server / gray-matter の3つだけです。

オプション:

  • --root <dir> — 走査ルートを指定(デフォルト: ~/.claude/projects)。E2E テストでも fixture 注入に使う
  • --port <n> — ポート指定(デフォルト: 空きポート)
  • --no-open — ブラウザを自動で開かない

操作

一覧のクリックで選択し、詳細ペインのボタンで「削除」「編集」(ファイル全文を textarea で書き換えて保存)。ショートカットも使えます(j/k 移動、d 削除)。

削除時は確認ダイアログが出ます。「今後この確認を表示しない」をチェックすると、以後はワンクリックで削除されます(設定はブラウザの localStorage に保存)。削除は memory ファイルの除去に加えて、同ディレクトリの MEMORY.md 索引からも該当行を取り除きます。

memory の検出

固定のディレクトリ構造は仮定しません。--root 配下を再帰的に走査(深さ8まで、node_modules.git などは除外)し、次のいずれかを memory ディレクトリとして検出します:

  • MEMORY.md 索引を持つディレクトリ
  • memory/ という名前で *.md を含むディレクトリ

セッションログ連携

memory ディレクトリの親(プロジェクトディレクトリ)にある Claude Code のセッションログ(*.jsonl)を走査し、棚卸しの判断材料を補強します:

  • 参照実績バッジ: 各 memory がいくつのセッションで言及されたか、最終参照はいつか。「保存後いちども参照されていない」は経過日数より強い削除候補シグナル
  • セッション履歴: 詳細ペインに、言及のあるセッションの一覧(AI タイトル・日時・言及回数)を表示。frontmatter の originSessionId と一致するセッションには「作成元」マークが付く(memory が保存されたセッション。最初に言及したセッションとは限らない)
  • 会話ビューア: セッション行をクリックすると、そのセッションの user/assistant の会話テキストを読める(memory 名はハイライト)。tool 呼び出しの生 JSON や system-reminder は表示しない。会話を再開したい場合は「resume コマンドをコピー」で claude --resume <sessionId> を取得できる

ログ形式は Claude Code の内部仕様のため、行単位の部分一致による防御的なパースに留めた enrichment 層(src/sessions.ts)として分離しています。ログが自動削除済みの場合は「参照なし」となります。

設計

  • バックエンドは薄いファイル API のみ: GET /api/memories(バッジ計算済み一覧)、GET /api/context(セッション履歴)、GET/PUT /api/content(編集)、POST /api/delete(削除)。バインドは 127.0.0.1 限定
  • --root 注入が E2E の要: Playwright が fixture をコピーした一時ディレクトリでサーバを起動し、UI 操作 → 実ファイルの消滅・書き換えまでを検証する
  • web アセットはモジュール相対で解決: npx 実行では cwd が任意のディレクトリになるため、src/server.tsresolveWebRoot()import.meta.url を起点に dist/web を探す

開発

npm install          # postinstall 相当の prepare で dist までビルドされる
npm run serve        # tsx で src を直接実行
npm start            # ビルドし直して dist/server/cli.js を実行
npm run typecheck
npm run e2e

配布物は dist/ のみ(files で指定)。npm publish 時は prepare が走るため、ビルド済みの最新の dist/ が公開されます。

スタック

TypeScript / Hono + @hono/node-server / React + Vite / Playwright